From a112cbde5cd47ee4215fb526fb7a422d0185d240 Mon Sep 17 00:00:00 2001 From: Geoff Romer Date: Thu, 19 Dec 2024 13:41:06 -0800 Subject: [PATCH] Model type expressions as regions (#4698) This is a precondition for enabling the new pattern-matching subsystem to support binding patterns that have `if` expressions in the type position. --------- Co-authored-by: Richard Smith --- toolchain/check/context.cpp | 96 +++- toolchain/check/context.h | 88 +++- toolchain/check/handle_binding_pattern.cpp | 13 +- toolchain/check/handle_function.cpp | 6 +- toolchain/check/handle_if_expr.cpp | 10 +- toolchain/check/handle_if_statement.cpp | 6 +- toolchain/check/handle_let_and_var.cpp | 1 + toolchain/check/handle_loop_statement.cpp | 6 +- toolchain/check/handle_operator.cpp | 9 +- toolchain/check/handle_pattern_list.cpp | 20 +- toolchain/check/pattern_match.cpp | 9 +- .../testdata/alias/fail_bool_value.carbon | 5 - .../testdata/alias/fail_control_flow.carbon | 8 +- .../alias/no_prelude/alias_of_alias.carbon | 1 - .../alias/no_prelude/export_name.carbon | 5 - .../fail_aliased_name_in_diag.carbon | 2 - .../no_prelude/fail_name_conflict.carbon | 2 - .../alias/no_prelude/fail_not_constant.carbon | 5 - .../testdata/alias/no_prelude/import.carbon | 16 +- .../alias/no_prelude/import_access.carbon | 4 - .../alias/no_prelude/import_order.carbon | 10 +- .../alias/no_prelude/in_namespace.carbon | 8 +- .../testdata/alias/no_prelude/local.carbon | 2 - .../testdata/array/array_in_place.carbon | 10 - .../testdata/array/array_vs_tuple.carbon | 23 +- .../testdata/array/assign_return_value.carbon | 4 - .../check/testdata/array/assign_var.carbon | 13 - toolchain/check/testdata/array/base.carbon | 17 - .../testdata/array/canonicalize_index.carbon | 83 +--- .../testdata/array/fail_bound_negative.carbon | 42 +- .../testdata/array/fail_bound_overflow.carbon | 12 - .../array/fail_incomplete_element.carbon | 7 - .../testdata/array/fail_invalid_type.carbon | 5 - .../testdata/array/fail_out_of_bound.carbon | 4 - .../fail_out_of_bound_non_literal.carbon | 6 - .../testdata/array/fail_type_mismatch.carbon | 28 -- .../testdata/array/function_param.carbon | 16 +- .../check/testdata/array/generic_empty.carbon | 17 +- toolchain/check/testdata/array/import.carbon | 6 +- .../testdata/array/index_not_literal.carbon | 6 - .../check/testdata/array/nine_elements.carbon | 4 - .../testdata/as/adapter_conversion.carbon | 23 - .../testdata/as/fail_no_conversion.carbon | 6 - .../check/testdata/as/fail_not_type.carbon | 2 - toolchain/check/testdata/as/identity.carbon | 18 +- .../check/testdata/as/no_prelude/tuple.carbon | 8 - toolchain/check/testdata/as/overloaded.carbon | 12 +- .../testdata/basics/builtin_types.carbon | 9 - .../testdata/basics/fail_bad_run_2.carbon | 6 +- .../fail_numeric_literal_overflow.carbon | 17 - .../multifile_raw_and_textual_ir.carbon | 14 +- .../basics/no_prelude/multifile_raw_ir.carbon | 14 +- .../no_prelude/raw_and_textual_ir.carbon | 160 +++---- .../basics/no_prelude/raw_identifier.carbon | 18 +- .../testdata/basics/no_prelude/raw_ir.carbon | 65 +-- .../basics/no_prelude/textual_ir.carbon | 6 +- .../testdata/basics/numeric_literals.carbon | 13 - toolchain/check/testdata/basics/parens.carbon | 4 - .../testdata/basics/type_literals.carbon | 12 - .../check/testdata/builtins/bool/eq.carbon | 108 +---- .../testdata/builtins/bool/make_type.carbon | 4 - .../check/testdata/builtins/bool/neq.carbon | 108 +---- .../check/testdata/builtins/float/add.carbon | 184 ++++---- .../check/testdata/builtins/float/div.carbon | 192 ++++---- .../check/testdata/builtins/float/eq.carbon | 64 +-- .../testdata/builtins/float/greater.carbon | 54 ++- .../testdata/builtins/float/greater_eq.carbon | 54 ++- .../check/testdata/builtins/float/less.carbon | 54 ++- .../testdata/builtins/float/less_eq.carbon | 54 ++- .../testdata/builtins/float/make_type.carbon | 53 +-- .../check/testdata/builtins/float/mul.carbon | 184 ++++---- .../testdata/builtins/float/negate.carbon | 134 +++--- .../check/testdata/builtins/float/neq.carbon | 64 +-- .../check/testdata/builtins/float/sub.carbon | 184 ++++---- .../check/testdata/builtins/int/and.carbon | 75 +--- .../testdata/builtins/int/complement.carbon | 80 +--- .../builtins/int/convert_checked.carbon | 224 ++++------ .../check/testdata/builtins/int/eq.carbon | 40 +- .../testdata/builtins/int/greater.carbon | 34 +- .../testdata/builtins/int/greater_eq.carbon | 34 +- .../testdata/builtins/int/left_shift.carbon | 109 ++--- .../check/testdata/builtins/int/less.carbon | 34 +- .../testdata/builtins/int/less_eq.carbon | 34 +- .../builtins/int/make_type_signed.carbon | 147 +++--- .../builtins/int/make_type_unsigned.carbon | 111 ++--- .../check/testdata/builtins/int/neq.carbon | 28 +- .../check/testdata/builtins/int/or.carbon | 75 +--- .../testdata/builtins/int/right_shift.carbon | 226 ++-------- .../check/testdata/builtins/int/sadd.carbon | 252 ++++------- .../check/testdata/builtins/int/sdiv.carbon | 127 ++---- .../check/testdata/builtins/int/smod.carbon | 127 ++---- .../check/testdata/builtins/int/smul.carbon | 91 +--- .../testdata/builtins/int/snegate.carbon | 192 +++----- .../check/testdata/builtins/int/ssub.carbon | 93 +--- .../check/testdata/builtins/int/uadd.carbon | 252 ++++------- .../check/testdata/builtins/int/udiv.carbon | 127 ++---- .../check/testdata/builtins/int/umod.carbon | 127 ++---- .../check/testdata/builtins/int/umul.carbon | 91 +--- .../testdata/builtins/int/unegate.carbon | 192 +++----- .../check/testdata/builtins/int/usub.carbon | 93 +--- .../check/testdata/builtins/int/xor.carbon | 75 +--- .../builtins/int_literal/make_type.carbon | 4 - .../check/testdata/builtins/print/char.carbon | 6 +- .../check/testdata/builtins/print/int.carbon | 6 +- .../check/testdata/builtins/read/int.carbon | 4 - .../testdata/class/access_modifers.carbon | 31 +- .../check/testdata/class/adapter/adapt.carbon | 6 +- .../testdata/class/adapter/adapt_copy.carbon | 29 +- .../class/adapter/extend_adapt.carbon | 38 +- .../class/adapter/fail_adapt_bad_decl.carbon | 4 +- .../adapter/fail_adapt_with_subobjects.carbon | 22 +- .../testdata/class/adapter/init_adapt.carbon | 18 - toolchain/check/testdata/class/base.carbon | 8 +- .../check/testdata/class/base_field.carbon | 16 +- .../check/testdata/class/base_method.carbon | 24 +- .../class/base_method_qualified.carbon | 24 +- .../testdata/class/base_method_shadow.carbon | 48 +- toolchain/check/testdata/class/basic.carbon | 20 +- .../class/complete_in_member_fn.carbon | 4 +- .../testdata/class/compound_field.carbon | 26 +- .../class/cross_package_import.carbon | 13 - .../testdata/class/derived_to_base.carbon | 34 +- .../check/testdata/class/fail_abstract.carbon | 22 +- .../testdata/class/fail_addr_not_self.carbon | 12 +- .../testdata/class/fail_addr_self.carbon | 18 +- .../testdata/class/fail_base_bad_type.carbon | 96 ++-- .../testdata/class/fail_base_misplaced.carbon | 4 +- .../testdata/class/fail_base_unbound.carbon | 1 - .../class/fail_compound_type_mismatch.carbon | 6 +- .../class/fail_convert_to_invalid.carbon | 1 - .../class/fail_derived_to_base.carbon | 22 +- .../testdata/class/fail_extend_cycle.carbon | 1 - .../class/fail_field_modifiers.carbon | 8 - .../testdata/class/fail_generic_method.carbon | 19 +- .../testdata/class/fail_import_misuses.carbon | 1 - .../testdata/class/fail_incomplete.carbon | 49 +- .../check/testdata/class/fail_init.carbon | 4 - .../class/fail_init_as_inplace.carbon | 13 +- .../class/fail_memaccess_category.carbon | 17 +- .../check/testdata/class/fail_method.carbon | 4 +- .../class/fail_method_modifiers.carbon | 10 +- .../class/fail_method_redefinition.carbon | 3 - .../testdata/class/fail_redefinition.carbon | 3 - .../check/testdata/class/fail_self.carbon | 9 +- .../testdata/class/fail_self_param.carbon | 5 +- .../class/fail_self_type_member.carbon | 13 +- .../class/fail_todo_local_class.carbon | 4 +- .../testdata/class/fail_unbound_field.carbon | 2 - .../testdata/class/fail_unknown_member.carbon | 4 +- .../check/testdata/class/field_access.carbon | 9 - .../class/field_access_in_value.carbon | 10 - .../testdata/class/forward_declared.carbon | 6 +- .../check/testdata/class/generic/adapt.carbon | 41 +- .../class/generic/base_is_generic.carbon | 19 +- .../check/testdata/class/generic/basic.carbon | 15 +- .../check/testdata/class/generic/call.carbon | 79 +--- .../generic/complete_in_conversion.carbon | 73 ++- .../check/testdata/class/generic/field.carbon | 27 +- .../testdata/class/generic/import.carbon | 25 +- .../check/testdata/class/generic/init.carbon | 40 +- .../class/generic/member_access.carbon | 47 +- .../class/generic/member_inline.carbon | 17 +- .../class/generic/member_lookup.carbon | 60 +-- .../class/generic/member_out_of_line.carbon | 43 +- .../class/generic/method_deduce.carbon | 18 +- .../testdata/class/generic/redeclare.carbon | 20 +- .../check/testdata/class/generic/self.carbon | 25 +- .../testdata/class/generic/stringify.carbon | 80 +--- .../testdata/class/generic_method.carbon | 17 +- toolchain/check/testdata/class/import.carbon | 19 +- .../check/testdata/class/import_base.carbon | 9 +- .../testdata/class/import_indirect.carbon | 38 +- .../testdata/class/import_member_cycle.carbon | 4 - .../testdata/class/import_struct_cyle.carbon | 6 - .../testdata/class/inheritance_access.carbon | 31 +- toolchain/check/testdata/class/init.carbon | 28 +- toolchain/check/testdata/class/init_as.carbon | 4 - .../check/testdata/class/init_nested.carbon | 6 - toolchain/check/testdata/class/method.carbon | 31 +- toolchain/check/testdata/class/nested.carbon | 27 +- .../check/testdata/class/nested_name.carbon | 12 +- .../class/no_prelude/export_name.carbon | 1 - .../class/no_prelude/generic_vs_params.carbon | 18 - .../class/no_prelude/import_access.carbon | 28 +- .../no_prelude/indirect_import_member.carbon | 10 - .../class/no_prelude/syntactic_merge.carbon | 82 ++-- .../check/testdata/class/raw_self.carbon | 46 +- .../check/testdata/class/raw_self_type.carbon | 16 +- .../check/testdata/class/redeclaration.carbon | 20 +- .../testdata/class/reorder_qualified.carbon | 12 - toolchain/check/testdata/class/scope.carbon | 4 - toolchain/check/testdata/class/self.carbon | 24 +- .../testdata/class/self_conversion.carbon | 28 +- .../check/testdata/class/self_type.carbon | 9 +- .../check/testdata/class/static_method.carbon | 1 - .../class/syntactic_merge_literal.carbon | 92 ++-- .../class/todo_access_modifiers.carbon | 4 - .../testdata/class/virtual_modifiers.carbon | 11 - toolchain/check/testdata/const/basic.carbon | 22 +- .../check/testdata/const/collapse.carbon | 12 +- .../check/testdata/const/fail_collapse.carbon | 14 +- toolchain/check/testdata/const/import.carbon | 15 - toolchain/check/testdata/deduce/array.carbon | 117 ++--- .../check/testdata/deduce/generic_type.carbon | 96 ++-- .../check/testdata/deduce/int_float.carbon | 64 +-- toolchain/check/testdata/deduce/tuple.carbon | 122 ++--- .../testdata/deduce/type_operator.carbon | 68 +-- .../check/testdata/eval/aggregate.carbon | 21 - .../check/testdata/eval/fail_aggregate.carbon | 4 - .../check/testdata/eval/fail_symbolic.carbon | 24 +- toolchain/check/testdata/eval/symbolic.carbon | 34 +- .../expr_category/in_place_tuple_init.carbon | 10 +- .../testdata/function/builtin/call.carbon | 58 +-- .../function/builtin/definition.carbon | 12 +- .../function/builtin/fail_redefined.carbon | 72 ++- .../testdata/function/builtin/method.carbon | 84 +--- .../builtin/no_prelude/adapted_type.carbon | 13 +- .../no_prelude/call_from_operator.carbon | 103 ++--- .../function/builtin/no_prelude/import.carbon | 85 ++-- .../function/call/fail_not_callable.carbon | 2 - .../function/call/fail_param_count.carbon | 18 +- .../function/call/fail_param_type.carbon | 6 +- .../call/fail_return_type_mismatch.carbon | 2 - .../check/testdata/function/call/i32.carbon | 8 +- .../function/call/more_param_ir.carbon | 17 +- .../function/call/no_prelude/alias.carbon | 2 - .../call/no_prelude/empty_struct.carbon | 6 +- .../call/no_prelude/empty_tuple.carbon | 6 +- .../fail_explicit_self_param.carbon | 6 +- .../fail_runtime_implicit_param.carbon | 5 +- .../call/no_prelude/return_implicit.carbon | 2 - .../testdata/function/call/params_one.carbon | 6 +- .../function/call/params_one_comma.carbon | 6 +- .../testdata/function/call/params_two.carbon | 12 +- .../function/call/params_two_comma.carbon | 12 +- .../declaration/fail_param_in_type.carbon | 16 +- .../declaration/fail_param_redecl.carbon | 12 +- .../function/declaration/import.carbon | 119 ++--- .../declaration/no_prelude/export_name.carbon | 2 - .../declaration/no_prelude/extern.carbon | 4 +- .../declaration/no_prelude/fail_redecl.carbon | 21 +- .../no_prelude/fail_todo_no_params.carbon | 2 - .../no_prelude/name_poisoning.carbon | 23 +- .../declaration/param_same_name.carbon | 12 +- .../function/definition/import.carbon | 29 +- .../function/definition/import_access.carbon | 18 - .../definition/no_prelude/basics.carbon | 2 +- .../fail_decl_param_mismatch.carbon | 18 +- .../definition/no_prelude/fail_redef.carbon | 3 - .../no_prelude/syntactic_merge.carbon | 58 +-- .../function/definition/params_one.carbon | 6 +- .../definition/params_one_comma.carbon | 6 +- .../function/definition/params_two.carbon | 12 +- .../definition/params_two_comma.carbon | 12 +- .../testdata/function/generic/deduce.carbon | 82 ++-- .../generic/fail_todo_param_in_type.carbon | 30 +- .../function/generic/no_prelude/call.carbon | 24 +- .../fail_type_param_mismatch.carbon | 15 +- .../no_prelude/indirect_generic_type.carbon | 8 +- .../generic/no_prelude/type_param.carbon | 15 +- .../no_prelude/type_param_scope.carbon | 3 +- .../function/generic/resolve_used.carbon | 29 +- .../function/generic/return_slot.carbon | 15 +- .../function/generic/undefined.carbon | 8 +- .../testdata/generic/complete_type.carbon | 11 +- .../check/testdata/global/class_obj.carbon | 1 - .../testdata/global/class_with_fun.carbon | 1 - toolchain/check/testdata/global/decl.carbon | 2 - .../check/testdata/global/simple_init.carbon | 2 - .../testdata/global/simple_with_fun.carbon | 2 - toolchain/check/testdata/if/else.carbon | 8 +- .../if/fail_reachable_fallthrough.carbon | 24 +- toolchain/check/testdata/if/fail_scope.carbon | 14 +- toolchain/check/testdata/if/no_else.carbon | 8 +- .../if/unreachable_fallthrough.carbon | 8 +- toolchain/check/testdata/if_expr/basic.carbon | 24 +- .../if_expr/constant_condition.carbon | 77 +--- .../testdata/if_expr/control_flow.carbon | 8 +- .../if_expr/fail_not_in_function.carbon | 64 ++- .../if_expr/fail_partial_constant.carbon | 57 +-- .../check/testdata/if_expr/nested.carbon | 24 +- .../check/testdata/if_expr/struct.carbon | 25 +- toolchain/check/testdata/impl/compound.carbon | 42 +- .../check/testdata/impl/extend_impl.carbon | 2 +- .../testdata/impl/extend_impl_generic.carbon | 28 +- .../testdata/impl/fail_call_invalid.carbon | 16 +- .../impl/fail_extend_impl_forall.carbon | 4 +- .../fail_extend_undefined_interface.carbon | 2 +- .../impl/fail_impl_bad_assoc_fn.carbon | 174 +++++--- .../impl/fail_self_type_mismatch.carbon | 20 +- toolchain/check/testdata/impl/impl_as.carbon | 1 - .../check/testdata/impl/lookup/alias.carbon | 2 +- .../lookup/fail_alias_impl_not_found.carbon | 2 +- .../check/testdata/impl/lookup/generic.carbon | 46 +- .../impl/lookup/instance_method.carbon | 12 +- .../impl/lookup/no_prelude/impl_forall.carbon | 31 +- .../impl/lookup/no_prelude/import.carbon | 51 +-- .../lookup/no_prelude/specific_args.carbon | 14 +- .../testdata/impl/multiple_extend.carbon | 10 +- .../no_prelude/generic_redeclaration.carbon | 20 +- .../no_prelude/import_builtin_call.carbon | 148 ++++--- .../impl/no_prelude/import_extend_impl.carbon | 2 +- .../impl/no_prelude/import_self.carbon | 32 +- .../impl/no_prelude/import_use_generic.carbon | 4 - .../impl/no_prelude/interface_args.carbon | 10 +- .../impl/no_prelude/self_in_signature.carbon | 86 ++-- .../index/array_element_access.carbon | 10 - .../check/testdata/index/expr_category.carbon | 55 +-- .../index/fail_array_large_index.carbon | 8 - .../index/fail_array_non_int_indexing.carbon | 6 - .../fail_array_out_of_bound_access.carbon | 6 - .../testdata/index/fail_expr_category.carbon | 24 +- .../testdata/index/fail_invalid_base.carbon | 8 - .../testdata/index/fail_name_not_found.carbon | 2 - .../index/fail_negative_indexing.carbon | 6 - .../testdata/interface/assoc_const.carbon | 2 - .../fail_todo_assoc_const_default.carbon | 2 - .../fail_todo_define_default_fn_inline.carbon | 12 +- ..._todo_define_default_fn_out_of_line.carbon | 40 +- .../testdata/interface/member_lookup.carbon | 38 +- .../interface/no_prelude/as_type.carbon | 2 +- .../no_prelude/as_type_of_type.carbon | 13 +- .../interface/no_prelude/default_fn.carbon | 1 - .../interface/no_prelude/export_name.carbon | 2 +- .../fail_assoc_const_not_constant.carbon | 2 - .../no_prelude/fail_duplicate.carbon | 8 +- .../fail_generic_redeclaration.carbon | 6 +- .../fail_lookup_in_type_type.carbon | 8 - .../no_prelude/fail_member_lookup.carbon | 7 +- .../no_prelude/fail_modifiers.carbon | 16 +- .../no_prelude/fail_todo_facet_lookup.carbon | 12 +- .../fail_todo_generic_default_fn.carbon | 20 +- .../interface/no_prelude/generic.carbon | 34 +- .../interface/no_prelude/import.carbon | 10 +- .../interface/no_prelude/import_access.carbon | 38 +- .../testdata/interface/no_prelude/self.carbon | 8 +- .../no_prelude/syntactic_merge.carbon | 58 +-- .../interface/todo_define_not_default.carbon | 14 +- .../ir/duplicate_name_same_line.carbon | 4 - .../testdata/let/compile_time_bindings.carbon | 72 +-- toolchain/check/testdata/let/convert.carbon | 21 +- .../testdata/let/fail_duplicate_decl.carbon | 4 - .../check/testdata/let/fail_generic.carbon | 7 +- .../testdata/let/fail_generic_import.carbon | 1 - .../testdata/let/fail_missing_value.carbon | 4 - .../check/testdata/let/fail_modifiers.carbon | 16 - .../testdata/let/fail_use_in_init.carbon | 2 - toolchain/check/testdata/let/generic.carbon | 3 - .../check/testdata/let/generic_import.carbon | 3 - toolchain/check/testdata/let/global.carbon | 2 - toolchain/check/testdata/let/local.carbon | 8 +- .../testdata/let/no_prelude/import.carbon | 8 - .../let/no_prelude/import_access.carbon | 8 - .../check/testdata/let/shadowed_decl.carbon | 8 +- .../testdata/namespace/add_to_import.carbon | 2 - .../testdata/namespace/fail_duplicate.carbon | 3 - .../testdata/namespace/fail_params.carbon | 8 +- .../check/testdata/namespace/imported.carbon | 8 - .../namespace/imported_indirect.carbon | 2 - .../merging_with_indirections.carbon | 10 - .../check/testdata/namespace/shadow.carbon | 6 +- .../testdata/operators/builtin/and.carbon | 137 +----- .../operators/builtin/assignment.carbon | 17 - .../fail_and_or_not_in_function.carbon | 98 +++- .../fail_and_or_partial_constant.carbon | 124 +----- .../fail_assignment_to_non_assignable.carbon | 4 - .../fail_redundant_compound_access.carbon | 2 - .../builtin/fail_type_mismatch.carbon | 5 - .../fail_type_mismatch_assignment.carbon | 2 - .../testdata/operators/builtin/or.carbon | 155 +------ .../operators/builtin/unary_op.carbon | 52 +-- .../testdata/operators/overloaded/add.carbon | 26 +- .../operators/overloaded/bit_and.carbon | 26 +- .../overloaded/bit_complement.carbon | 4 +- .../operators/overloaded/bit_or.carbon | 26 +- .../operators/overloaded/bit_xor.carbon | 26 +- .../testdata/operators/overloaded/dec.carbon | 9 +- .../testdata/operators/overloaded/div.carbon | 26 +- .../testdata/operators/overloaded/eq.carbon | 40 +- .../overloaded/fail_assign_non_ref.carbon | 24 +- .../operators/overloaded/fail_no_impl.carbon | 9 +- .../overloaded/fail_no_impl_for_arg.carbon | 21 +- .../operators/overloaded/implicit_as.carbon | 18 +- .../testdata/operators/overloaded/inc.carbon | 9 +- .../operators/overloaded/index.carbon | 32 +- .../operators/overloaded/left_shift.carbon | 26 +- .../testdata/operators/overloaded/mod.carbon | 26 +- .../testdata/operators/overloaded/mul.carbon | 26 +- .../operators/overloaded/negate.carbon | 4 +- .../overloaded/no_prelude/index.carbon | 20 +- .../operators/overloaded/ordered.carbon | 48 +- .../operators/overloaded/right_shift.carbon | 26 +- .../testdata/operators/overloaded/sub.carbon | 26 +- .../package_expr/fail_not_found.carbon | 2 - .../check/testdata/package_expr/syntax.carbon | 10 - .../fail_conflict_no_namespaces.carbon | 2 - .../packages/fail_import_type_error.carbon | 15 - .../fail_name_with_import_failure.carbon | 2 - .../packages/implicit_imports_prelude.carbon | 4 - .../testdata/packages/loaded_global.carbon | 8 - .../no_prelude/cross_package_export.carbon | 27 +- .../no_prelude/cross_package_import.carbon | 6 +- .../packages/no_prelude/export_import.carbon | 16 +- .../packages/no_prelude/export_mixed.carbon | 19 +- .../packages/no_prelude/export_name.carbon | 33 +- .../no_prelude/fail_export_name_member.carbon | 6 +- .../implicit_imports_entities.carbon | 15 - .../no_prelude/missing_prelude.carbon | 20 +- .../testdata/pointer/address_of_deref.carbon | 6 +- .../testdata/pointer/address_of_lvalue.carbon | 30 -- toolchain/check/testdata/pointer/arrow.carbon | 10 +- toolchain/check/testdata/pointer/basic.carbon | 9 +- .../pointer/fail_address_of_value.carbon | 9 +- .../testdata/pointer/fail_deref_error.carbon | 4 - .../pointer/fail_deref_not_pointer.carbon | 6 +- .../testdata/pointer/fail_deref_type.carbon | 9 - .../pointer/fail_type_mismatch.carbon | 10 +- .../check/testdata/pointer/import.carbon | 8 - .../testdata/pointer/nested_const.carbon | 16 +- toolchain/check/testdata/pointer/types.carbon | 18 +- .../return/code_after_return_value.carbon | 8 +- .../fail_return_with_returned_var.carbon | 13 +- .../fail_returned_var_no_return_type.carbon | 6 +- .../return/fail_returned_var_shadow.carbon | 16 +- .../return/fail_returned_var_type.carbon | 7 - .../no_prelude/import_convert_function.carbon | 74 ++-- .../check/testdata/return/returned_var.carbon | 13 +- .../testdata/return/returned_var_scope.carbon | 24 +- .../testdata/struct/fail_assign_empty.carbon | 3 - .../struct/fail_assign_to_empty.carbon | 2 - .../struct/fail_duplicate_name.carbon | 14 - .../struct/fail_field_name_mismatch.carbon | 6 - .../struct/fail_field_type_mismatch.carbon | 3 - .../struct/fail_member_access_type.carbon | 10 - .../struct/fail_non_member_access.carbon | 5 - .../struct/fail_too_few_values.carbon | 5 - .../testdata/struct/fail_type_assign.carbon | 3 - .../testdata/struct/fail_value_as_type.carbon | 5 - toolchain/check/testdata/struct/import.carbon | 113 +---- .../testdata/struct/member_access.carbon | 14 - .../struct/nested_struct_in_place.carbon | 17 - .../testdata/struct/no_prelude/empty.carbon | 4 - .../no_prelude/fail_assign_nested.carbon | 3 - .../no_prelude/fail_nested_incomplete.carbon | 5 - .../check/testdata/struct/one_entry.carbon | 6 - .../testdata/struct/partially_const.carbon | 6 +- .../testdata/struct/reorder_fields.carbon | 28 +- .../testdata/struct/tuple_as_element.carbon | 15 - .../check/testdata/struct/two_entries.carbon | 20 - .../tuple/access/element_access.carbon | 11 - .../tuple/access/fail_access_error.carbon | 9 - .../tuple/access/fail_large_index.carbon | 13 - .../access/fail_negative_indexing.carbon | 9 - .../access/fail_non_deterministic_type.carbon | 11 - .../tuple/access/fail_non_int_indexing.carbon | 9 - .../tuple/access/fail_non_tuple_access.carbon | 6 - .../access/fail_out_of_bound_access.carbon | 9 - .../fail_out_of_bound_not_literal.carbon | 9 - .../tuple/access/index_not_literal.carbon | 17 - .../testdata/tuple/fail_assign_nested.carbon | 16 - .../tuple/fail_element_type_mismatch.carbon | 7 - .../tuple/fail_nested_incomplete.carbon | 11 - .../tuple/fail_too_few_element.carbon | 7 - .../testdata/tuple/fail_type_assign.carbon | 4 - .../testdata/tuple/fail_value_as_type.carbon | 5 - toolchain/check/testdata/tuple/import.carbon | 136 +----- .../check/testdata/tuple/nested_tuple.carbon | 12 - .../tuple/nested_tuple_in_place.carbon | 34 -- .../testdata/tuple/no_prelude/empty.carbon | 4 - .../tuple/no_prelude/fail_assign_empty.carbon | 4 - .../no_prelude/fail_assign_to_empty.carbon | 2 - .../check/testdata/tuple/one_element.carbon | 9 - .../check/testdata/tuple/two_elements.carbon | 25 -- .../testdata/var/fail_not_copyable.carbon | 3 +- .../var/fail_storage_is_literal.carbon | 4 +- .../var/fail_todo_control_flow_init.carbon | 40 +- .../check/testdata/var/no_prelude/decl.carbon | 2 - .../var/no_prelude/decl_with_init.carbon | 2 - .../var/no_prelude/export_name.carbon | 4 - .../var/no_prelude/fail_duplicate_decl.carbon | 4 - .../var/no_prelude/fail_generic.carbon | 2 - .../no_prelude/fail_init_type_mismatch.carbon | 2 - .../var/no_prelude/fail_init_with_self.carbon | 2 - .../fail_lookup_outside_scope.carbon | 4 - .../var/no_prelude/fail_modifiers.carbon | 8 - .../no_prelude/fail_namespace_conflict.carbon | 4 - .../var/no_prelude/global_decl.carbon | 3 - .../no_prelude/global_decl_with_init.carbon | 3 - .../var/no_prelude/global_lookup.carbon | 6 - .../no_prelude/global_lookup_in_scope.carbon | 6 - .../testdata/var/no_prelude/import.carbon | 4 - .../var/no_prelude/import_access.carbon | 8 - .../testdata/var/no_prelude/lookup.carbon | 2 - .../testdata/var/no_prelude/shadowing.carbon | 6 - .../testdata/where_expr/constraints.carbon | 158 ++++--- .../testdata/where_expr/designator.carbon | 72 +-- .../testdata/where_expr/dot_self_index.carbon | 64 +-- .../testdata/where_expr/equal_rewrite.carbon | 418 ++++++++---------- .../testdata/where_expr/fail_not_facet.carbon | 43 +- .../testdata/where_expr/non_generic.carbon | 24 +- toolchain/sem_ir/file.h | 26 ++ toolchain/sem_ir/id_kind.h | 2 +- toolchain/sem_ir/ids.h | 15 + toolchain/sem_ir/yaml_test.cpp | 4 +- 504 files changed, 5699 insertions(+), 8719 deletions(-) diff --git a/toolchain/check/context.cpp b/toolchain/check/context.cpp index 03d70ad8df1d..a0d7d9bd744e 100644 --- a/toolchain/check/context.cpp +++ b/toolchain/check/context.cpp @@ -768,6 +768,7 @@ auto Context::AddConvergenceBlockAndPush(Parse::NodeId node_id, int num_blocks) inst_block_stack().Pop(); } inst_block_stack().Push(new_block_id); + AddToRegion(new_block_id, node_id); } auto Context::AddConvergenceBlockWithArgAndPush( @@ -787,6 +788,7 @@ auto Context::AddConvergenceBlockWithArgAndPush( inst_block_stack().Pop(); } inst_block_stack().Push(new_block_id); + AddToRegion(new_block_id, node_id); // Acquire the result value. SemIR::TypeId result_type_id = insts().Get(*block_args.begin()).type_id(); @@ -823,30 +825,90 @@ auto Context::SetBlockArgResultBeforeConstantUse(SemIR::InstId select_id, } } -auto Context::AddCurrentCodeBlockToFunction(Parse::NodeId node_id) -> void { - CARBON_CHECK(!inst_block_stack().empty(), "no current code block"); - - if (return_scope_stack().empty()) { - CARBON_CHECK(node_id.is_valid(), - "No current function, but node_id not provided"); - TODO(node_id, +auto Context::AddToRegion(SemIR::InstBlockId block_id, SemIR::LocId loc_id) + -> void { + if (region_stack_.empty()) { + TODO(loc_id, "Control flow expressions are currently only supported inside " "functions."); return; } - - if (!inst_block_stack().is_current_block_reachable()) { - // Don't include unreachable blocks in the function. + if (block_id == SemIR::InstBlockId::Unreachable) { return; } - auto function_id = - insts() - .GetAs(return_scope_stack().back().decl_id) - .function_id; - functions() - .Get(function_id) - .body_block_ids.push_back(inst_block_stack().PeekOrAdd()); + region_stack_.AppendToTop(block_id); +} + +auto Context::BeginSubpattern() -> void { + inst_block_stack().Push(); + PushRegion(inst_block_stack().PeekOrAdd()); +} + +auto Context::EndSubpatternAsExpr(SemIR::InstId result_id) + -> SemIR::ExprRegionId { + if (region_stack_.PeekArray().size() > 1) { + // End the exit block with a branch to a successor block, whose contents + // will be determined later. + AddInst(SemIR::LocIdAndInst::NoLoc( + {.target_id = inst_blocks().AddDefaultValue()})); + } else { + // This single-block region will be inserted as a SpliceBlock, so we don't + // need control flow out of it. + } + auto block_id = inst_block_stack().Pop(); + CARBON_CHECK(block_id == region_stack_.PeekArray().back()); + + // TODO: Is it possible to validate that this region is genuinely + // single-entry, single-exit? + return sem_ir().expr_regions().Add( + {.block_ids = PopRegion(), .result_id = result_id}); +} + +auto Context::EndSubpatternAsEmpty() -> void { + auto block_id = inst_block_stack().Pop(); + CARBON_CHECK(block_id == region_stack_.PeekArray().front()); + CARBON_CHECK(inst_blocks().Get(block_id).empty()); + region_stack_.PopArray(); +} + +auto Context::InsertHere(SemIR::ExprRegionId region_id) -> SemIR::InstId { + auto region = sem_ir_->expr_regions().Get(region_id); + auto loc_id = insts().GetLocId(region.result_id); + auto exit_block = inst_blocks().Get(region.block_ids.back()); + if (region.block_ids.size() == 1) { + // TODO: Is it possible to avoid leaving an "orphan" block in the IR in the + // first two cases? + if (exit_block.size() == 0) { + return region.result_id; + } + if (exit_block.size() == 1) { + inst_block_stack_.AddInstId(exit_block.front()); + return region.result_id; + } + return AddInst( + loc_id, {.type_id = insts().Get(region.result_id).type_id(), + .block_id = region.block_ids.front(), + .result_id = region.result_id}); + } + if (region_stack_.empty()) { + TODO(loc_id, + "Control flow expressions are currently only supported inside " + "functions."); + return SemIR::ErrorInst::SingletonInstId; + } + AddInst(SemIR::LocIdAndInst::NoLoc( + {.target_id = region.block_ids.front()})); + inst_block_stack_.Pop(); + // TODO: this will cumulatively cost O(MN) running time for M blocks + // at the Nth level of the stack. Figure out how to do better. + region_stack_.AppendToTop(region.block_ids); + auto resume_with_block_id = + insts().GetAs(exit_block.back()).target_id; + CARBON_CHECK(inst_blocks().GetOrEmpty(resume_with_block_id).empty()); + inst_block_stack_.Push(resume_with_block_id); + AddToRegion(resume_with_block_id, loc_id); + return region.result_id; } auto Context::is_current_position_reachable() -> bool { diff --git a/toolchain/check/context.h b/toolchain/check/context.h index 7f24d004eca9..2af3fc1efc6f 100644 --- a/toolchain/check/context.h +++ b/toolchain/check/context.h @@ -148,6 +148,8 @@ class Context { // Adds an instruction to the current pattern block, returning the produced // ID. + // TODO: Is it possible to remove this and pattern_block_stack, now that + // we have BeginSubpattern etc. instead? auto AddPatternInst(SemIR::LocIdAndInst loc_id_and_inst) -> SemIR::InstId { auto inst_id = AddInstInNoBlock(loc_id_and_inst); pattern_block_stack_.AddInstId(inst_id); @@ -276,6 +278,27 @@ class Context { return scope_stack().GetCurrentScopeAs(sem_ir()); } + // Mark the start of a new single-entry region with the given entry block. + auto PushRegion(SemIR::InstBlockId entry_block_id) -> void { + region_stack_.PushArray(); + region_stack_.AppendToTop(entry_block_id); + } + + // Add `block_id` to the most recently pushed single-entry region. To preserve + // the single-entry property, `block_id` must not be directly reachable from + // any block outside the region. To ensure the region's blocks are in lexical + // order, this should be called when the first parse node associated with this + // block is handled, or as close as possible. + auto AddToRegion(SemIR::InstBlockId block_id, SemIR::LocId loc_id) -> void; + + // Complete creation of the most recently pushed single-entry region, and + // return a list of its blocks. + auto PopRegion() -> llvm::SmallVector { + llvm::SmallVector result(region_stack_.PeekArray()); + region_stack_.PopArray(); + return result; + } + // Adds a `Branch` instruction branching to a new instruction block, and // returns the ID of the new block. All paths to the branch target must go // through the current block, though not necessarily through this branch. @@ -297,16 +320,18 @@ class Context { // Handles recovergence of control flow. Adds branches from the top // `num_blocks` on the instruction block stack to a new block, pops the - // existing blocks, and pushes the new block onto the instruction block stack. + // existing blocks, pushes the new block onto the instruction block stack, + // and adds it to the most recently pushed region. auto AddConvergenceBlockAndPush(Parse::NodeId node_id, int num_blocks) -> void; // Handles recovergence of control flow with a result value. Adds branches // from the top few blocks on the instruction block stack to a new block, pops - // the existing blocks, and pushes the new block onto the instruction block - // stack. The number of blocks popped is the size of `block_args`, and the - // corresponding result values are the elements of `block_args`. Returns an - // instruction referring to the result value. + // the existing blocks, pushes the new block onto the instruction block + // stack, and adds it to the most recently pushed region. The number of blocks + // popped is the size of `block_args`, and the corresponding result values are + // the elements of `block_args`. Returns an instruction referring to the + // result value. auto AddConvergenceBlockWithArgAndPush( Parse::NodeId node_id, std::initializer_list block_args) -> SemIR::InstId; @@ -322,13 +347,6 @@ class Context { SemIR::InstId if_true, SemIR::InstId if_false) -> void; - // Add the current code block to the enclosing function. - // TODO: The node_id is taken for expressions, which can occur in - // non-function contexts. This should be refactored to support non-function - // contexts, and node_id removed. - auto AddCurrentCodeBlockToFunction( - Parse::NodeId node_id = Parse::NodeId::Invalid) -> void; - // Returns whether the current position in the current block is reachable. auto is_current_position_reachable() -> bool; @@ -619,12 +637,46 @@ class Context { auto global_init() -> GlobalInit& { return global_init_; } + // Marks the start of a region of insts in a pattern context that might + // represent an expression or a pattern. + auto BeginSubpattern() -> void; + + // Ends a region started by BeginSubpattern (in stack order), treating it as + // an expression with the given result, and returns the ID of the region. The + // region will not yet have any control-flow edges into or out of it. + auto EndSubpatternAsExpr(SemIR::InstId result_id) -> SemIR::ExprRegionId; + + // Ends a region started by BeginSubpattern (in stack order), asserting that + // it was empty. + auto EndSubpatternAsEmpty() -> void; + + // TODO: Add EndSubpatternAsPattern, when needed. + + // Inserts the given region into the current code block. If the region + // consists of a single block, this will be implemented as a `splice_block` + // inst. Otherwise, this will end the current block with a branch to the entry + // block of the region, and add future insts to a new block which is the + // immediate successor of the region's exit block. As a result, this cannot be + // called more than once for the same region. + auto InsertHere(SemIR::ExprRegionId region_id) -> SemIR::InstId; + auto import_ref_ids() -> llvm::SmallVector& { return import_ref_ids_; } - auto bind_name_cache() -> Map& { - return bind_name_cache_; + // Map from an AnyBindingPattern inst to precomputed parts of the + // pattern-match SemIR for it. + // + // TODO: Consider putting this behind a narrower API to guard against emitting + // multiple times. + struct BindingPatternInfo { + // The corresponding AnyBindName inst. + SemIR::InstId bind_name_id; + // The region of insts that computes the type of the binding. + SemIR::ExprRegionId type_expr_id; + }; + auto bind_name_map() -> Map& { + return bind_name_map_; } private: @@ -738,10 +790,10 @@ class Context { // FinalizeImportRefBlock() will produce an inst block for them. llvm::SmallVector import_ref_ids_; - // Cache of allocated AnyBindName insts, keyed by the entity names they refer - // to. These are allocated while generating the pattern IR, but are emitted - // later as part of the pattern-match IR. - Map bind_name_cache_; + Map bind_name_map_; + + // Stack of single-entry regions being built. + ArrayStack region_stack_; }; } // namespace Carbon::Check diff --git a/toolchain/check/handle_binding_pattern.cpp b/toolchain/check/handle_binding_pattern.cpp index dba8505115c3..92dd1d366429 100644 --- a/toolchain/check/handle_binding_pattern.cpp +++ b/toolchain/check/handle_binding_pattern.cpp @@ -20,6 +20,9 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id, // TODO: Handle `_` bindings. + SemIR::ExprRegionId type_expr_region_id = + context.EndSubpatternAsExpr(cast_type_inst_id); + // Every other kind of pattern binding has a name. auto [name_node, name_id] = context.node_stack().PopNameWithNodeId(); @@ -212,10 +215,6 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id, context.AddNameToLookup(name_id, bind_id); auto entity_name_id = context.insts().GetAs(bind_id).entity_name_id; - bool inserted = context.bind_name_cache() - .Insert(entity_name_id, bind_id) - .is_inserted(); - CARBON_CHECK(inserted); auto pattern_inst_id = SemIR::InstId::Invalid; if (is_generic) { pattern_inst_id = @@ -227,6 +226,12 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id, name_node, {.type_id = cast_type_id, .entity_name_id = entity_name_id}); } + bool inserted = + context.bind_name_map() + .Insert(pattern_inst_id, {.bind_name_id = bind_id, + .type_expr_id = type_expr_region_id}) + .is_inserted(); + CARBON_CHECK(inserted); param_pattern_id = context.AddPatternInst( node_id, { diff --git a/toolchain/check/handle_function.cpp b/toolchain/check/handle_function.cpp index 92083bd7e5f6..0c8cd63b7646 100644 --- a/toolchain/check/handle_function.cpp +++ b/toolchain/check/handle_function.cpp @@ -378,9 +378,9 @@ static auto HandleFunctionDefinitionAfterSignature( // Create the function scope and the entry block. context.return_scope_stack().push_back({.decl_id = decl_id}); context.inst_block_stack().Push(); + context.PushRegion(context.inst_block_stack().PeekOrAdd()); context.scope_stack().Push(decl_id); StartGenericDefinition(context); - context.AddCurrentCodeBlockToFunction(); CheckFunctionDefinitionSignature(context, function); @@ -441,8 +441,10 @@ auto HandleParseNode(Context& context, Parse::FunctionDefinitionId node_id) context.return_scope_stack().pop_back(); context.decl_name_stack().PopScope(); - // If this is a generic function, collect information about the definition. auto& function = context.functions().Get(function_id); + function.body_block_ids = context.PopRegion(); + + // If this is a generic function, collect information about the definition. FinishGenericDefinition(context, function.generic_id); return true; diff --git a/toolchain/check/handle_if_expr.cpp b/toolchain/check/handle_if_expr.cpp index 7c8f1415cd09..e1e45ded96b9 100644 --- a/toolchain/check/handle_if_expr.cpp +++ b/toolchain/check/handle_if_expr.cpp @@ -25,7 +25,7 @@ auto HandleParseNode(Context& context, Parse::IfExprIfId node_id) -> bool { // Start emitting the `then` block. context.inst_block_stack().Pop(); context.inst_block_stack().Push(then_block_id); - context.AddCurrentCodeBlockToFunction(node_id); + context.AddToRegion(then_block_id, node_id); context.node_stack().Push(if_node, else_block_id); return true; @@ -56,13 +56,18 @@ auto HandleParseNode(Context& context, Parse::IfExprThenId node_id) -> bool { // Start emitting the `else` block. context.inst_block_stack().Push(else_block_id); - context.AddCurrentCodeBlockToFunction(node_id); + context.AddToRegion(else_block_id, node_id); context.node_stack().Push(node_id, then_value_id); return true; } auto HandleParseNode(Context& context, Parse::IfExprElseId node_id) -> bool { + if (context.return_scope_stack().empty()) { + context.TODO(node_id, + "Control flow expressions are currently only supported inside " + "functions."); + } // Alias node_id for if/then/else consistency. auto& else_node = node_id; @@ -84,7 +89,6 @@ auto HandleParseNode(Context& context, Parse::IfExprElseId node_id) -> bool { if_node, {else_value_id, then_value_id}); context.SetBlockArgResultBeforeConstantUse(chosen_value_id, cond_value_id, then_value_id, else_value_id); - context.AddCurrentCodeBlockToFunction(node_id); // Push the result value. context.node_stack().Push(else_node, chosen_value_id); diff --git a/toolchain/check/handle_if_statement.cpp b/toolchain/check/handle_if_statement.cpp index f1f034f74614..3f44a382ae62 100644 --- a/toolchain/check/handle_if_statement.cpp +++ b/toolchain/check/handle_if_statement.cpp @@ -28,7 +28,7 @@ auto HandleParseNode(Context& context, Parse::IfConditionId node_id) -> bool { // Start emitting the `then` block. context.inst_block_stack().Pop(); context.inst_block_stack().Push(then_block_id); - context.AddCurrentCodeBlockToFunction(); + context.AddToRegion(then_block_id, node_id); context.node_stack().Push(node_id, else_block_id); return true; @@ -40,7 +40,7 @@ auto HandleParseNode(Context& context, Parse::IfStatementElseId node_id) // Switch to emitting the `else` block. context.inst_block_stack().Push(else_block_id); - context.AddCurrentCodeBlockToFunction(); + context.AddToRegion(else_block_id, node_id); context.node_stack().Push(node_id); return true; @@ -56,6 +56,7 @@ auto HandleParseNode(Context& context, Parse::IfStatementId node_id) -> bool { context.AddInst(node_id, {.target_id = else_block_id}); context.inst_block_stack().Pop(); context.inst_block_stack().Push(else_block_id); + context.AddToRegion(else_block_id, node_id); break; } @@ -72,7 +73,6 @@ auto HandleParseNode(Context& context, Parse::IfStatementId node_id) -> bool { } } - context.AddCurrentCodeBlockToFunction(); return true; } diff --git a/toolchain/check/handle_let_and_var.cpp b/toolchain/check/handle_let_and_var.cpp index ec21542e5ea2..623a482e9fb0 100644 --- a/toolchain/check/handle_let_and_var.cpp +++ b/toolchain/check/handle_let_and_var.cpp @@ -22,6 +22,7 @@ static auto HandleIntroducer(Context& context, Parse::NodeId node_id) -> bool { // Push a bracketing node and pattern block to establish the pattern context. context.node_stack().Push(node_id); context.pattern_block_stack().Push(); + context.BeginSubpattern(); return true; } diff --git a/toolchain/check/handle_loop_statement.cpp b/toolchain/check/handle_loop_statement.cpp index c296eaf6edb2..78c70fd28e93 100644 --- a/toolchain/check/handle_loop_statement.cpp +++ b/toolchain/check/handle_loop_statement.cpp @@ -21,7 +21,7 @@ auto HandleParseNode(Context& context, Parse::WhileConditionStartId node_id) // Start emitting the loop header block. context.inst_block_stack().Push(loop_header_id); - context.AddCurrentCodeBlockToFunction(); + context.AddToRegion(loop_header_id, node_id); context.node_stack().Push(node_id, loop_header_id); return true; @@ -42,7 +42,7 @@ auto HandleParseNode(Context& context, Parse::WhileConditionId node_id) // Start emitting the loop body. context.inst_block_stack().Push(loop_body_id); - context.AddCurrentCodeBlockToFunction(); + context.AddToRegion(loop_body_id, node_id); context.break_continue_stack().push_back( {.break_target = loop_exit_id, .continue_target = loop_header_id}); @@ -64,7 +64,7 @@ auto HandleParseNode(Context& context, Parse::WhileStatementId node_id) // Start emitting the loop exit block. context.inst_block_stack().Push(loop_exit_id); - context.AddCurrentCodeBlockToFunction(); + context.AddToRegion(loop_exit_id, node_id); return true; } diff --git a/toolchain/check/handle_operator.cpp b/toolchain/check/handle_operator.cpp index a5b893eb3a90..090dfab5182e 100644 --- a/toolchain/check/handle_operator.cpp +++ b/toolchain/check/handle_operator.cpp @@ -363,7 +363,7 @@ static auto HandleShortCircuitOperand(Context& context, Parse::NodeId node_id, context.inst_block_stack().Pop(); context.inst_block_stack().Push(end_block_id); context.inst_block_stack().Push(rhs_block_id); - context.AddCurrentCodeBlockToFunction(node_id); + context.AddToRegion(rhs_block_id, node_id); // HandleShortCircuitOperator will follow, and doesn't need the operand on the // node stack. @@ -384,6 +384,11 @@ auto HandleParseNode(Context& context, Parse::ShortCircuitOperandOrId node_id) // occurs during operand handling. static auto HandleShortCircuitOperator(Context& context, Parse::NodeId node_id) -> bool { + if (context.return_scope_stack().empty()) { + context.TODO(node_id, + "Control flow expressions are currently only supported inside " + "functions."); + } auto [rhs_node, rhs_id] = context.node_stack().PopExprWithNodeId(); auto short_circuit_result_id = context.node_stack().PopExpr(); auto branch_value_id = context.node_stack().PopExpr(); @@ -399,7 +404,7 @@ static auto HandleShortCircuitOperator(Context& context, Parse::NodeId node_id) context.AddInst( node_id, {.target_id = resume_block_id, .arg_id = rhs_id}); context.inst_block_stack().Pop(); - context.AddCurrentCodeBlockToFunction(node_id); + context.AddToRegion(context.inst_block_stack().PeekOrAdd(), node_id); // Collect the result from either the first or second operand. auto result_id = context.AddInst( diff --git a/toolchain/check/handle_pattern_list.cpp b/toolchain/check/handle_pattern_list.cpp index 44dbb4a36840..527091fc42ad 100644 --- a/toolchain/check/handle_pattern_list.cpp +++ b/toolchain/check/handle_pattern_list.cpp @@ -11,11 +11,17 @@ auto HandleParseNode(Context& context, Parse::ImplicitParamListStartId node_id) -> bool { context.node_stack().Push(node_id); context.param_and_arg_refs_stack().Push(); + context.BeginSubpattern(); return true; } auto HandleParseNode(Context& context, Parse::ImplicitParamListId node_id) -> bool { + if (context.node_stack().PeekIs()) { + // End the subpattern started by a trailing comma, or the opening delimiter + // of an empty list. + context.EndSubpatternAsEmpty(); + } // Note the Start node remains on the stack, where the param list handler can // make use of it. auto refs_id = context.param_and_arg_refs_stack().EndAndPop( @@ -26,20 +32,32 @@ auto HandleParseNode(Context& context, Parse::ImplicitParamListId node_id) return true; } -auto HandleParseNode(Context& context, Parse::TuplePatternStartId node_id) +static auto HandleTuplePatternStart(Context& context, Parse::NodeId node_id) -> bool { context.node_stack().Push(node_id); context.param_and_arg_refs_stack().Push(); + context.BeginSubpattern(); return true; } +auto HandleParseNode(Context& context, Parse::TuplePatternStartId node_id) + -> bool { + return HandleTuplePatternStart(context, node_id); +} + auto HandleParseNode(Context& context, Parse::PatternListCommaId /*node_id*/) -> bool { context.param_and_arg_refs_stack().ApplyComma(); + context.BeginSubpattern(); return true; } auto HandleParseNode(Context& context, Parse::TuplePatternId node_id) -> bool { + if (context.node_stack().PeekIs(Parse::NodeKind::TuplePatternStart)) { + // End the subpattern started by a trailing comma, or the opening delimiter + // of an empty list. + context.EndSubpatternAsEmpty(); + } // Note the Start node remains on the stack, where the param list handler can // make use of it. auto refs_id = context.param_and_arg_refs_stack().EndAndPop( diff --git a/toolchain/check/pattern_match.cpp b/toolchain/check/pattern_match.cpp index b2b1943a488b..8d1d652e4037 100644 --- a/toolchain/check/pattern_match.cpp +++ b/toolchain/check/pattern_match.cpp @@ -141,12 +141,9 @@ auto MatchContext::EmitPatternMatch(Context& context, case SemIR::BindingPattern::Kind: case SemIR::SymbolicBindingPattern::Kind: { CARBON_CHECK(kind_ == MatchKind::Callee); - auto binding_pattern = pattern.inst.As(); - auto cache_entry = - context.bind_name_cache().Lookup(binding_pattern.entity_name_id); - // The cached bind_name should only be used once. - auto bind_name_id = - std::exchange(cache_entry.value(), SemIR::InstId::Invalid); + auto [bind_name_id, type_expr_id] = + context.bind_name_map().Lookup(entry.pattern_id).value(); + context.InsertHere(type_expr_id); auto bind_name = context.insts().GetAs(bind_name_id); CARBON_CHECK(!bind_name.value_id.is_valid()); bind_name.value_id = entry.scrutinee_id; diff --git a/toolchain/check/testdata/alias/fail_bool_value.carbon b/toolchain/check/testdata/alias/fail_bool_value.carbon index 574ac1f201c0..3828cd96aceb 100644 --- a/toolchain/check/testdata/alias/fail_bool_value.carbon +++ b/toolchain/check/testdata/alias/fail_bool_value.carbon @@ -18,8 +18,6 @@ let a_test: bool = a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %false: bool = bool_literal false [template] -// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -39,9 +37,6 @@ let a_test: bool = a; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] // CHECK:STDOUT: %a: = bind_alias a, [template = ] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc15_13.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc15_13.2: type = converted %bool.make_type, %.loc15_13.1 [template = bool] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/alias/fail_control_flow.carbon b/toolchain/check/testdata/alias/fail_control_flow.carbon index 3ea3107e4a12..3438a16abe4f 100644 --- a/toolchain/check/testdata/alias/fail_control_flow.carbon +++ b/toolchain/check/testdata/alias/fail_control_flow.carbon @@ -8,10 +8,14 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/alias/fail_control_flow.carbon -// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+11]]:11: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+15]]:11: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: alias a = true or false; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: +// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+11]]:11: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: alias a = true or false; +// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: // CHECK:STDERR: fail_control_flow.carbon:[[@LINE+7]]:11: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: alias a = true or false; // CHECK:STDERR: ^~~~~~~~~~~~~ @@ -31,7 +35,7 @@ alias a = true or false; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %.loc22: bool = block_arg [template = constants.%true] +// CHECK:STDOUT: %.loc26: bool = block_arg [template = constants.%true] // CHECK:STDOUT: %a: = bind_alias a, [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon b/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon index 21323fa89c39..e8577e59e76a 100644 --- a/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon +++ b/toolchain/check/testdata/alias/no_prelude/alias_of_alias.carbon @@ -38,7 +38,6 @@ let d: c = {}; // CHECK:STDOUT: %b: type = bind_alias b, %a [template = constants.%C] // CHECK:STDOUT: %b.ref: type = name_ref b, %b [template = constants.%C] // CHECK:STDOUT: %c: type = bind_alias c, %b [template = constants.%C] -// CHECK:STDOUT: %c.ref: type = name_ref c, %c [template = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/alias/no_prelude/export_name.carbon b/toolchain/check/testdata/alias/no_prelude/export_name.carbon index 1aa43c0dd8a6..acd539fd1110 100644 --- a/toolchain/check/testdata/alias/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/alias/no_prelude/export_name.carbon @@ -175,7 +175,6 @@ var d: D* = &c; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %d.var: ref %C = var d // CHECK:STDOUT: %d: ref %C = bind_name d, %d.var // CHECK:STDOUT: } @@ -211,7 +210,6 @@ var d: D* = &c; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: = name_ref C, [template = ] // CHECK:STDOUT: %c.var: ref = var c // CHECK:STDOUT: %c: ref = bind_name c, %c.var // CHECK:STDOUT: } @@ -248,11 +246,8 @@ var d: D* = &c; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %d.var: ref %ptr.2 = var d // CHECK:STDOUT: %d: ref %ptr.2 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon b/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon index 8d476ab00115..1f0107453079 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon @@ -41,10 +41,8 @@ let c_var: c = d; // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %c: type = bind_alias c, %C.decl [template = constants.%C] -// CHECK:STDOUT: %D.ref: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: %d.var: ref %D = var d // CHECK:STDOUT: %d: ref %D = bind_name d, %d.var -// CHECK:STDOUT: %c.ref: type = name_ref c, %c [template = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon b/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon index 606438ed2845..828dfe4bd65a 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon @@ -47,10 +47,8 @@ alias b = C; // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc13: type = bind_alias a, %C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc21: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a.var: ref %C = var a // CHECK:STDOUT: %a.loc21: ref %C = bind_name a, %a.var -// CHECK:STDOUT: %C.ref.loc23: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %b.var: ref %C = var b // CHECK:STDOUT: %b: ref %C = bind_name b, %b.var // CHECK:STDOUT: %C.ref.loc30: type = name_ref C, %C.decl [template = constants.%C] diff --git a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon index c7dcd8eea151..4dc22d5c4e26 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon @@ -36,17 +36,12 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %.loc12_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc12_16.2: init %empty_tuple.type = tuple_init () to %a.var [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc12_17: init %empty_tuple.type = converted %.loc12_16.1, %.loc12_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a.var, %.loc12_17 -// CHECK:STDOUT: %.loc13_11: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc13_12: type = converted %.loc13_11, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %ptr: type = ptr_type %empty_tuple.type [template = constants.%ptr] // CHECK:STDOUT: %b.var: ref %ptr = var b // CHECK:STDOUT: %b: ref %ptr = bind_name b, %b.var // CHECK:STDOUT: %a.ref: ref %empty_tuple.type = name_ref a, %a diff --git a/toolchain/check/testdata/alias/no_prelude/import.carbon b/toolchain/check/testdata/alias/no_prelude/import.carbon index d0cba099d79c..003a1076e07d 100644 --- a/toolchain/check/testdata/alias/no_prelude/import.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import.carbon @@ -82,10 +82,8 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, %C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %c_alias: type = bind_alias c_alias, %C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr] // CHECK:STDOUT: %a.var: ref %ptr = var a // CHECK:STDOUT: %a: ref %ptr = bind_name a, %a.var // CHECK:STDOUT: } @@ -124,10 +122,8 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %c_alias.ref.loc6: type = name_ref c_alias, imports.%import_ref.2 [template = constants.%C] +// CHECK:STDOUT: %c_alias.ref: type = name_ref c_alias, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %c_alias_alias: type = bind_alias c_alias_alias, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %c_alias.ref.loc8: type = name_ref c_alias, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr] // CHECK:STDOUT: %b.var: ref %ptr = var b // CHECK:STDOUT: %b: ref %ptr = bind_name b, %b.var // CHECK:STDOUT: } @@ -161,8 +157,6 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %c_alias_alias.ref: type = name_ref c_alias_alias, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr] // CHECK:STDOUT: %c.var: ref %ptr = var c // CHECK:STDOUT: %c: ref %ptr = bind_name c, %c.var // CHECK:STDOUT: } @@ -185,8 +179,6 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: .a_alias = %a_alias // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %a.ref: ref %empty_tuple.type = name_ref a, %a @@ -224,8 +216,6 @@ var c: () = a_alias_alias; // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %a_alias.ref: ref %empty_tuple.type = name_ref a_alias, imports.%import_ref.2 // CHECK:STDOUT: %a_alias_alias: ref %empty_tuple.type = bind_alias a_alias_alias, imports.%import_ref.2 -// CHECK:STDOUT: %.loc8_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc8_9.2: type = converted %.loc8_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var // CHECK:STDOUT: } @@ -258,8 +248,6 @@ var c: () = a_alias_alias; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %c.var: ref %empty_tuple.type = var c // CHECK:STDOUT: %c: ref %empty_tuple.type = bind_name c, %c.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/alias/no_prelude/import_access.carbon b/toolchain/check/testdata/alias/no_prelude/import_access.carbon index affd369ff6ac..ab4f0474d9c1 100644 --- a/toolchain/check/testdata/alias/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import_access.carbon @@ -102,7 +102,6 @@ var inst: Test.A = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %inst.var: ref %C = var inst // CHECK:STDOUT: %inst: ref %C = bind_name inst, %inst.var // CHECK:STDOUT: } @@ -138,7 +137,6 @@ var inst: Test.A = {}; // CHECK:STDOUT: .inst = %inst // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %A.ref: = name_ref A, [template = ] // CHECK:STDOUT: %inst.var: ref = var inst // CHECK:STDOUT: %inst: ref = bind_name inst, %inst.var // CHECK:STDOUT: } @@ -168,8 +166,6 @@ var inst: Test.A = {}; // CHECK:STDOUT: .inst = %inst // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] -// CHECK:STDOUT: %A.ref: = name_ref A, [template = ] // CHECK:STDOUT: %inst.var: ref = var inst // CHECK:STDOUT: %inst: ref = bind_name inst, %inst.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/alias/no_prelude/import_order.carbon b/toolchain/check/testdata/alias/no_prelude/import_order.carbon index 7eb7f93a8e25..491464378248 100644 --- a/toolchain/check/testdata/alias/no_prelude/import_order.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import_order.carbon @@ -60,14 +60,12 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc4_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_19.2: type = converted %.loc4_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc4_16: %C.elem = field_decl v, element0 [template] +// CHECK:STDOUT: %.loc4: %C.elem = field_decl v, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.v [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .v = %.loc4_16 +// CHECK:STDOUT: .v = %.loc4 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -107,16 +105,12 @@ var a_val: a = {.v = b_val.v}; // CHECK:STDOUT: .a_val = %a_val // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %d.ref: type = name_ref d, imports.%import_ref.5 [template = constants.%C] // CHECK:STDOUT: %d_val.var: ref %C = var d_val // CHECK:STDOUT: %d_val: ref %C = bind_name d_val, %d_val.var -// CHECK:STDOUT: %c.ref: type = name_ref c, imports.%import_ref.4 [template = constants.%C] // CHECK:STDOUT: %c_val.var: ref %C = var c_val // CHECK:STDOUT: %c_val: ref %C = bind_name c_val, %c_val.var -// CHECK:STDOUT: %b.ref: type = name_ref b, imports.%import_ref.3 [template = constants.%C] // CHECK:STDOUT: %b_val.var: ref %C = var b_val // CHECK:STDOUT: %b_val: ref %C = bind_name b_val, %b_val.var -// CHECK:STDOUT: %a.ref: type = name_ref a, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %a_val.var: ref %C = var a_val // CHECK:STDOUT: %a_val: ref %C = bind_name a_val, %a_val.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon b/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon index f80e9da4399d..6bd5845d3260 100644 --- a/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon +++ b/toolchain/check/testdata/alias/no_prelude/in_namespace.carbon @@ -46,8 +46,6 @@ fn F() -> NS.a { // CHECK:STDOUT: } // CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %a: type = bind_alias a, %C.decl [template = constants.%C] -// CHECK:STDOUT: %NS.ref: = name_ref NS, %NS [template = %NS] -// CHECK:STDOUT: %a.ref: type = name_ref a, %a [template = constants.%C] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 @@ -60,14 +58,12 @@ fn F() -> NS.a { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc11_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_19.2: type = converted %.loc11_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_16: %C.elem = field_decl v, element0 [template] +// CHECK:STDOUT: %.loc11: %C.elem = field_decl v, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.v [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .v = %.loc11_16 +// CHECK:STDOUT: .v = %.loc11 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/alias/no_prelude/local.carbon b/toolchain/check/testdata/alias/no_prelude/local.carbon index 00a6e6cfc0fe..10112e19a49d 100644 --- a/toolchain/check/testdata/alias/no_prelude/local.carbon +++ b/toolchain/check/testdata/alias/no_prelude/local.carbon @@ -40,8 +40,6 @@ fn F() -> () { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %.loc12_16.1: %empty_tuple.type = tuple_literal () diff --git a/toolchain/check/testdata/array/array_in_place.carbon b/toolchain/check/testdata/array/array_in_place.carbon index 55fe9f4468aa..2d673a1f555c 100644 --- a/toolchain/check/testdata/array/array_in_place.carbon +++ b/toolchain/check/testdata/array/array_in_place.carbon @@ -69,16 +69,6 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc14_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25.1: %tuple.type.1 = tuple_literal (%i32.loc14_12, %i32.loc14_17, %i32.loc14_22) -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %.loc14_25.2: type = converted %.loc14_25.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %tuple.type.2 [template = constants.%array_type] // CHECK:STDOUT: %v.var: ref %array_type = var v // CHECK:STDOUT: %v: ref %array_type = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14_34: %F.type = name_ref F, file.%F.decl [template = constants.%F] diff --git a/toolchain/check/testdata/array/array_vs_tuple.carbon b/toolchain/check/testdata/array/array_vs_tuple.carbon index 1b616884bac3..ff0cff43ca14 100644 --- a/toolchain/check/testdata/array/array_vs_tuple.carbon +++ b/toolchain/check/testdata/array/array_vs_tuple.carbon @@ -41,7 +41,6 @@ fn G() { // 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: %tuple.type.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, %i32, %i32) [template] // CHECK:STDOUT: %tuple: %tuple.type.3 = tuple_value (%int_1.2, %int_2.2, %int_3.2) [template] // CHECK:STDOUT: } @@ -66,16 +65,12 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// 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: %int_3.loc13_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type: type = array_type %int_3.loc13_16, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: %int_1.loc13_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc13_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int_3.loc13_28: 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_28) +// 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.5, element0 [template = constants.%Convert.10] // 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] @@ -93,24 +88,16 @@ fn G() { // 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.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc13_29.3: = bound_method %int_3.loc13_28, %impl.elem0.loc13_29.3 [template = constants.%Convert.bound.3] +// 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_28) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc13_29.8: init %i32 = converted %int_3.loc13_28, %int.convert_checked.loc13_29.3 [template = constants.%int_3.2] +// 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] +// CHECK:STDOUT: %.loc13_29.8: init %i32 = converted %int_3.loc13, %int.convert_checked.loc13_29.3 [template = constants.%int_3.2] // CHECK:STDOUT: %int_2.loc13_29: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc13_29.9: ref %i32 = array_index %a.var, %int_2.loc13_29 // CHECK:STDOUT: %.loc13_29.10: init %i32 = initialize_from %.loc13_29.8 to %.loc13_29.9 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc13_29.11: init %array_type = array_init (%.loc13_29.4, %.loc13_29.7, %.loc13_29.10) to %a.var [template = constants.%array] // CHECK:STDOUT: %.loc13_30: init %array_type = converted %.loc13_29.1, %.loc13_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc13_30 -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.1: %tuple.type.2 = tuple_literal (%i32.loc14_11, %i32.loc14_16, %i32.loc14_21) -// CHECK:STDOUT: %.loc14_24.2: type = converted %.loc14_24.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %b.var: ref %tuple.type.3 = var b // CHECK:STDOUT: %b: ref %tuple.type.3 = bind_name b, %b.var // CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] diff --git a/toolchain/check/testdata/array/assign_return_value.carbon b/toolchain/check/testdata/array/assign_return_value.carbon index 93be65ea45e9..c58cc909019f 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -86,10 +86,6 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %t.var: ref %array_type = var t // CHECK:STDOUT: %t: ref %array_type = bind_name t, %t.var // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] diff --git a/toolchain/check/testdata/array/assign_var.carbon b/toolchain/check/testdata/array/assign_var.carbon index 5e6e03639d01..45857cf35f66 100644 --- a/toolchain/check/testdata/array/assign_var.carbon +++ b/toolchain/check/testdata/array/assign_var.carbon @@ -16,7 +16,6 @@ var b: [i32; 3] = a; // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %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] @@ -56,20 +55,8 @@ var b: [i32; 3] = a; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_22.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14, %i32.loc11_19) -// CHECK:STDOUT: %.loc11_22.2: type = converted %.loc11_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %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: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.var: ref %array_type = var b // CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/base.carbon b/toolchain/check/testdata/array/base.carbon index 21002ef401a5..8db35a3d1722 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -30,9 +30,6 @@ var c: [(); 5] = ((), (), (), (), (),); // 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] -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %array_type.2: type = array_type %int_2, f64 [template] // CHECK:STDOUT: %float.1: f64 = float_literal 11.100000000000001 [template] @@ -66,24 +63,10 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %array_type.loc11: type = array_type %int_1, %i32 [template = constants.%array_type.1] // CHECK:STDOUT: %a.var: ref %array_type.1 = var a // CHECK:STDOUT: %a: ref %array_type.1 = bind_name a, %a.var -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc12_9.2: type = converted %float.make_type, %.loc12_9.1 [template = f64] -// CHECK:STDOUT: %array_type.loc12: type = array_type %int_2, f64 [template = constants.%array_type.2] // CHECK:STDOUT: %b.var: ref %array_type.2 = var b // CHECK:STDOUT: %b: ref %array_type.2 = bind_name b, %b.var -// CHECK:STDOUT: %.loc13_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] -// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %array_type.loc13: type = array_type %int_5, %empty_tuple.type [template = constants.%array_type.3] // CHECK:STDOUT: %c.var: ref %array_type.3 = var c // CHECK:STDOUT: %c: ref %array_type.3 = bind_name c, %c.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/canonicalize_index.carbon b/toolchain/check/testdata/array/canonicalize_index.carbon index ede43d291df3..3e1d3b1dc518 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -28,7 +28,6 @@ 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.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.5: = interface_witness (%Convert.10) [template] @@ -39,11 +38,6 @@ let c: [i32; ConvertToU32(3)]* = &a; // 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] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -52,12 +46,6 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %Convert.bound.4: = bound_method %int_3.2, %Convert.10 [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: %int_3.3: %u32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.16: type = fn_type @Convert.8, @impl.32(%int_32) [template] -// CHECK:STDOUT: %Convert.16: %Convert.type.16 = struct_value () [template] -// CHECK:STDOUT: %interface.11: = interface_witness (%Convert.16) [template] -// CHECK:STDOUT: %Convert.bound.5: = bound_method %int_3.3, %Convert.16 [template] -// CHECK:STDOUT: %Convert.specific_fn.5: = specific_function %Convert.bound.5, @Convert.8(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -88,15 +76,19 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -107,70 +99,19 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %return.patt: %u32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc12_20: 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: %int_32.loc12_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %i32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc12_20: 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add] -// 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_18: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc14_18: = bound_method %int_1, %impl.elem0.loc14_18 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc14_18: = specific_function %Convert.bound.loc14_18, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc14_18: init %i32 = call %Convert.specific_fn.loc14_18(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc14_18.1: %i32 = value_of_initializer %int.convert_checked.loc14_18 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc14_18.2: %i32 = converted %int_1, %.loc14_18.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc14_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc14_21: = bound_method %int_2, %impl.elem0.loc14_21 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc14_21: = specific_function %Convert.bound.loc14_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc14_21: init %i32 = call %Convert.specific_fn.loc14_21(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc14_21.1: %i32 = value_of_initializer %int.convert_checked.loc14_21 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc14_21.2: %i32 = converted %int_2, %.loc14_21.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_18.2, %.loc14_21.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc14_22: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc14_22: = bound_method %int.sadd, %impl.elem0.loc14_22 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc14_22: = specific_function %Convert.bound.loc14_22, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc14_22.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc14_22.2: %i32 = converted %int.sadd, %.loc14_22.1 [template = constants.%int_3.1] -// CHECK:STDOUT: %int.convert_checked.loc14_22: init Core.IntLiteral = call %Convert.specific_fn.loc14_22(%.loc14_22.2) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc14_22.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_22 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc14_22.4: Core.IntLiteral = converted %int.sadd, %.loc14_22.3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type.loc14: type = array_type %.loc14_22.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3.loc15: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type.loc15: type = array_type %int_3.loc15, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr.loc15: type = ptr_type %array_type [template = constants.%ptr] -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ConvertToU32.ref: %ConvertToU32.type = name_ref ConvertToU32, %ConvertToU32.decl [template = constants.%ConvertToU32] -// CHECK:STDOUT: %int_3.loc16: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc16_27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc16_27: = bound_method %int_3.loc16, %impl.elem0.loc16_27 [template = constants.%Convert.bound.4] -// CHECK:STDOUT: %Convert.specific_fn.loc16_27: = specific_function %Convert.bound.loc16_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] -// CHECK:STDOUT: %int.convert_checked.loc16_27: init %i32 = call %Convert.specific_fn.loc16_27(%int_3.loc16) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc16_27.1: %i32 = value_of_initializer %int.convert_checked.loc16_27 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc16_27.2: %i32 = converted %int_3.loc16, %.loc16_27.1 [template = constants.%int_3.1] -// CHECK:STDOUT: %int.convert_checked.loc16_28.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.2) [template = constants.%int_3.3] -// CHECK:STDOUT: %impl.elem0.loc16_28: %Convert.type.5 = interface_witness_access constants.%interface.11, element0 [template = constants.%Convert.16] -// CHECK:STDOUT: %Convert.bound.loc16_28: = bound_method %int.convert_checked.loc16_28.1, %impl.elem0.loc16_28 [template = constants.%Convert.bound.5] -// CHECK:STDOUT: %Convert.specific_fn.loc16_28: = specific_function %Convert.bound.loc16_28, @Convert.8(constants.%int_32) [template = constants.%Convert.specific_fn.5] -// CHECK:STDOUT: %.loc16_28.1: %u32 = value_of_initializer %int.convert_checked.loc16_28.1 [template = constants.%int_3.3] -// CHECK:STDOUT: %.loc16_28.2: %u32 = converted %int.convert_checked.loc16_28.1, %.loc16_28.1 [template = constants.%int_3.3] -// CHECK:STDOUT: %int.convert_checked.loc16_28.2: init Core.IntLiteral = call %Convert.specific_fn.loc16_28(%.loc16_28.2) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc16_28.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_28.2 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc16_28.4: Core.IntLiteral = converted %int.convert_checked.loc16_28.1, %.loc16_28.3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type.loc16: type = array_type %.loc16_28.4, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr.loc16: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index a262268b7a81..8d73ce7929ea 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -22,22 +22,6 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] // CHECK:STDOUT: %Negate: %Negate.type.1 = 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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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_-1.1: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] -// CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -62,35 +46,17 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %Negate.ref: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc16_21: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc16_21: = bound_method %int_1, %impl.elem0.loc16_21 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc16_21: = specific_function %Convert.bound.loc16_21, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc16_21: init %i32 = call %Convert.specific_fn.loc16_21(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc16_21.1: %i32 = value_of_initializer %int.convert_checked.loc16_21 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc16_21.2: %i32 = converted %int_1, %.loc16_21.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc16_21.2) [template = constants.%int_-1.1] -// CHECK:STDOUT: %impl.elem0.loc16_22: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc16_22: = bound_method %int.snegate, %impl.elem0.loc16_22 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc16_22: = specific_function %Convert.bound.loc16_22, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %.loc16_22.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1] -// CHECK:STDOUT: %.loc16_22.2: %i32 = converted %int.snegate, %.loc16_22.1 [template = constants.%int_-1.1] -// CHECK:STDOUT: %int.convert_checked.loc16_22: init Core.IntLiteral = call %Convert.specific_fn.loc16_22(%.loc16_22.2) [template = constants.%int_-1.2] -// CHECK:STDOUT: %.loc16_22.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_22 [template = constants.%int_-1.2] -// CHECK:STDOUT: %.loc16_22.4: Core.IntLiteral = converted %int.snegate, %.loc16_22.3 [template = constants.%int_-1.2] -// CHECK:STDOUT: %array_type: type = array_type %.loc16_22.4, %i32 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index 4c2a086cf683..3566457a3c17 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -25,10 +25,6 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: --- fail_bound_overflow.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %int_39999999999999999993: Core.IntLiteral = int_value 39999999999999999993 [template] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -47,16 +43,8 @@ var b: [1; 39999999999999999993]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %int_39999999999999999993.loc15: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%int_39999999999999999993] -// CHECK:STDOUT: %array_type.loc15: type = array_type %int_39999999999999999993.loc15, %i32 [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %int_39999999999999999993.loc23: Core.IntLiteral = int_value 39999999999999999993 [template = constants.%int_39999999999999999993] -// CHECK:STDOUT: %.loc23: type = converted %int_1, [template = ] -// CHECK:STDOUT: %array_type.loc23: type = array_type %int_39999999999999999993.loc23, [template = ] // CHECK:STDOUT: %b.var: ref = var b // CHECK:STDOUT: %b: ref = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_incomplete_element.carbon b/toolchain/check/testdata/array/fail_incomplete_element.carbon index 1d71e7496c87..646553e5fc29 100644 --- a/toolchain/check/testdata/array/fail_incomplete_element.carbon +++ b/toolchain/check/testdata/array/fail_incomplete_element.carbon @@ -24,8 +24,6 @@ var p: Incomplete* = &a[0]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %Incomplete [template] // CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template] // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } @@ -46,13 +44,8 @@ var p: Incomplete* = &a[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} -// CHECK:STDOUT: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %Incomplete [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var -// CHECK:STDOUT: %Incomplete.ref.loc21: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template = constants.%ptr] // CHECK:STDOUT: %p.var: ref %ptr = var p // CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_invalid_type.carbon b/toolchain/check/testdata/array/fail_invalid_type.carbon index ebd146e51f09..71129eb3a35e 100644 --- a/toolchain/check/testdata/array/fail_invalid_type.carbon +++ b/toolchain/check/testdata/array/fail_invalid_type.carbon @@ -19,7 +19,6 @@ var a: [1; 1]; // CHECK:STDOUT: --- fail_invalid_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -36,10 +35,6 @@ var a: [1; 1]; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_1.loc17_9: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %int_1.loc17_12: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %.loc17: type = converted %int_1.loc17_9, [template = ] -// CHECK:STDOUT: %array_type: type = array_type %int_1.loc17_12, [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_out_of_bound.carbon b/toolchain/check/testdata/array/fail_out_of_bound.carbon index 2a6703503e50..3ca3a4a106a2 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound.carbon @@ -39,10 +39,6 @@ var a: [i32; 1] = (1, 2, 3); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: } 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 df76585e2747..60d8cd1bfd8d 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 @@ -59,14 +59,8 @@ var b: i32 = a[{.index = 3}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 072888fe8dad..9f4537cbc912 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -58,11 +58,9 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: %Convert.bound: = bound_method %int_1.1, %Convert.10 [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.2: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, String, String) [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.5: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] -// CHECK:STDOUT: %tuple.type.6: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -86,42 +84,16 @@ var d: [i32; 3] = t2; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %int_3.loc18: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type.loc18: type = array_type %int_3.loc18, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc20_29.1: %tuple.type.2 = tuple_literal (%i32.loc20, String, String) -// CHECK:STDOUT: %.loc20_29.2: type = converted %.loc20_29.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %t1.var: ref %tuple.type.3 = var t1 // CHECK:STDOUT: %t1: ref %tuple.type.3 = bind_name t1, %t1.var -// 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: %int_3.loc28: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type.loc28: type = array_type %int_3.loc28, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.var: ref %array_type = var b // CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var -// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3.loc34: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type.loc34: type = array_type %int_3.loc34, %i32 [template = constants.%array_type] // CHECK:STDOUT: %c.var: ref %array_type = var c // CHECK:STDOUT: %c: ref %array_type = bind_name c, %c.var -// CHECK:STDOUT: %int_32.loc36_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc36_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc36_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc36_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc36_18.1: %tuple.type.6 = tuple_literal (%i32.loc36_10, %i32.loc36_15) -// CHECK:STDOUT: %.loc36_18.2: type = converted %.loc36_18.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] // CHECK:STDOUT: %t2.var: ref %tuple.type.7 = var t2 // CHECK:STDOUT: %t2: ref %tuple.type.7 = bind_name t2, %t2.var -// CHECK:STDOUT: %int_32.loc40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3.loc40: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type.loc40: type = array_type %int_3.loc40, %i32 [template = constants.%array_type] // CHECK:STDOUT: %d.var: ref %array_type = var d // CHECK:STDOUT: %d: ref %array_type = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/function_param.carbon b/toolchain/check/testdata/array/function_param.carbon index e0cd796efac2..83fef56138da 100644 --- a/toolchain/check/testdata/array/function_param.carbon +++ b/toolchain/check/testdata/array/function_param.carbon @@ -71,17 +71,21 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %int_32.loc11_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %arr.param: %array_type = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_18: type = splice_block %array_type [template = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: } // CHECK:STDOUT: %arr: %array_type = bind_name arr, %arr.param // CHECK:STDOUT: %i.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_24: type = splice_block %i32.loc11_24 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %i: %i32 = bind_name i, %i.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/array/generic_empty.carbon b/toolchain/check/testdata/array/generic_empty.carbon index b5cb4b349da1..b834d1567718 100644 --- a/toolchain/check/testdata/array/generic_empty.carbon +++ b/toolchain/check/testdata/array/generic_empty.carbon @@ -54,20 +54,17 @@ fn G(T:! type) { // CHECK:STDOUT: %T.patt.loc11_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %array_type.loc13_17.2: type = array_type constants.%int_0, @G.%T.loc11_6.2 (%T) [symbolic = %array_type.loc13_17.2 (constants.%array_type)] -// CHECK:STDOUT: %require_complete: = require_complete_type @G.%array_type.loc13_17.2 (%array_type) [symbolic = %require_complete (constants.%require_complete)] -// CHECK:STDOUT: %array: @G.%array_type.loc13_17.2 (%array_type) = tuple_value () [symbolic = %array (constants.%array)] +// CHECK:STDOUT: %array_type: type = array_type constants.%int_0, @G.%T.loc11_6.2 (%T) [symbolic = %array_type (constants.%array_type)] +// CHECK:STDOUT: %require_complete: = require_complete_type @G.%array_type (%array_type) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %array: @G.%array_type (%array_type) = tuple_value () [symbolic = %array (constants.%array)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] -// CHECK:STDOUT: %array_type.loc13_17.1: type = array_type %int_0, %T [symbolic = %array_type.loc13_17.2 (constants.%array_type)] -// CHECK:STDOUT: %arr.var: ref @G.%array_type.loc13_17.2 (%array_type) = var arr -// CHECK:STDOUT: %arr: ref @G.%array_type.loc13_17.2 (%array_type) = bind_name arr, %arr.var +// CHECK:STDOUT: %arr.var: ref @G.%array_type (%array_type) = var arr +// CHECK:STDOUT: %arr: ref @G.%array_type (%array_type) = bind_name arr, %arr.var // CHECK:STDOUT: %.loc13_22.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc13_22.2: init @G.%array_type.loc13_17.2 (%array_type) = array_init () to %arr.var [symbolic = %array (constants.%array)] -// CHECK:STDOUT: %.loc13_23: init @G.%array_type.loc13_17.2 (%array_type) = converted %.loc13_22.1, %.loc13_22.2 [symbolic = %array (constants.%array)] +// CHECK:STDOUT: %.loc13_22.2: init @G.%array_type (%array_type) = array_init () to %arr.var [symbolic = %array (constants.%array)] +// CHECK:STDOUT: %.loc13_23: init @G.%array_type (%array_type) = converted %.loc13_22.1, %.loc13_22.2 [symbolic = %array (constants.%array)] // CHECK:STDOUT: assign %arr.var, %.loc13_23 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/import.carbon b/toolchain/check/testdata/array/import.carbon index 386005f97f55..ba7d24c01d9d 100644 --- a/toolchain/check/testdata/array/import.carbon +++ b/toolchain/check/testdata/array/import.carbon @@ -98,11 +98,13 @@ fn G(n: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %i32.loc4_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/array/index_not_literal.carbon b/toolchain/check/testdata/array/index_not_literal.carbon index 686467082887..53980489b320 100644 --- a/toolchain/check/testdata/array/index_not_literal.carbon +++ b/toolchain/check/testdata/array/index_not_literal.carbon @@ -56,14 +56,8 @@ var b: i32 = a[{.index = 2}.index]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/nine_elements.carbon b/toolchain/check/testdata/array/nine_elements.carbon index cd514aa9c9f7..43aa7a1a5988 100644 --- a/toolchain/check/testdata/array/nine_elements.carbon +++ b/toolchain/check/testdata/array/nine_elements.carbon @@ -76,10 +76,6 @@ var a: [i32; 9] = (1, 2, 3, 4, 5, 6, 7, 8, 9); // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %int_9: Core.IntLiteral = int_value 9 [template = constants.%int_9.1] -// CHECK:STDOUT: %array_type: type = array_type %int_9, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index df56a25ad0da..e36fcbcce402 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -157,24 +157,14 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} -// CHECK:STDOUT: %A.ref.loc17: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %a_ref.var: ref %A = var a_ref // CHECK:STDOUT: %a_ref: ref %A = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %A.ref.loc18: type = name_ref A, %A.decl [template = constants.%A] -// CHECK:STDOUT: %B.ref.loc21: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %B.ref.loc22: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %ptr: type = ptr_type %B [template = constants.%ptr.2] -// CHECK:STDOUT: %B.ref.loc24: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %b_factory.var: ref %B = var b_factory // CHECK:STDOUT: %b_factory: ref %B = bind_name b_factory, %b_factory.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %A.elem = field_decl x, element0 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6: %A.elem = field_decl y, element1 [template] // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { // CHECK:STDOUT: %return.patt: %A = return_slot_pattern @@ -311,9 +301,6 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} -// CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] -// 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: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -384,7 +371,6 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} -// CHECK:STDOUT: %D.ref: type = name_ref D, %D.decl [template = constants.%D] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { @@ -485,18 +471,12 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} -// CHECK:STDOUT: %B.ref.loc13: type = name_ref B, %B.decl [template = constants.%B] -// CHECK:STDOUT: %B.ref.loc24: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %b_init.var: ref %B = var b_init // CHECK:STDOUT: %b_init: ref %B = bind_name b_init, %b_init.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %A.elem = field_decl x, element0 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6: %A.elem = field_decl y, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y.1 [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -609,14 +589,11 @@ var b: B = {.x = 1} as B; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} -// CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: %b.var: ref %B = var b // CHECK:STDOUT: %b: ref %B = bind_name b, %b.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// 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: %.loc5: %A.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/as/fail_no_conversion.carbon b/toolchain/check/testdata/as/fail_no_conversion.carbon index 69e583751d47..4cfebd498b8d 100644 --- a/toolchain/check/testdata/as/fail_no_conversion.carbon +++ b/toolchain/check/testdata/as/fail_no_conversion.carbon @@ -41,12 +41,6 @@ let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDOUT: .n = @__global_init.%n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc17_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%i32.loc17_9, %i32.loc17_14) -// CHECK:STDOUT: %.loc17_17.2: type = converted %.loc17_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/as/fail_not_type.carbon b/toolchain/check/testdata/as/fail_not_type.carbon index 18c0aa0bdcf9..804c9eb87de6 100644 --- a/toolchain/check/testdata/as/fail_not_type.carbon +++ b/toolchain/check/testdata/as/fail_not_type.carbon @@ -40,8 +40,6 @@ let n: i32 = 1 as 2; // CHECK:STDOUT: .n = @__global_init.%n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/as/identity.carbon b/toolchain/check/testdata/as/identity.carbon index c7d63cca4baa..ca2331739ee3 100644 --- a/toolchain/check/testdata/as/identity.carbon +++ b/toolchain/check/testdata/as/identity.carbon @@ -67,17 +67,19 @@ fn Initializing() { // CHECK:STDOUT: %n.patt: %X = binding_pattern n // CHECK:STDOUT: %n.param_patt: %X = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref.loc17: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %n.param: %X = value_param runtime_param0 +// CHECK:STDOUT: %X.ref.loc17: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %n: %X = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %Reference.decl: %Reference.type = fn_decl @Reference [template = constants.%Reference] { // CHECK:STDOUT: %p.patt: %ptr.2 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr.2 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref.loc21: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %ptr.loc21: type = ptr_type %X [template = constants.%ptr.2] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %X.ref.loc21: type = name_ref X, file.%X.decl [template = constants.%X] +// CHECK:STDOUT: %ptr: type = ptr_type %X [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %Make.decl: %Make.type = fn_decl @Make [template = constants.%Make] { @@ -101,20 +103,17 @@ fn Initializing() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Value(%n.param_patt: %X) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %X.ref.loc18_10: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %n.ref: %X = name_ref n, %n -// CHECK:STDOUT: %X.ref.loc18_19: type = name_ref X, file.%X.decl [template = constants.%X] +// CHECK:STDOUT: %X.ref.loc18: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %m: %X = bind_name m, %n.ref // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Reference(%p.param_patt: %ptr.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %X.ref.loc22_10: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %ptr.loc22: type = ptr_type %X [template = constants.%ptr.2] // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %.loc22: ref %X = deref %p.ref -// CHECK:STDOUT: %X.ref.loc22_23: type = name_ref X, file.%X.decl [template = constants.%X] +// CHECK:STDOUT: %X.ref.loc22: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %addr: %ptr.2 = addr_of %.loc22 // CHECK:STDOUT: %q: %ptr.2 = bind_name q, %addr // CHECK:STDOUT: return @@ -124,13 +123,12 @@ fn Initializing() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Initializing() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %X.ref.loc28_10: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %x.var: ref %X = var x // CHECK:STDOUT: %x: ref %X = bind_name x, %x.var // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc28: ref %X = splice_block %x.var {} // CHECK:STDOUT: %Make.call: init %X = call %Make.ref() to %.loc28 -// CHECK:STDOUT: %X.ref.loc28_25: type = name_ref X, file.%X.decl [template = constants.%X] +// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: assign %x.var, %Make.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/as/no_prelude/tuple.carbon b/toolchain/check/testdata/as/no_prelude/tuple.carbon index f905622985bb..83061e85677a 100644 --- a/toolchain/check/testdata/as/no_prelude/tuple.carbon +++ b/toolchain/check/testdata/as/no_prelude/tuple.carbon @@ -72,10 +72,6 @@ fn Var() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Let() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %X.ref.loc19_11: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %X.ref.loc19_14: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc19_15.1: %tuple.type.1 = tuple_literal (%X.ref.loc19_11, %X.ref.loc19_14) -// CHECK:STDOUT: %.loc19_15.2: type = converted %.loc19_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %Make.ref.loc19_20: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc19_25.1: ref %X = temporary_storage // CHECK:STDOUT: %Make.call.loc19_25: init %X = call %Make.ref.loc19_20() to %.loc19_25.1 @@ -99,10 +95,6 @@ fn Var() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Var() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %X.ref.loc24_11: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %X.ref.loc24_14: type = name_ref X, file.%X.decl [template = constants.%X] -// CHECK:STDOUT: %.loc24_15.1: %tuple.type.1 = tuple_literal (%X.ref.loc24_11, %X.ref.loc24_14) -// CHECK:STDOUT: %.loc24_15.2: type = converted %.loc24_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var // CHECK:STDOUT: %Make.ref.loc24_20: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index 8212121495e5..3c8462ee8093 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -87,8 +87,6 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32)> [template = constants.%As.type.4] // CHECK:STDOUT: } -// 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: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %i32 as %As.type { @@ -98,10 +96,12 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %return.patt: %X = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %X = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_20: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param1 // CHECK:STDOUT: %return: ref %X = return_slot %return.param @@ -120,10 +120,10 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // 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: %self.param: %X = value_param runtime_param0 +// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %self: %X = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -136,8 +136,6 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// 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: %.loc12: %X.elem = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index 33d0bc462bdb..1852151eacc3 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -26,9 +26,6 @@ var test_type: type = i32; // CHECK:STDOUT: %Convert.bound: = bound_method %int_0.1, %Convert.10 [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: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %float: f64 = float_literal 0.10000000000000001 [template] // CHECK:STDOUT: %str: String = string_literal "Test" [template] // CHECK:STDOUT: } @@ -52,14 +49,8 @@ var test_type: type = i32; // CHECK:STDOUT: .test_type = %test_type // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %test_i32.var: ref %i32 = var test_i32 // CHECK:STDOUT: %test_i32: ref %i32 = bind_name test_i32, %test_i32.var -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc12_15.2: type = converted %float.make_type, %.loc12_15.1 [template = f64] // CHECK:STDOUT: %test_f64.var: ref f64 = var test_f64 // CHECK:STDOUT: %test_f64: ref f64 = bind_name test_f64, %test_f64.var // CHECK:STDOUT: %test_type.var: ref type = var test_type diff --git a/toolchain/check/testdata/basics/fail_bad_run_2.carbon b/toolchain/check/testdata/basics/fail_bad_run_2.carbon index e0e7c47161fe..bbe34ec1f04b 100644 --- a/toolchain/check/testdata/basics/fail_bad_run_2.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run_2.carbon @@ -40,9 +40,11 @@ fn Run(n: i32) {} // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %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: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc14: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index 3a7a956a7d33..6a6d77d70900 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -54,9 +54,6 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2147483648.1, %Convert.10 [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: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -79,20 +76,6 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: .e = @__global_init.%e // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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: %int_64.loc33: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc33: init type = call constants.%Float(%int_64.loc33) [template = f64] -// CHECK:STDOUT: %.loc33_8.1: type = value_of_initializer %float.make_type.loc33 [template = f64] -// CHECK:STDOUT: %.loc33_8.2: type = converted %float.make_type.loc33, %.loc33_8.1 [template = f64] -// CHECK:STDOUT: %int_64.loc38: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc38: init type = call constants.%Float(%int_64.loc38) [template = f64] -// CHECK:STDOUT: %.loc38_8.1: type = value_of_initializer %float.make_type.loc38 [template = f64] -// CHECK:STDOUT: %.loc38_8.2: type = converted %float.make_type.loc38, %.loc38_8.1 [template = f64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon index 85ad0be50c14..fb22d00d7cb5 100644 --- a/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/multifile_raw_and_textual_ir.carbon @@ -36,7 +36,7 @@ fn B() { // CHECK:STDOUT: name_scope0: {inst: inst12, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst13}} // CHECK:STDOUT: entity_names: {} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, body: [inst_block4]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, body: [inst_block5]} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: {} // CHECK:STDOUT: specifics: {} @@ -70,9 +70,10 @@ fn B() { // CHECK:STDOUT: 0: inst13 // CHECK:STDOUT: import_refs: {} // CHECK:STDOUT: global_init: {} -// CHECK:STDOUT: inst_block4: -// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: inst_block4: {} // CHECK:STDOUT: inst_block5: +// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: inst_block6: // CHECK:STDOUT: 0: inst12 // CHECK:STDOUT: 1: inst13 // CHECK:STDOUT: ... @@ -111,7 +112,7 @@ fn B() { // CHECK:STDOUT: entity_names: // CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope1, index: comp_time_bind} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, body: [inst_block4]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, body: [inst_block5]} // CHECK:STDOUT: function1: {name: name1, parent_scope: name_scope1} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: {} @@ -165,12 +166,13 @@ fn B() { // CHECK:STDOUT: 0: inst14 // CHECK:STDOUT: 1: inst20 // CHECK:STDOUT: global_init: {} -// CHECK:STDOUT: inst_block4: +// CHECK:STDOUT: inst_block4: {} +// CHECK:STDOUT: inst_block5: // CHECK:STDOUT: 0: inst19 // CHECK:STDOUT: 1: inst24 // CHECK:STDOUT: 2: inst25 // CHECK:STDOUT: 3: inst26 -// CHECK:STDOUT: inst_block5: +// CHECK:STDOUT: inst_block6: // CHECK:STDOUT: 0: inst12 // CHECK:STDOUT: 1: inst13 // CHECK:STDOUT: 2: inst15 diff --git a/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon b/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon index 42a95227cc8a..8e17cd105bf2 100644 --- a/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/multifile_raw_ir.carbon @@ -36,7 +36,7 @@ fn B() { // CHECK:STDOUT: name_scope0: {inst: inst12, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst13}} // CHECK:STDOUT: entity_names: {} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, body: [inst_block4]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, body: [inst_block5]} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: {} // CHECK:STDOUT: specifics: {} @@ -70,9 +70,10 @@ fn B() { // CHECK:STDOUT: 0: inst13 // CHECK:STDOUT: import_refs: {} // CHECK:STDOUT: global_init: {} -// CHECK:STDOUT: inst_block4: -// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: inst_block4: {} // CHECK:STDOUT: inst_block5: +// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: inst_block6: // CHECK:STDOUT: 0: inst12 // CHECK:STDOUT: 1: inst13 // CHECK:STDOUT: ... @@ -91,7 +92,7 @@ fn B() { // CHECK:STDOUT: entity_names: // CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope1, index: comp_time_bind} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, body: [inst_block4]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, body: [inst_block5]} // CHECK:STDOUT: function1: {name: name1, parent_scope: name_scope1} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: {} @@ -145,12 +146,13 @@ fn B() { // CHECK:STDOUT: 0: inst14 // CHECK:STDOUT: 1: inst20 // CHECK:STDOUT: global_init: {} -// CHECK:STDOUT: inst_block4: +// CHECK:STDOUT: inst_block4: {} +// CHECK:STDOUT: inst_block5: // CHECK:STDOUT: 0: inst19 // CHECK:STDOUT: 1: inst24 // CHECK:STDOUT: 2: inst25 // CHECK:STDOUT: 3: inst26 -// CHECK:STDOUT: inst_block5: +// CHECK:STDOUT: inst_block6: // CHECK:STDOUT: 0: inst12 // CHECK:STDOUT: 1: inst13 // CHECK:STDOUT: 2: inst15 diff --git a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon index 34f376f44b3a..08a3a4d1ee96 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_and_textual_ir.carbon @@ -23,11 +23,11 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: ir0: {decl_id: inst, is_export: false} // CHECK:STDOUT: import_ir_insts: {} // CHECK:STDOUT: name_scopes: -// CHECK:STDOUT: name_scope0: {inst: inst12, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst31}} +// CHECK:STDOUT: name_scope0: {inst: inst12, parent_scope: name_scope, has_error: false, extended_scopes: [], names: {name0: inst32}} // CHECK:STDOUT: entity_names: // CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope, index: comp_time_bind} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, return_slot_pattern: inst27, body: [inst_block9]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, return_slot_pattern: inst27, body: [inst_block10]} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: {} // CHECK:STDOUT: specifics: {} @@ -37,10 +37,10 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: 'type(TypeType)': {kind: copy, type: type(TypeType)} // CHECK:STDOUT: 'type(Error)': {kind: copy, type: type(Error)} // CHECK:STDOUT: 'type(inst(NamespaceType))': {kind: copy, type: type(inst(NamespaceType))} -// CHECK:STDOUT: 'type(inst32)': {kind: none, type: type(inst13)} +// CHECK:STDOUT: 'type(inst33)': {kind: none, type: type(inst13)} // CHECK:STDOUT: 'type(inst13)': {kind: none, type: type(inst13)} -// CHECK:STDOUT: 'type(inst21)': {kind: pointer, type: type(inst34)} -// CHECK:STDOUT: 'type(inst34)': {kind: copy, type: type(inst34)} +// CHECK:STDOUT: 'type(inst21)': {kind: pointer, type: type(inst35)} +// CHECK:STDOUT: 'type(inst35)': {kind: copy, type: type(inst35)} // CHECK:STDOUT: type_blocks: // CHECK:STDOUT: type_block0: {} // CHECK:STDOUT: type_block1: @@ -57,33 +57,34 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: inst19: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst13)} // CHECK:STDOUT: inst20: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst13)} // CHECK:STDOUT: inst21: {kind: TupleType, arg0: type_block1, type: type(TypeType)} -// CHECK:STDOUT: inst22: {kind: TupleLiteral, arg0: inst_block5, type: type(inst21)} +// CHECK:STDOUT: inst22: {kind: TupleLiteral, arg0: inst_block6, type: type(inst21)} // CHECK:STDOUT: inst23: {kind: Converted, arg0: inst19, arg1: inst13, type: type(TypeType)} // CHECK:STDOUT: inst24: {kind: Converted, arg0: inst20, arg1: inst13, type: type(TypeType)} // CHECK:STDOUT: inst25: {kind: Converted, arg0: inst22, arg1: inst21, type: type(TypeType)} // CHECK:STDOUT: inst26: {kind: ReturnSlotPattern, arg0: inst22, type: type(inst21)} // CHECK:STDOUT: inst27: {kind: OutParamPattern, arg0: inst26, arg1: runtime_param1, type: type(inst21)} // CHECK:STDOUT: inst28: {kind: ValueParam, arg0: runtime_param0, arg1: name1, type: type(inst13)} -// CHECK:STDOUT: inst29: {kind: OutParam, arg0: runtime_param1, arg1: name(ReturnSlot), type: type(inst21)} -// CHECK:STDOUT: inst30: {kind: ReturnSlot, arg0: inst22, arg1: inst29, type: type(inst21)} -// CHECK:STDOUT: inst31: {kind: FunctionDecl, arg0: function0, arg1: inst_block8, type: type(inst32)} -// CHECK:STDOUT: inst32: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} -// CHECK:STDOUT: inst33: {kind: StructValue, arg0: inst_block_empty, type: type(inst32)} -// CHECK:STDOUT: inst34: {kind: PointerType, arg0: type(inst21), type: type(TypeType)} -// CHECK:STDOUT: inst35: {kind: NameRef, arg0: name1, arg1: inst16, type: type(inst13)} -// CHECK:STDOUT: inst36: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst13)} -// CHECK:STDOUT: inst37: {kind: TupleLiteral, arg0: inst_block10, type: type(inst21)} -// CHECK:STDOUT: inst38: {kind: TupleAccess, arg0: inst30, arg1: element0, type: type(inst13)} -// CHECK:STDOUT: inst39: {kind: TupleInit, arg0: inst_block11, arg1: inst38, type: type(inst13)} -// CHECK:STDOUT: inst40: {kind: TupleValue, arg0: inst_block_empty, type: type(inst13)} -// CHECK:STDOUT: inst41: {kind: Converted, arg0: inst35, arg1: inst39, type: type(inst13)} -// CHECK:STDOUT: inst42: {kind: TupleAccess, arg0: inst30, arg1: element1, type: type(inst13)} -// CHECK:STDOUT: inst43: {kind: TupleInit, arg0: inst_block_empty, arg1: inst42, type: type(inst13)} -// CHECK:STDOUT: inst44: {kind: Converted, arg0: inst36, arg1: inst43, type: type(inst13)} -// CHECK:STDOUT: inst45: {kind: TupleInit, arg0: inst_block12, arg1: inst30, type: type(inst21)} -// CHECK:STDOUT: inst46: {kind: TupleValue, arg0: inst_block13, type: type(inst21)} -// CHECK:STDOUT: inst47: {kind: Converted, arg0: inst37, arg1: inst45, type: type(inst21)} -// CHECK:STDOUT: inst48: {kind: ReturnExpr, arg0: inst47, arg1: inst30} +// CHECK:STDOUT: inst29: {kind: SpliceBlock, arg0: inst_block4, arg1: inst15, type: type(TypeType)} +// CHECK:STDOUT: inst30: {kind: OutParam, arg0: runtime_param1, arg1: name(ReturnSlot), type: type(inst21)} +// CHECK:STDOUT: inst31: {kind: ReturnSlot, arg0: inst22, arg1: inst30, type: type(inst21)} +// CHECK:STDOUT: inst32: {kind: FunctionDecl, arg0: function0, arg1: inst_block9, type: type(inst33)} +// CHECK:STDOUT: inst33: {kind: FunctionType, arg0: function0, arg1: specific, type: type(TypeType)} +// CHECK:STDOUT: inst34: {kind: StructValue, arg0: inst_block_empty, type: type(inst33)} +// CHECK:STDOUT: inst35: {kind: PointerType, arg0: type(inst21), type: type(TypeType)} +// CHECK:STDOUT: inst36: {kind: NameRef, arg0: name1, arg1: inst16, type: type(inst13)} +// CHECK:STDOUT: inst37: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst13)} +// CHECK:STDOUT: inst38: {kind: TupleLiteral, arg0: inst_block11, type: type(inst21)} +// CHECK:STDOUT: inst39: {kind: TupleAccess, arg0: inst31, arg1: element0, type: type(inst13)} +// CHECK:STDOUT: inst40: {kind: TupleInit, arg0: inst_block12, arg1: inst39, type: type(inst13)} +// CHECK:STDOUT: inst41: {kind: TupleValue, arg0: inst_block_empty, type: type(inst13)} +// CHECK:STDOUT: inst42: {kind: Converted, arg0: inst36, arg1: inst40, type: type(inst13)} +// CHECK:STDOUT: inst43: {kind: TupleAccess, arg0: inst31, arg1: element1, type: type(inst13)} +// CHECK:STDOUT: inst44: {kind: TupleInit, arg0: inst_block_empty, arg1: inst43, type: type(inst13)} +// CHECK:STDOUT: inst45: {kind: Converted, arg0: inst37, arg1: inst44, type: type(inst13)} +// CHECK:STDOUT: inst46: {kind: TupleInit, arg0: inst_block13, arg1: inst31, type: type(inst21)} +// CHECK:STDOUT: inst47: {kind: TupleValue, arg0: inst_block14, type: type(inst21)} +// CHECK:STDOUT: inst48: {kind: Converted, arg0: inst38, arg1: inst46, type: type(inst21)} +// CHECK:STDOUT: inst49: {kind: ReturnExpr, arg0: inst48, arg1: inst31} // CHECK:STDOUT: constant_values: // CHECK:STDOUT: inst12: template_constant(inst12) // CHECK:STDOUT: inst13: template_constant(inst13) @@ -92,77 +93,80 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: inst23: template_constant(inst13) // CHECK:STDOUT: inst24: template_constant(inst13) // CHECK:STDOUT: inst25: template_constant(inst21) -// CHECK:STDOUT: inst31: template_constant(inst33) -// CHECK:STDOUT: inst32: template_constant(inst32) +// CHECK:STDOUT: inst29: template_constant(inst13) +// CHECK:STDOUT: inst32: template_constant(inst34) // CHECK:STDOUT: inst33: template_constant(inst33) // CHECK:STDOUT: inst34: template_constant(inst34) -// CHECK:STDOUT: inst39: template_constant(inst40) -// CHECK:STDOUT: inst40: template_constant(inst40) -// CHECK:STDOUT: inst41: template_constant(inst40) -// CHECK:STDOUT: inst43: template_constant(inst40) -// CHECK:STDOUT: inst44: template_constant(inst40) -// CHECK:STDOUT: inst45: template_constant(inst46) -// CHECK:STDOUT: inst46: template_constant(inst46) -// CHECK:STDOUT: inst47: template_constant(inst46) +// CHECK:STDOUT: inst35: template_constant(inst35) +// CHECK:STDOUT: inst40: template_constant(inst41) +// CHECK:STDOUT: inst41: template_constant(inst41) +// CHECK:STDOUT: inst42: template_constant(inst41) +// CHECK:STDOUT: inst44: template_constant(inst41) +// CHECK:STDOUT: inst45: template_constant(inst41) +// CHECK:STDOUT: inst46: template_constant(inst47) +// CHECK:STDOUT: inst47: template_constant(inst47) +// CHECK:STDOUT: inst48: template_constant(inst47) // CHECK:STDOUT: symbolic_constants: {} // CHECK:STDOUT: inst_blocks: // CHECK:STDOUT: inst_block_empty: {} // CHECK:STDOUT: exports: -// CHECK:STDOUT: 0: inst31 +// CHECK:STDOUT: 0: inst32 // CHECK:STDOUT: import_refs: {} // CHECK:STDOUT: global_init: {} // CHECK:STDOUT: inst_block4: -// CHECK:STDOUT: 0: inst18 +// CHECK:STDOUT: 0: inst14 +// CHECK:STDOUT: 1: inst15 // CHECK:STDOUT: inst_block5: +// CHECK:STDOUT: 0: inst18 +// CHECK:STDOUT: inst_block6: // CHECK:STDOUT: 0: inst19 // CHECK:STDOUT: 1: inst20 -// CHECK:STDOUT: inst_block6: -// CHECK:STDOUT: 0: inst28 -// CHECK:STDOUT: 1: inst29 // CHECK:STDOUT: inst_block7: +// CHECK:STDOUT: 0: inst28 +// CHECK:STDOUT: 1: inst30 +// CHECK:STDOUT: inst_block8: // CHECK:STDOUT: 0: inst17 // CHECK:STDOUT: 1: inst18 // CHECK:STDOUT: 2: inst26 // CHECK:STDOUT: 3: inst27 -// CHECK:STDOUT: inst_block8: -// CHECK:STDOUT: 0: inst14 -// CHECK:STDOUT: 1: inst15 -// CHECK:STDOUT: 2: inst19 -// CHECK:STDOUT: 3: inst20 -// CHECK:STDOUT: 4: inst22 -// CHECK:STDOUT: 5: inst23 -// CHECK:STDOUT: 6: inst24 -// CHECK:STDOUT: 7: inst25 -// CHECK:STDOUT: 8: inst28 -// CHECK:STDOUT: 9: inst16 -// CHECK:STDOUT: 10: inst29 -// CHECK:STDOUT: 11: inst30 // CHECK:STDOUT: inst_block9: -// CHECK:STDOUT: 0: inst35 -// CHECK:STDOUT: 1: inst36 -// CHECK:STDOUT: 2: inst37 -// CHECK:STDOUT: 3: inst38 -// CHECK:STDOUT: 4: inst39 -// CHECK:STDOUT: 5: inst41 -// CHECK:STDOUT: 6: inst42 -// CHECK:STDOUT: 7: inst43 -// CHECK:STDOUT: 8: inst44 -// CHECK:STDOUT: 9: inst45 -// CHECK:STDOUT: 10: inst47 -// CHECK:STDOUT: 11: inst48 +// CHECK:STDOUT: 0: inst19 +// CHECK:STDOUT: 1: inst20 +// CHECK:STDOUT: 2: inst22 +// CHECK:STDOUT: 3: inst23 +// CHECK:STDOUT: 4: inst24 +// CHECK:STDOUT: 5: inst25 +// CHECK:STDOUT: 6: inst28 +// CHECK:STDOUT: 7: inst29 +// CHECK:STDOUT: 8: inst16 +// CHECK:STDOUT: 9: inst30 +// CHECK:STDOUT: 10: inst31 // CHECK:STDOUT: inst_block10: -// CHECK:STDOUT: 0: inst35 -// CHECK:STDOUT: 1: inst36 -// CHECK:STDOUT: inst_block11: {} -// CHECK:STDOUT: inst_block12: -// CHECK:STDOUT: 0: inst41 -// CHECK:STDOUT: 1: inst44 +// CHECK:STDOUT: 0: inst36 +// CHECK:STDOUT: 1: inst37 +// CHECK:STDOUT: 2: inst38 +// CHECK:STDOUT: 3: inst39 +// CHECK:STDOUT: 4: inst40 +// CHECK:STDOUT: 5: inst42 +// CHECK:STDOUT: 6: inst43 +// CHECK:STDOUT: 7: inst44 +// CHECK:STDOUT: 8: inst45 +// CHECK:STDOUT: 9: inst46 +// CHECK:STDOUT: 10: inst48 +// CHECK:STDOUT: 11: inst49 +// CHECK:STDOUT: inst_block11: +// CHECK:STDOUT: 0: inst36 +// CHECK:STDOUT: 1: inst37 +// CHECK:STDOUT: inst_block12: {} // CHECK:STDOUT: inst_block13: -// CHECK:STDOUT: 0: inst40 -// CHECK:STDOUT: 1: inst40 +// CHECK:STDOUT: 0: inst42 +// CHECK:STDOUT: 1: inst45 // CHECK:STDOUT: inst_block14: +// CHECK:STDOUT: 0: inst41 +// CHECK:STDOUT: 1: inst41 +// CHECK:STDOUT: inst_block15: // CHECK:STDOUT: 0: inst12 -// CHECK:STDOUT: 1: inst31 +// CHECK:STDOUT: 1: inst32 // CHECK:STDOUT: ... // CHECK:STDOUT: // CHECK:STDOUT: --- raw_and_textual_ir.carbon @@ -186,8 +190,6 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: %return.patt: %tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc15_20: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_24: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_25.1: %tuple.type = tuple_literal (%.loc15_20, %.loc15_24) @@ -195,6 +197,10 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: %.loc15_25.3: type = converted %.loc15_24, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc15_25.4: type = converted %.loc15_25.1, constants.%tuple.type [template = constants.%tuple.type] // CHECK:STDOUT: %n.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_12.3: type = splice_block %.loc15_12.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc15_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %empty_tuple.type = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %tuple.type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type = return_slot %return.param diff --git a/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon b/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon index b5dd1331efa3..e5a90e65a592 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_identifier.carbon @@ -48,11 +48,13 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_10.2: type = converted %.loc15_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc15_17.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_17.2: type = converted %.loc15_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %n.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_10.3: type = splice_block %.loc15_10.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc15_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_10.2: type = converted %.loc15_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %empty_tuple.type = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param @@ -63,11 +65,13 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc19_12.2: type = converted %.loc19_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc19_19.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc19_19.2: type = converted %.loc19_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %n.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc19_12.3: type = splice_block %.loc19_12.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc19_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_12.2: type = converted %.loc19_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %empty_tuple.type = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param @@ -78,11 +82,13 @@ fn C(r#if: ()) -> () { // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc23_13.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc23_13.2: type = converted %.loc23_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc23_20.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc23_20.2: type = converted %.loc23_20.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %if.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_13.3: type = splice_block %.loc23_13.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc23_13.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc23_13.2: type = converted %.loc23_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %if: %empty_tuple.type = bind_name r#if, %if.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param diff --git a/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon b/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon index 6eead5ca98af..08379ee715fd 100644 --- a/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/raw_ir.carbon @@ -28,12 +28,12 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: entity_name0: {name: name1, parent_scope: name_scope, index: comp_time_bind0} // CHECK:STDOUT: entity_name1: {name: name2, parent_scope: name_scope, index: comp_time_bind} // CHECK:STDOUT: functions: -// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, return_slot_pattern: inst31, body: [inst_block14]} +// CHECK:STDOUT: function0: {name: name0, parent_scope: name_scope0, return_slot_pattern: inst31, body: [inst_block16]} // CHECK:STDOUT: classes: {} // CHECK:STDOUT: generics: -// CHECK:STDOUT: generic0: {decl: inst36, bindings: inst_block10} +// CHECK:STDOUT: generic0: {decl: inst36, bindings: inst_block12} // CHECK:STDOUT: specifics: -// CHECK:STDOUT: specific0: {generic: generic0, args: inst_block12} +// CHECK:STDOUT: specific0: {generic: generic0, args: inst_block14} // CHECK:STDOUT: struct_type_fields: // CHECK:STDOUT: struct_type_fields0: {} // CHECK:STDOUT: types: @@ -74,7 +74,7 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: inst23: {kind: TupleType, arg0: type_block0, type: type(TypeType)} // CHECK:STDOUT: inst24: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst23)} // CHECK:STDOUT: inst25: {kind: TupleType, arg0: type_block1, type: type(TypeType)} -// CHECK:STDOUT: inst26: {kind: TupleLiteral, arg0: inst_block6, type: type(inst25)} +// CHECK:STDOUT: inst26: {kind: TupleLiteral, arg0: inst_block8, type: type(inst25)} // CHECK:STDOUT: inst27: {kind: Converted, arg0: inst24, arg1: inst23, type: type(TypeType)} // CHECK:STDOUT: inst28: {kind: TupleType, arg0: type_block2, type: type(TypeType)} // CHECK:STDOUT: inst29: {kind: Converted, arg0: inst26, arg1: inst28, type: type(TypeType)} @@ -84,7 +84,7 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: inst33: {kind: ValueParam, arg0: runtime_param0, arg1: name2, type: type(symbolic_constant3)} // CHECK:STDOUT: inst34: {kind: OutParam, arg0: runtime_param1, arg1: name(ReturnSlot), type: type(symbolic_constant5)} // CHECK:STDOUT: inst35: {kind: ReturnSlot, arg0: inst26, arg1: inst34, type: type(symbolic_constant5)} -// CHECK:STDOUT: inst36: {kind: FunctionDecl, arg0: function0, arg1: inst_block9, type: type(inst40)} +// CHECK:STDOUT: inst36: {kind: FunctionDecl, arg0: function0, arg1: inst_block11, type: type(inst40)} // CHECK:STDOUT: inst37: {kind: BindSymbolicName, arg0: entity_name0, arg1: inst, type: type(TypeType)} // CHECK:STDOUT: inst38: {kind: SymbolicBindingPattern, arg0: entity_name0, type: type(TypeType)} // CHECK:STDOUT: inst39: {kind: TupleType, arg0: type_block3, type: type(TypeType)} @@ -97,7 +97,7 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: inst46: {kind: RequireCompleteType, arg0: type(symbolic_constant0), type: type(inst(WitnessType))} // CHECK:STDOUT: inst47: {kind: NameRef, arg0: name2, arg1: inst19, type: type(symbolic_constant3)} // CHECK:STDOUT: inst48: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst23)} -// CHECK:STDOUT: inst49: {kind: TupleLiteral, arg0: inst_block15, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst49: {kind: TupleLiteral, arg0: inst_block17, type: type(symbolic_constant5)} // CHECK:STDOUT: inst50: {kind: RequireCompleteType, arg0: type(symbolic_constant5), type: type(inst(WitnessType))} // CHECK:STDOUT: inst51: {kind: TupleAccess, arg0: inst35, arg1: element0, type: type(symbolic_constant3)} // CHECK:STDOUT: inst52: {kind: RequireCompleteType, arg0: type(symbolic_constant0), type: type(inst(WitnessType))} @@ -106,7 +106,7 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: inst55: {kind: TupleInit, arg0: inst_block_empty, arg1: inst54, type: type(inst23)} // CHECK:STDOUT: inst56: {kind: TupleValue, arg0: inst_block_empty, type: type(inst23)} // CHECK:STDOUT: inst57: {kind: Converted, arg0: inst48, arg1: inst55, type: type(inst23)} -// CHECK:STDOUT: inst58: {kind: TupleInit, arg0: inst_block16, arg1: inst35, type: type(symbolic_constant5)} +// CHECK:STDOUT: inst58: {kind: TupleInit, arg0: inst_block18, arg1: inst35, type: type(symbolic_constant5)} // CHECK:STDOUT: inst59: {kind: Converted, arg0: inst49, arg1: inst58, type: type(symbolic_constant5)} // CHECK:STDOUT: inst60: {kind: ReturnExpr, arg0: inst59, arg1: inst35} // CHECK:STDOUT: inst61: {kind: RequireCompleteType, arg0: type(symbolic_constant5), type: type(inst(WitnessType))} @@ -161,49 +161,52 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: 0: inst36 // CHECK:STDOUT: import_refs: {} // CHECK:STDOUT: global_init: {} -// CHECK:STDOUT: inst_block4: -// CHECK:STDOUT: 0: inst17 +// CHECK:STDOUT: inst_block4: {} // CHECK:STDOUT: inst_block5: -// CHECK:STDOUT: 0: inst21 +// CHECK:STDOUT: 0: inst17 // CHECK:STDOUT: inst_block6: +// CHECK:STDOUT: 0: inst18 +// CHECK:STDOUT: inst_block7: +// CHECK:STDOUT: 0: inst21 +// CHECK:STDOUT: inst_block8: // CHECK:STDOUT: 0: inst22 // CHECK:STDOUT: 1: inst24 -// CHECK:STDOUT: inst_block7: +// CHECK:STDOUT: inst_block9: // CHECK:STDOUT: 0: inst33 // CHECK:STDOUT: 1: inst34 -// CHECK:STDOUT: inst_block8: +// CHECK:STDOUT: inst_block10: // CHECK:STDOUT: 0: inst15 // CHECK:STDOUT: 1: inst17 // CHECK:STDOUT: 2: inst20 // CHECK:STDOUT: 3: inst21 // CHECK:STDOUT: 4: inst30 // CHECK:STDOUT: 5: inst31 -// CHECK:STDOUT: inst_block9: -// CHECK:STDOUT: 0: inst18 -// CHECK:STDOUT: 1: inst22 -// CHECK:STDOUT: 2: inst24 -// CHECK:STDOUT: 3: inst26 -// CHECK:STDOUT: 4: inst27 -// CHECK:STDOUT: 5: inst29 -// CHECK:STDOUT: 6: inst32 -// CHECK:STDOUT: 7: inst13 -// CHECK:STDOUT: 8: inst33 +// CHECK:STDOUT: inst_block11: +// CHECK:STDOUT: 0: inst22 +// CHECK:STDOUT: 1: inst24 +// CHECK:STDOUT: 2: inst26 +// CHECK:STDOUT: 3: inst27 +// CHECK:STDOUT: 4: inst29 +// CHECK:STDOUT: 5: inst32 +// CHECK:STDOUT: 6: inst13 +// CHECK:STDOUT: 7: inst33 +// CHECK:STDOUT: 8: inst18 // CHECK:STDOUT: 9: inst19 // CHECK:STDOUT: 10: inst34 // CHECK:STDOUT: 11: inst35 -// CHECK:STDOUT: inst_block10: +// CHECK:STDOUT: inst_block12: // CHECK:STDOUT: 0: inst13 -// CHECK:STDOUT: inst_block11: +// CHECK:STDOUT: inst_block13: // CHECK:STDOUT: 0: inst37 // CHECK:STDOUT: 1: inst38 // CHECK:STDOUT: 2: inst39 -// CHECK:STDOUT: inst_block12: +// CHECK:STDOUT: inst_block14: // CHECK:STDOUT: 0: inst14 -// CHECK:STDOUT: inst_block13: +// CHECK:STDOUT: inst_block15: // CHECK:STDOUT: 0: inst14 // CHECK:STDOUT: 1: inst14 // CHECK:STDOUT: 2: inst28 -// CHECK:STDOUT: inst_block14: +// CHECK:STDOUT: inst_block16: // CHECK:STDOUT: 0: inst47 // CHECK:STDOUT: 1: inst48 // CHECK:STDOUT: 2: inst49 @@ -215,16 +218,16 @@ fn Foo[T:! type](n: T) -> (T, ()) { // CHECK:STDOUT: 8: inst58 // CHECK:STDOUT: 9: inst59 // CHECK:STDOUT: 10: inst60 -// CHECK:STDOUT: inst_block15: +// CHECK:STDOUT: inst_block17: // CHECK:STDOUT: 0: inst47 // CHECK:STDOUT: 1: inst48 -// CHECK:STDOUT: inst_block16: +// CHECK:STDOUT: inst_block18: // CHECK:STDOUT: 0: inst53 // CHECK:STDOUT: 1: inst57 -// CHECK:STDOUT: inst_block17: +// CHECK:STDOUT: inst_block19: // CHECK:STDOUT: 0: inst61 // CHECK:STDOUT: 1: inst62 -// CHECK:STDOUT: inst_block18: +// CHECK:STDOUT: inst_block20: // CHECK:STDOUT: 0: inst12 // CHECK:STDOUT: 1: inst36 // CHECK:STDOUT: ... diff --git a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon index ac14228ccc1d..b285cacb7393 100644 --- a/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon +++ b/toolchain/check/testdata/basics/no_prelude/textual_ir.carbon @@ -37,8 +37,6 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: %return.patt: %tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc15_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc15_20: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_24: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_25.1: %tuple.type = tuple_literal (%.loc15_20, %.loc15_24) @@ -46,6 +44,10 @@ fn Foo(n: ()) -> ((), ()) { // CHECK:STDOUT: %.loc15_25.3: type = converted %.loc15_24, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc15_25.4: type = converted %.loc15_25.1, constants.%tuple.type [template = constants.%tuple.type] // CHECK:STDOUT: %n.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_12.3: type = splice_block %.loc15_12.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc15_12.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %empty_tuple.type = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %tuple.type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type = return_slot %return.param diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index 052ab63f6f82..33bd20e9d21d 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -62,9 +62,6 @@ fn F() { // CHECK:STDOUT: %int_2147483647.2: %i32 = int_value 2147483647 [template] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %array.1: %array_type.1 = tuple_value (%int_8.2, %int_9.2, %int_8.2, %int_8.2, %int_2147483647.2, %int_2147483647.2) [template] -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %array_type.2: type = array_type %int_6, f64 [template] // CHECK:STDOUT: %float.1: f64 = float_literal 0.90000000000000002 [template] // CHECK:STDOUT: %float.2: f64 = float_literal 8 [template] @@ -97,10 +94,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// 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: %int_6.loc14: Core.IntLiteral = int_value 6 [template = constants.%int_6] -// CHECK:STDOUT: %array_type.loc14: type = array_type %int_6.loc14, %i32 [template = constants.%array_type.1] // CHECK:STDOUT: %ints.var: ref %array_type.1 = var ints // CHECK:STDOUT: %ints: ref %array_type.1 = bind_name ints, %ints.var // CHECK:STDOUT: %int_8.loc15: Core.IntLiteral = int_value 8 [template = constants.%int_8.1] @@ -161,12 +154,6 @@ fn F() { // CHECK:STDOUT: %.loc21_3.20: init %array_type.1 = array_init (%.loc21_3.4, %.loc21_3.7, %.loc21_3.10, %.loc21_3.13, %.loc21_3.16, %.loc21_3.19) to %ints.var [template = constants.%array.1] // CHECK:STDOUT: %.loc21_4: init %array_type.1 = converted %.loc21_3.1, %.loc21_3.20 [template = constants.%array.1] // CHECK:STDOUT: assign %ints.var, %.loc21_4 -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %int_6.loc22: Core.IntLiteral = int_value 6 [template = constants.%int_6] -// CHECK:STDOUT: %.loc22_16.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc22_16.2: type = converted %float.make_type, %.loc22_16.1 [template = f64] -// CHECK:STDOUT: %array_type.loc22: type = array_type %int_6.loc22, f64 [template = constants.%array_type.2] // CHECK:STDOUT: %floats.var: ref %array_type.2 = var floats // CHECK:STDOUT: %floats: ref %array_type.2 = bind_name floats, %floats.var // CHECK:STDOUT: %float.loc23: f64 = float_literal 0.90000000000000002 [template = constants.%float.1] diff --git a/toolchain/check/testdata/basics/parens.carbon b/toolchain/check/testdata/basics/parens.carbon index 1ef20850d5ac..3823451af2ab 100644 --- a/toolchain/check/testdata/basics/parens.carbon +++ b/toolchain/check/testdata/basics/parens.carbon @@ -46,12 +46,8 @@ var b: i32 = ((2)); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/basics/type_literals.carbon b/toolchain/check/testdata/basics/type_literals.carbon index 00aaf3a58c84..20feaf723feb 100644 --- a/toolchain/check/testdata/basics/type_literals.carbon +++ b/toolchain/check/testdata/basics/type_literals.carbon @@ -152,16 +152,10 @@ var test_f128: f128; // CHECK:STDOUT: .test_i64 = %test_i64 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8] -// CHECK:STDOUT: %i8: type = class_type @Int, @Int(constants.%int_8) [template = constants.%i8] // CHECK:STDOUT: %test_i8.var: ref %i8 = var test_i8 // CHECK:STDOUT: %test_i8: ref %i8 = bind_name test_i8, %test_i8.var -// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %test_i16.var: ref %i16 = var test_i16 // CHECK:STDOUT: %test_i16: ref %i16 = bind_name test_i16, %test_i16.var -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %test_i64.var: ref %i64 = var test_i64 // CHECK:STDOUT: %test_i64: ref %i64 = bind_name test_i64, %test_i64.var // CHECK:STDOUT: } @@ -200,16 +194,10 @@ var test_f128: f128; // CHECK:STDOUT: .test_u64 = %test_u64 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8] -// CHECK:STDOUT: %u8: type = class_type @UInt, @UInt(constants.%int_8) [template = constants.%u8] // CHECK:STDOUT: %test_u8.var: ref %u8 = var test_u8 // CHECK:STDOUT: %test_u8: ref %u8 = bind_name test_u8, %test_u8.var -// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %test_u16.var: ref %u16 = var test_u16 // CHECK:STDOUT: %test_u16: ref %u16 = bind_name test_u16, %test_u16.var -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %test_u64.var: ref %u64 = var test_u64 // CHECK:STDOUT: %test_u64: ref %u64 = bind_name test_u64, %test_u64.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/bool/eq.carbon b/toolchain/check/testdata/builtins/bool/eq.carbon index 082e5ecf2533..be1e74dc0208 100644 --- a/toolchain/check/testdata/builtins/bool/eq.carbon +++ b/toolchain/check/testdata/builtins/bool/eq.carbon @@ -91,18 +91,22 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc4_10: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc4_10.1: type = value_of_initializer %bool.make_type.loc4_10 [template = bool] -// CHECK:STDOUT: %.loc4_10.2: type = converted %bool.make_type.loc4_10, %.loc4_10.1 [template = bool] -// CHECK:STDOUT: %bool.make_type.loc4_19: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %bool.make_type.loc4_19 [template = bool] -// CHECK:STDOUT: %.loc4_19.2: type = converted %bool.make_type.loc4_19, %.loc4_19.1 [template = bool] // CHECK:STDOUT: %bool.make_type.loc4_28: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_28.1: type = value_of_initializer %bool.make_type.loc4_28 [template = bool] // CHECK:STDOUT: %.loc4_28.2: type = converted %bool.make_type.loc4_28, %.loc4_28.1 [template = bool] // CHECK:STDOUT: %a.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_10.3: type = splice_block %.loc4_10.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc4_10: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc4_10.1: type = value_of_initializer %bool.make_type.loc4_10 [template = bool] +// CHECK:STDOUT: %.loc4_10.2: type = converted %bool.make_type.loc4_10, %.loc4_10.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: bool = bind_name a, %a.param // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19.3: type = splice_block %.loc4_19.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc4_19: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %bool.make_type.loc4_19 [template = bool] +// CHECK:STDOUT: %.loc4_19.2: type = converted %bool.make_type.loc4_19, %.loc4_19.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -111,10 +115,12 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %B.patt.loc6_9.1: bool = symbolic_binding_pattern B, 0 [symbolic = %B.patt.loc6_9.2 (constants.%B.patt)] // CHECK:STDOUT: %B.param_patt: bool = value_param_pattern %B.patt.loc6_9.1, runtime_param [symbolic = %B.patt.loc6_9.2 (constants.%B.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc6_13.2: type = converted %bool.make_type, %.loc6_13.1 [template = bool] // CHECK:STDOUT: %B.param: bool = value_param runtime_param +// CHECK:STDOUT: %.loc6_13.3: type = splice_block %.loc6_13.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc6_13.2: type = converted %bool.make_type, %.loc6_13.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %B.loc6_9.1: bool = bind_symbolic_name B, 0, %B.param [symbolic = %B.loc6_9.2 (constants.%B)] // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: %True.type = fn_decl @True [template = constants.%True] { @@ -137,44 +143,12 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %Eq.ref.loc11: %Eq.type = name_ref Eq, %Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %true.loc11_13: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %true.loc11_19: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %bool.eq.loc11: init bool = call %Eq.ref.loc11(%true.loc11_13, %true.loc11_19) [template = constants.%true] -// CHECK:STDOUT: %.loc11_24.1: bool = value_of_initializer %bool.eq.loc11 [template = constants.%true] -// CHECK:STDOUT: %.loc11_24.2: bool = converted %bool.eq.loc11, %.loc11_24.1 [template = constants.%true] -// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%true) [template = constants.%C.2] // CHECK:STDOUT: %a.var: ref %C.2 = var a // CHECK:STDOUT: %a: ref %C.2 = bind_name a, %a.var -// CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %Eq.ref.loc12: %Eq.type = name_ref Eq, %Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %true.loc12: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %false.loc12: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %bool.eq.loc12: init bool = call %Eq.ref.loc12(%true.loc12, %false.loc12) [template = constants.%false] -// CHECK:STDOUT: %.loc12_25.1: bool = value_of_initializer %bool.eq.loc12 [template = constants.%false] -// CHECK:STDOUT: %.loc12_25.2: bool = converted %bool.eq.loc12, %.loc12_25.1 [template = constants.%false] -// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%false) [template = constants.%C.3] // CHECK:STDOUT: %b.var: ref %C.3 = var b // CHECK:STDOUT: %b: ref %C.3 = bind_name b, %b.var -// CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %Eq.ref.loc13: %Eq.type = name_ref Eq, %Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %false.loc13: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %true.loc13: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %bool.eq.loc13: init bool = call %Eq.ref.loc13(%false.loc13, %true.loc13) [template = constants.%false] -// CHECK:STDOUT: %.loc13_25.1: bool = value_of_initializer %bool.eq.loc13 [template = constants.%false] -// CHECK:STDOUT: %.loc13_25.2: bool = converted %bool.eq.loc13, %.loc13_25.1 [template = constants.%false] -// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%false) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var -// CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %Eq.ref.loc14: %Eq.type = name_ref Eq, %Eq.decl [template = constants.%Eq] -// CHECK:STDOUT: %false.loc14_13: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %false.loc14_20: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %bool.eq.loc14: init bool = call %Eq.ref.loc14(%false.loc14_13, %false.loc14_20) [template = constants.%true] -// CHECK:STDOUT: %.loc14_26.1: bool = value_of_initializer %bool.eq.loc14 [template = constants.%true] -// CHECK:STDOUT: %.loc14_26.2: bool = converted %bool.eq.loc14, %.loc14_26.1 [template = constants.%true] -// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%true) [template = constants.%C.2] // CHECK:STDOUT: %d.var: ref %C.2 = var d // CHECK:STDOUT: %d: ref %C.2 = bind_name d, %d.var // CHECK:STDOUT: } @@ -260,14 +234,6 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %C.3: type = class_type @C, @C(%false) [template] // CHECK:STDOUT: %False.type: type = fn_type @False [template] // CHECK:STDOUT: %False: %False.type = struct_value () [template] -// CHECK:STDOUT: %Equal.type.1: type = fn_type @Equal.1 [template] -// CHECK:STDOUT: %NotEqual.type: type = fn_type @NotEqual [template] -// CHECK:STDOUT: %NotEqual: %NotEqual.type = struct_value () [template] -// CHECK:STDOUT: %Equal.type.2: type = fn_type @Equal.2 [template] -// CHECK:STDOUT: %Equal.2: %Equal.type.2 = struct_value () [template] -// CHECK:STDOUT: %interface: = interface_witness (%Equal.2, %NotEqual) [template] -// CHECK:STDOUT: %Equal.bound.1: = bound_method %true, %Equal.2 [template] -// CHECK:STDOUT: %Equal.bound.2: = bound_method %false, %Equal.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -295,10 +261,12 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %B.patt.loc4_9.1: bool = symbolic_binding_pattern B, 0 [symbolic = %B.patt.loc4_9.2 (constants.%B.patt)] // CHECK:STDOUT: %B.param_patt: bool = value_param_pattern %B.patt.loc4_9.1, runtime_param [symbolic = %B.patt.loc4_9.2 (constants.%B.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc4_13.2: type = converted %bool.make_type, %.loc4_13.1 [template = bool] // CHECK:STDOUT: %B.param: bool = value_param runtime_param +// CHECK:STDOUT: %.loc4_13.3: type = splice_block %.loc4_13.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc4_13.2: type = converted %bool.make_type, %.loc4_13.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %B.loc4_9.1: bool = bind_symbolic_name B, 0, %B.param [symbolic = %B.loc4_9.2 (constants.%B)] // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: %True.type = fn_decl @True [template = constants.%True] { @@ -321,48 +289,12 @@ var d: C(false == false) = True(); // CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %true.loc9_10: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %true.loc9_18: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc9: %Equal.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%Equal.2] -// CHECK:STDOUT: %Equal.bound.loc9: = bound_method %true.loc9_10, %impl.elem0.loc9 [template = constants.%Equal.bound.1] -// CHECK:STDOUT: %bool.eq.loc9: init bool = call %Equal.bound.loc9(%true.loc9_10, %true.loc9_18) [template = constants.%true] -// CHECK:STDOUT: %.loc9_22.1: bool = value_of_initializer %bool.eq.loc9 [template = constants.%true] -// CHECK:STDOUT: %.loc9_22.2: bool = converted %bool.eq.loc9, %.loc9_22.1 [template = constants.%true] -// CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%true) [template = constants.%C.2] // CHECK:STDOUT: %a.var: ref %C.2 = var a // CHECK:STDOUT: %a: ref %C.2 = bind_name a, %a.var -// CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %true.loc10: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %false.loc10: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %impl.elem0.loc10: %Equal.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%Equal.2] -// CHECK:STDOUT: %Equal.bound.loc10: = bound_method %true.loc10, %impl.elem0.loc10 [template = constants.%Equal.bound.1] -// CHECK:STDOUT: %bool.eq.loc10: init bool = call %Equal.bound.loc10(%true.loc10, %false.loc10) [template = constants.%false] -// CHECK:STDOUT: %.loc10_23.1: bool = value_of_initializer %bool.eq.loc10 [template = constants.%false] -// CHECK:STDOUT: %.loc10_23.2: bool = converted %bool.eq.loc10, %.loc10_23.1 [template = constants.%false] -// CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%false) [template = constants.%C.3] // CHECK:STDOUT: %b.var: ref %C.3 = var b // CHECK:STDOUT: %b: ref %C.3 = bind_name b, %b.var -// CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %false.loc11: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %true.loc11: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %impl.elem0.loc11: %Equal.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%Equal.2] -// CHECK:STDOUT: %Equal.bound.loc11: = bound_method %false.loc11, %impl.elem0.loc11 [template = constants.%Equal.bound.2] -// CHECK:STDOUT: %bool.eq.loc11: init bool = call %Equal.bound.loc11(%false.loc11, %true.loc11) [template = constants.%false] -// CHECK:STDOUT: %.loc11_23.1: bool = value_of_initializer %bool.eq.loc11 [template = constants.%false] -// CHECK:STDOUT: %.loc11_23.2: bool = converted %bool.eq.loc11, %.loc11_23.1 [template = constants.%false] -// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%false) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var -// CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %false.loc12_10: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %false.loc12_19: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %impl.elem0.loc12: %Equal.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%Equal.2] -// CHECK:STDOUT: %Equal.bound.loc12: = bound_method %false.loc12_10, %impl.elem0.loc12 [template = constants.%Equal.bound.2] -// CHECK:STDOUT: %bool.eq.loc12: init bool = call %Equal.bound.loc12(%false.loc12_10, %false.loc12_19) [template = constants.%true] -// CHECK:STDOUT: %.loc12_24.1: bool = value_of_initializer %bool.eq.loc12 [template = constants.%true] -// CHECK:STDOUT: %.loc12_24.2: bool = converted %bool.eq.loc12, %.loc12_24.1 [template = constants.%true] -// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%true) [template = constants.%C.2] // CHECK:STDOUT: %d.var: ref %C.2 = var d // CHECK:STDOUT: %d: ref %C.2 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/bool/make_type.carbon b/toolchain/check/testdata/builtins/bool/make_type.carbon index 272bc28ae7ac..73ac6f395e40 100644 --- a/toolchain/check/testdata/builtins/bool/make_type.carbon +++ b/toolchain/check/testdata/builtins/bool/make_type.carbon @@ -77,10 +77,6 @@ var b: Bool() = false; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Bool.ref: %Bool.type = name_ref Bool, imports.%import_ref [template = constants.%Bool] -// CHECK:STDOUT: %bool.make_type: init type = call %Bool.ref() [template = bool] -// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc6_13.2: type = converted %bool.make_type, %.loc6_13.1 [template = bool] // CHECK:STDOUT: %b.var: ref bool = var b // CHECK:STDOUT: %b: ref bool = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/bool/neq.carbon b/toolchain/check/testdata/builtins/bool/neq.carbon index bfa5a1df5490..97f127e556f0 100644 --- a/toolchain/check/testdata/builtins/bool/neq.carbon +++ b/toolchain/check/testdata/builtins/bool/neq.carbon @@ -91,18 +91,22 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc4_11: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %bool.make_type.loc4_11 [template = bool] -// CHECK:STDOUT: %.loc4_11.2: type = converted %bool.make_type.loc4_11, %.loc4_11.1 [template = bool] -// CHECK:STDOUT: %bool.make_type.loc4_20: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc4_20.1: type = value_of_initializer %bool.make_type.loc4_20 [template = bool] -// CHECK:STDOUT: %.loc4_20.2: type = converted %bool.make_type.loc4_20, %.loc4_20.1 [template = bool] // CHECK:STDOUT: %bool.make_type.loc4_29: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc4_29.1: type = value_of_initializer %bool.make_type.loc4_29 [template = bool] // CHECK:STDOUT: %.loc4_29.2: type = converted %bool.make_type.loc4_29, %.loc4_29.1 [template = bool] // CHECK:STDOUT: %a.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11.3: type = splice_block %.loc4_11.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc4_11: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %bool.make_type.loc4_11 [template = bool] +// CHECK:STDOUT: %.loc4_11.2: type = converted %bool.make_type.loc4_11, %.loc4_11.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: bool = bind_name a, %a.param // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_20.3: type = splice_block %.loc4_20.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc4_20: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc4_20.1: type = value_of_initializer %bool.make_type.loc4_20 [template = bool] +// CHECK:STDOUT: %.loc4_20.2: type = converted %bool.make_type.loc4_20, %.loc4_20.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -111,10 +115,12 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %B.patt.loc6_9.1: bool = symbolic_binding_pattern B, 0 [symbolic = %B.patt.loc6_9.2 (constants.%B.patt)] // CHECK:STDOUT: %B.param_patt: bool = value_param_pattern %B.patt.loc6_9.1, runtime_param [symbolic = %B.patt.loc6_9.2 (constants.%B.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc6_13.2: type = converted %bool.make_type, %.loc6_13.1 [template = bool] // CHECK:STDOUT: %B.param: bool = value_param runtime_param +// CHECK:STDOUT: %.loc6_13.3: type = splice_block %.loc6_13.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc6_13.2: type = converted %bool.make_type, %.loc6_13.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %B.loc6_9.1: bool = bind_symbolic_name B, 0, %B.param [symbolic = %B.loc6_9.2 (constants.%B)] // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: %True.type = fn_decl @True [template = constants.%True] { @@ -137,44 +143,12 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %Neq.ref.loc11: %Neq.type = name_ref Neq, %Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %true.loc11_14: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %true.loc11_20: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %bool.neq.loc11: init bool = call %Neq.ref.loc11(%true.loc11_14, %true.loc11_20) [template = constants.%false] -// CHECK:STDOUT: %.loc11_25.1: bool = value_of_initializer %bool.neq.loc11 [template = constants.%false] -// CHECK:STDOUT: %.loc11_25.2: bool = converted %bool.neq.loc11, %.loc11_25.1 [template = constants.%false] -// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%false) [template = constants.%C.3] // CHECK:STDOUT: %a.var: ref %C.3 = var a // CHECK:STDOUT: %a: ref %C.3 = bind_name a, %a.var -// CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %Neq.ref.loc12: %Neq.type = name_ref Neq, %Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %true.loc12: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %false.loc12: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %bool.neq.loc12: init bool = call %Neq.ref.loc12(%true.loc12, %false.loc12) [template = constants.%true] -// CHECK:STDOUT: %.loc12_26.1: bool = value_of_initializer %bool.neq.loc12 [template = constants.%true] -// CHECK:STDOUT: %.loc12_26.2: bool = converted %bool.neq.loc12, %.loc12_26.1 [template = constants.%true] -// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%true) [template = constants.%C.2] // CHECK:STDOUT: %b.var: ref %C.2 = var b // CHECK:STDOUT: %b: ref %C.2 = bind_name b, %b.var -// CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %Neq.ref.loc13: %Neq.type = name_ref Neq, %Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %false.loc13: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %true.loc13: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %bool.neq.loc13: init bool = call %Neq.ref.loc13(%false.loc13, %true.loc13) [template = constants.%true] -// CHECK:STDOUT: %.loc13_26.1: bool = value_of_initializer %bool.neq.loc13 [template = constants.%true] -// CHECK:STDOUT: %.loc13_26.2: bool = converted %bool.neq.loc13, %.loc13_26.1 [template = constants.%true] -// CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%true) [template = constants.%C.2] // CHECK:STDOUT: %c.var: ref %C.2 = var c // CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var -// CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %Neq.ref.loc14: %Neq.type = name_ref Neq, %Neq.decl [template = constants.%Neq] -// CHECK:STDOUT: %false.loc14_14: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %false.loc14_21: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %bool.neq.loc14: init bool = call %Neq.ref.loc14(%false.loc14_14, %false.loc14_21) [template = constants.%false] -// CHECK:STDOUT: %.loc14_27.1: bool = value_of_initializer %bool.neq.loc14 [template = constants.%false] -// CHECK:STDOUT: %.loc14_27.2: bool = converted %bool.neq.loc14, %.loc14_27.1 [template = constants.%false] -// CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%false) [template = constants.%C.3] // CHECK:STDOUT: %d.var: ref %C.3 = var d // CHECK:STDOUT: %d: ref %C.3 = bind_name d, %d.var // CHECK:STDOUT: } @@ -260,14 +234,6 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %C.3: type = class_type @C, @C(%false) [template] // CHECK:STDOUT: %False.type: type = fn_type @False [template] // CHECK:STDOUT: %False: %False.type = struct_value () [template] -// CHECK:STDOUT: %NotEqual.type.1: type = fn_type @NotEqual.1 [template] -// CHECK:STDOUT: %NotEqual.type.2: type = fn_type @NotEqual.2 [template] -// CHECK:STDOUT: %NotEqual.2: %NotEqual.type.2 = struct_value () [template] -// CHECK:STDOUT: %Equal.type: type = fn_type @Equal [template] -// CHECK:STDOUT: %Equal: %Equal.type = struct_value () [template] -// CHECK:STDOUT: %interface: = interface_witness (%Equal, %NotEqual.2) [template] -// CHECK:STDOUT: %NotEqual.bound.1: = bound_method %true, %NotEqual.2 [template] -// CHECK:STDOUT: %NotEqual.bound.2: = bound_method %false, %NotEqual.2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -295,10 +261,12 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %B.patt.loc4_9.1: bool = symbolic_binding_pattern B, 0 [symbolic = %B.patt.loc4_9.2 (constants.%B.patt)] // CHECK:STDOUT: %B.param_patt: bool = value_param_pattern %B.patt.loc4_9.1, runtime_param [symbolic = %B.patt.loc4_9.2 (constants.%B.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc4_13.2: type = converted %bool.make_type, %.loc4_13.1 [template = bool] // CHECK:STDOUT: %B.param: bool = value_param runtime_param +// CHECK:STDOUT: %.loc4_13.3: type = splice_block %.loc4_13.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc4_13.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc4_13.2: type = converted %bool.make_type, %.loc4_13.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %B.loc4_9.1: bool = bind_symbolic_name B, 0, %B.param [symbolic = %B.loc4_9.2 (constants.%B)] // CHECK:STDOUT: } // CHECK:STDOUT: %True.decl: %True.type = fn_decl @True [template = constants.%True] { @@ -321,48 +289,12 @@ var d: C(false != false) = False(); // CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %true.loc9_10: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %true.loc9_18: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %impl.elem1.loc9: %NotEqual.type.1 = interface_witness_access constants.%interface, element1 [template = constants.%NotEqual.2] -// CHECK:STDOUT: %NotEqual.bound.loc9: = bound_method %true.loc9_10, %impl.elem1.loc9 [template = constants.%NotEqual.bound.1] -// CHECK:STDOUT: %bool.neq.loc9: init bool = call %NotEqual.bound.loc9(%true.loc9_10, %true.loc9_18) [template = constants.%false] -// CHECK:STDOUT: %.loc9_22.1: bool = value_of_initializer %bool.neq.loc9 [template = constants.%false] -// CHECK:STDOUT: %.loc9_22.2: bool = converted %bool.neq.loc9, %.loc9_22.1 [template = constants.%false] -// CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%false) [template = constants.%C.3] // CHECK:STDOUT: %a.var: ref %C.3 = var a // CHECK:STDOUT: %a: ref %C.3 = bind_name a, %a.var -// CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %true.loc10: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %false.loc10: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %impl.elem1.loc10: %NotEqual.type.1 = interface_witness_access constants.%interface, element1 [template = constants.%NotEqual.2] -// CHECK:STDOUT: %NotEqual.bound.loc10: = bound_method %true.loc10, %impl.elem1.loc10 [template = constants.%NotEqual.bound.1] -// CHECK:STDOUT: %bool.neq.loc10: init bool = call %NotEqual.bound.loc10(%true.loc10, %false.loc10) [template = constants.%true] -// CHECK:STDOUT: %.loc10_23.1: bool = value_of_initializer %bool.neq.loc10 [template = constants.%true] -// CHECK:STDOUT: %.loc10_23.2: bool = converted %bool.neq.loc10, %.loc10_23.1 [template = constants.%true] -// CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%true) [template = constants.%C.2] // CHECK:STDOUT: %b.var: ref %C.2 = var b // CHECK:STDOUT: %b: ref %C.2 = bind_name b, %b.var -// CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %false.loc11: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %true.loc11: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %impl.elem1.loc11: %NotEqual.type.1 = interface_witness_access constants.%interface, element1 [template = constants.%NotEqual.2] -// CHECK:STDOUT: %NotEqual.bound.loc11: = bound_method %false.loc11, %impl.elem1.loc11 [template = constants.%NotEqual.bound.2] -// CHECK:STDOUT: %bool.neq.loc11: init bool = call %NotEqual.bound.loc11(%false.loc11, %true.loc11) [template = constants.%true] -// CHECK:STDOUT: %.loc11_23.1: bool = value_of_initializer %bool.neq.loc11 [template = constants.%true] -// CHECK:STDOUT: %.loc11_23.2: bool = converted %bool.neq.loc11, %.loc11_23.1 [template = constants.%true] -// CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%true) [template = constants.%C.2] // CHECK:STDOUT: %c.var: ref %C.2 = var c // CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var -// CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %false.loc12_10: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %false.loc12_19: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %impl.elem1.loc12: %NotEqual.type.1 = interface_witness_access constants.%interface, element1 [template = constants.%NotEqual.2] -// CHECK:STDOUT: %NotEqual.bound.loc12: = bound_method %false.loc12_10, %impl.elem1.loc12 [template = constants.%NotEqual.bound.2] -// CHECK:STDOUT: %bool.neq.loc12: init bool = call %NotEqual.bound.loc12(%false.loc12_10, %false.loc12_19) [template = constants.%false] -// CHECK:STDOUT: %.loc12_24.1: bool = value_of_initializer %bool.neq.loc12 [template = constants.%false] -// CHECK:STDOUT: %.loc12_24.2: bool = converted %bool.neq.loc12, %.loc12_24.1 [template = constants.%false] -// CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%false) [template = constants.%C.3] // CHECK:STDOUT: %d.var: ref %C.3 = var d // CHECK:STDOUT: %d: ref %C.3 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/float/add.carbon b/toolchain/check/testdata/builtins/float/add.carbon index 64d2deb187ae..af85730e1b96 100644 --- a/toolchain/check/testdata/builtins/float/add.carbon +++ b/toolchain/check/testdata/builtins/float/add.carbon @@ -89,21 +89,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] -// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] // CHECK:STDOUT: %int_64.loc2_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%int_64.loc2_27) [template = f64] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = converted %float.make_type.loc2_27, %.loc2_27.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11.3: type = splice_block %.loc2_11.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19.3: type = splice_block %.loc2_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -116,29 +120,29 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] -// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] // CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] // CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_19.3: type = splice_block %.loc4_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_27.3: type = splice_block %.loc4_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type, %.loc8_8.1 [template = f64] // CHECK:STDOUT: %x.var: ref f64 = var x // CHECK:STDOUT: %x: ref f64 = bind_name x, %x.var // CHECK:STDOUT: } @@ -217,15 +221,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] -// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] -// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] // CHECK:STDOUT: %int_64.loc8_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%int_64.loc8_22) [template = f64] // CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = converted %float.make_type.loc8_22, %.loc8_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_14.3: type = splice_block %.loc8_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] +// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -240,27 +246,33 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] -// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] -// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] -// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] -// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] -// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] -// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] // CHECK:STDOUT: %int_64.loc13_39: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%int_64.loc13_39) [template = f64] // CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = converted %float.make_type.loc13_39, %.loc13_39.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_15.3: type = splice_block %.loc13_15.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_23.3: type = splice_block %.loc13_23.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %c.param: f64 = value_param runtime_param2 +// CHECK:STDOUT: %.loc13_31.3: type = splice_block %.loc13_31.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] +// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: f64 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param3 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -273,20 +285,24 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] -// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] -// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] -// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] -// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] -// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type, %.loc17_37.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc17_21.3: type = splice_block %.loc17_21.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] +// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] +// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc17_29.3: type = splice_block %.loc17_29.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] +// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] +// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -299,21 +315,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] -// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] -// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] -// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] -// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] -// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] // CHECK:STDOUT: %int_64.loc18_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%int_64.loc18_33) [template = f64] // CHECK:STDOUT: %.loc18_33.1: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = converted %float.make_type.loc18_33, %.loc18_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_17.3: type = splice_block %.loc18_17.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] +// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] +// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc18_25.3: type = splice_block %.loc18_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] +// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] +// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -324,15 +344,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] -// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] -// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] // CHECK:STDOUT: %int_64.loc20_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%int_64.loc20_33) [template = f64] // CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = converted %float.make_type.loc20_33, %.loc20_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_25.3: type = splice_block %.loc20_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] +// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] +// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -347,27 +369,33 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] -// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] -// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] -// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] -// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] -// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] -// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] -// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] -// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] // CHECK:STDOUT: %int_64.loc24_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%int_64.loc24_50) [template = f64] // CHECK:STDOUT: %.loc24_50.1: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = converted %float.make_type.loc24_50, %.loc24_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc24_26.3: type = splice_block %.loc24_26.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] +// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] +// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc24_34.3: type = splice_block %.loc24_34.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] +// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] +// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %c.param: f64 = value_param runtime_param2 +// CHECK:STDOUT: %.loc24_42.3: type = splice_block %.loc24_42.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] +// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] +// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: f64 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param3 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -380,20 +408,24 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] -// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] -// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] -// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] -// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] -// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type, %.loc28_48.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc28_32.3: type = splice_block %.loc28_32.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] +// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] +// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc28_40.3: type = splice_block %.loc28_40.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] +// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] +// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/div.carbon b/toolchain/check/testdata/builtins/float/div.carbon index df99f7e56dea..a3eb82a0e424 100644 --- a/toolchain/check/testdata/builtins/float/div.carbon +++ b/toolchain/check/testdata/builtins/float/div.carbon @@ -97,21 +97,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] -// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] // CHECK:STDOUT: %int_64.loc2_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%int_64.loc2_27) [template = f64] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = converted %float.make_type.loc2_27, %.loc2_27.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11.3: type = splice_block %.loc2_11.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19.3: type = splice_block %.loc2_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -124,39 +128,31 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] -// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] // CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] // CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_19.3: type = splice_block %.loc4_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_27.3: type = splice_block %.loc4_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_64.loc8: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%int_64.loc8) [template = f64] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type.loc8 [template = f64] -// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type.loc8, %.loc8_8.1 [template = f64] // CHECK:STDOUT: %a.var: ref f64 = var a // CHECK:STDOUT: %a: ref f64 = bind_name a, %a.var -// CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc9: init type = call constants.%Float(%int_64.loc9) [template = f64] -// CHECK:STDOUT: %.loc9_8.1: type = value_of_initializer %float.make_type.loc9 [template = f64] -// CHECK:STDOUT: %.loc9_8.2: type = converted %float.make_type.loc9, %.loc9_8.1 [template = f64] -// CHECK:STDOUT: %int_64.loc10: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc10: init type = call constants.%Float(%int_64.loc10) [template = f64] -// CHECK:STDOUT: %.loc10_8.1: type = value_of_initializer %float.make_type.loc10 [template = f64] -// CHECK:STDOUT: %.loc10_8.2: type = converted %float.make_type.loc10, %.loc10_8.1 [template = f64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div(%a.param_patt: f64, %b.param_patt: f64) -> f64 = "float.div"; @@ -247,15 +243,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] -// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] -// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] // CHECK:STDOUT: %int_64.loc8_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%int_64.loc8_22) [template = f64] // CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = converted %float.make_type.loc8_22, %.loc8_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_14.3: type = splice_block %.loc8_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] +// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -270,27 +268,33 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] -// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] -// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] -// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] -// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] -// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] -// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] // CHECK:STDOUT: %int_64.loc13_39: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%int_64.loc13_39) [template = f64] // CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = converted %float.make_type.loc13_39, %.loc13_39.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_15.3: type = splice_block %.loc13_15.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_23.3: type = splice_block %.loc13_23.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %c.param: f64 = value_param runtime_param2 +// CHECK:STDOUT: %.loc13_31.3: type = splice_block %.loc13_31.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] +// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: f64 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param3 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -303,20 +307,24 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] -// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] -// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] -// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] -// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] -// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type, %.loc17_37.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc17_21.3: type = splice_block %.loc17_21.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] +// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] +// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc17_29.3: type = splice_block %.loc17_29.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] +// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] +// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -329,21 +337,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] -// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] -// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] -// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] -// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] -// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] // CHECK:STDOUT: %int_64.loc18_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%int_64.loc18_33) [template = f64] // CHECK:STDOUT: %.loc18_33.1: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = converted %float.make_type.loc18_33, %.loc18_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_17.3: type = splice_block %.loc18_17.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] +// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] +// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc18_25.3: type = splice_block %.loc18_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] +// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] +// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -354,15 +366,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] -// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] -// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] // CHECK:STDOUT: %int_64.loc20_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%int_64.loc20_33) [template = f64] // CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = converted %float.make_type.loc20_33, %.loc20_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_25.3: type = splice_block %.loc20_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] +// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] +// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -377,27 +391,33 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] -// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] -// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] -// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] -// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] -// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] -// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] -// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] -// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] // CHECK:STDOUT: %int_64.loc24_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%int_64.loc24_50) [template = f64] // CHECK:STDOUT: %.loc24_50.1: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = converted %float.make_type.loc24_50, %.loc24_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc24_26.3: type = splice_block %.loc24_26.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] +// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] +// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc24_34.3: type = splice_block %.loc24_34.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] +// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] +// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %c.param: f64 = value_param runtime_param2 +// CHECK:STDOUT: %.loc24_42.3: type = splice_block %.loc24_42.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] +// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] +// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: f64 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param3 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -410,20 +430,24 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] -// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] -// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] -// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] -// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] -// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type, %.loc28_48.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc28_32.3: type = splice_block %.loc28_32.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] +// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] +// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc28_40.3: type = splice_block %.loc28_40.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] +// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] +// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/eq.carbon b/toolchain/check/testdata/builtins/float/eq.carbon index 9b4432e2bd0b..02bc70b57710 100644 --- a/toolchain/check/testdata/builtins/float/eq.carbon +++ b/toolchain/check/testdata/builtins/float/eq.carbon @@ -84,20 +84,24 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_10: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_10: init type = call constants.%Float(%int_64.loc2_10) [template = f64] -// CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %float.make_type.loc2_10 [template = f64] -// CHECK:STDOUT: %.loc2_10.2: type = converted %float.make_type.loc2_10, %.loc2_10.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_18: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_18: init type = call constants.%Float(%int_64.loc2_18) [template = f64] -// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %float.make_type.loc2_18 [template = f64] -// CHECK:STDOUT: %.loc2_18.2: type = converted %float.make_type.loc2_18, %.loc2_18.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_26.2: type = converted %bool.make_type, %.loc2_26.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_10.3: type = splice_block %.loc2_10.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_10: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_10: init type = call constants.%Float(%int_64.loc2_10) [template = f64] +// CHECK:STDOUT: %.loc2_10.1: type = value_of_initializer %float.make_type.loc2_10 [template = f64] +// CHECK:STDOUT: %.loc2_10.2: type = converted %float.make_type.loc2_10, %.loc2_10.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_18.3: type = splice_block %.loc2_18.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_18: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_18: init type = call constants.%Float(%int_64.loc2_18) [template = f64] +// CHECK:STDOUT: %.loc2_18.1: type = value_of_initializer %float.make_type.loc2_18 [template = f64] +// CHECK:STDOUT: %.loc2_18.2: type = converted %float.make_type.loc2_18, %.loc2_18.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -110,11 +114,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc7: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc7: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc7: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc7: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -125,20 +129,24 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc12_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%int_64.loc12_19) [template = f64] -// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %float.make_type.loc12_19 [template = f64] -// CHECK:STDOUT: %.loc12_19.2: type = converted %float.make_type.loc12_19, %.loc12_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc12_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%int_64.loc12_27) [template = f64] -// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %float.make_type.loc12_27 [template = f64] -// CHECK:STDOUT: %.loc12_27.2: type = converted %float.make_type.loc12_27, %.loc12_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_19.3: type = splice_block %.loc12_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc12_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%int_64.loc12_19) [template = f64] +// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %float.make_type.loc12_19 [template = f64] +// CHECK:STDOUT: %.loc12_19.2: type = converted %float.make_type.loc12_19, %.loc12_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc12_27.3: type = splice_block %.loc12_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc12_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%int_64.loc12_27) [template = f64] +// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %float.make_type.loc12_27 [template = f64] +// CHECK:STDOUT: %.loc12_27.2: type = converted %float.make_type.loc12_27, %.loc12_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -249,21 +257,25 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc7_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%int_64.loc7_19) [template = f64] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %float.make_type.loc7_19 [template = f64] -// CHECK:STDOUT: %.loc7_19.2: type = converted %float.make_type.loc7_19, %.loc7_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc7_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%int_64.loc7_27) [template = f64] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %float.make_type.loc7_27 [template = f64] -// CHECK:STDOUT: %.loc7_27.2: type = converted %float.make_type.loc7_27, %.loc7_27.1 [template = f64] // CHECK:STDOUT: %int_64.loc7_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%int_64.loc7_35) [template = f64] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %float.make_type.loc7_35 [template = f64] // CHECK:STDOUT: %.loc7_35.2: type = converted %float.make_type.loc7_35, %.loc7_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19.3: type = splice_block %.loc7_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc7_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%int_64.loc7_19) [template = f64] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %float.make_type.loc7_19 [template = f64] +// CHECK:STDOUT: %.loc7_19.2: type = converted %float.make_type.loc7_19, %.loc7_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27.3: type = splice_block %.loc7_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc7_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%int_64.loc7_27) [template = f64] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %float.make_type.loc7_27 [template = f64] +// CHECK:STDOUT: %.loc7_27.2: type = converted %float.make_type.loc7_27, %.loc7_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/greater.carbon b/toolchain/check/testdata/builtins/float/greater.carbon index c3c8c1efd437..b91d825dc0d5 100644 --- a/toolchain/check/testdata/builtins/float/greater.carbon +++ b/toolchain/check/testdata/builtins/float/greater.carbon @@ -84,20 +84,24 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_15: init type = call constants.%Float(%int_64.loc2_15) [template = f64] -// CHECK:STDOUT: %.loc2_15.1: type = value_of_initializer %float.make_type.loc2_15 [template = f64] -// CHECK:STDOUT: %.loc2_15.2: type = converted %float.make_type.loc2_15, %.loc2_15.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_23: init type = call constants.%Float(%int_64.loc2_23) [template = f64] -// CHECK:STDOUT: %.loc2_23.1: type = value_of_initializer %float.make_type.loc2_23 [template = f64] -// CHECK:STDOUT: %.loc2_23.2: type = converted %float.make_type.loc2_23, %.loc2_23.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_31.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_31.2: type = converted %bool.make_type, %.loc2_31.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_15.3: type = splice_block %.loc2_15.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_15: init type = call constants.%Float(%int_64.loc2_15) [template = f64] +// CHECK:STDOUT: %.loc2_15.1: type = value_of_initializer %float.make_type.loc2_15 [template = f64] +// CHECK:STDOUT: %.loc2_15.2: type = converted %float.make_type.loc2_15, %.loc2_15.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_23.3: type = splice_block %.loc2_23.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_23: init type = call constants.%Float(%int_64.loc2_23) [template = f64] +// CHECK:STDOUT: %.loc2_23.1: type = value_of_initializer %float.make_type.loc2_23 [template = f64] +// CHECK:STDOUT: %.loc2_23.2: type = converted %float.make_type.loc2_23, %.loc2_23.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -108,15 +112,17 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] -// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] // CHECK:STDOUT: %int_64.loc3_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%int_64.loc3_22) [template = f64] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = converted %float.make_type.loc3_22, %.loc3_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc3_14.3: type = splice_block %.loc3_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] +// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -129,11 +135,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -144,20 +150,24 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] -// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] -// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] -// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_19.3: type = splice_block %.loc16_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] +// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_27.3: type = splice_block %.loc16_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] +// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/greater_eq.carbon b/toolchain/check/testdata/builtins/float/greater_eq.carbon index 14d3f065fda1..3036c4d5d860 100644 --- a/toolchain/check/testdata/builtins/float/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/float/greater_eq.carbon @@ -84,20 +84,24 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_17: init type = call constants.%Float(%int_64.loc2_17) [template = f64] -// CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %float.make_type.loc2_17 [template = f64] -// CHECK:STDOUT: %.loc2_17.2: type = converted %float.make_type.loc2_17, %.loc2_17.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_25: init type = call constants.%Float(%int_64.loc2_25) [template = f64] -// CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %float.make_type.loc2_25 [template = f64] -// CHECK:STDOUT: %.loc2_25.2: type = converted %float.make_type.loc2_25, %.loc2_25.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_33.2: type = converted %bool.make_type, %.loc2_33.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_17.3: type = splice_block %.loc2_17.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_17: init type = call constants.%Float(%int_64.loc2_17) [template = f64] +// CHECK:STDOUT: %.loc2_17.1: type = value_of_initializer %float.make_type.loc2_17 [template = f64] +// CHECK:STDOUT: %.loc2_17.2: type = converted %float.make_type.loc2_17, %.loc2_17.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_25.3: type = splice_block %.loc2_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_25: init type = call constants.%Float(%int_64.loc2_25) [template = f64] +// CHECK:STDOUT: %.loc2_25.1: type = value_of_initializer %float.make_type.loc2_25 [template = f64] +// CHECK:STDOUT: %.loc2_25.2: type = converted %float.make_type.loc2_25, %.loc2_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -108,15 +112,17 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] -// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] // CHECK:STDOUT: %int_64.loc3_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%int_64.loc3_22) [template = f64] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = converted %float.make_type.loc3_22, %.loc3_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc3_14.3: type = splice_block %.loc3_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] +// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -129,11 +135,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -144,20 +150,24 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] -// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] -// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] -// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_19.3: type = splice_block %.loc16_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] +// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_27.3: type = splice_block %.loc16_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] +// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/less.carbon b/toolchain/check/testdata/builtins/float/less.carbon index b921649b2643..9d09242ad78b 100644 --- a/toolchain/check/testdata/builtins/float/less.carbon +++ b/toolchain/check/testdata/builtins/float/less.carbon @@ -84,20 +84,24 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_12: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_12: init type = call constants.%Float(%int_64.loc2_12) [template = f64] -// CHECK:STDOUT: %.loc2_12.1: type = value_of_initializer %float.make_type.loc2_12 [template = f64] -// CHECK:STDOUT: %.loc2_12.2: type = converted %float.make_type.loc2_12, %.loc2_12.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_20: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_20: init type = call constants.%Float(%int_64.loc2_20) [template = f64] -// CHECK:STDOUT: %.loc2_20.1: type = value_of_initializer %float.make_type.loc2_20 [template = f64] -// CHECK:STDOUT: %.loc2_20.2: type = converted %float.make_type.loc2_20, %.loc2_20.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_28.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_28.2: type = converted %bool.make_type, %.loc2_28.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_12.3: type = splice_block %.loc2_12.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_12: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_12: init type = call constants.%Float(%int_64.loc2_12) [template = f64] +// CHECK:STDOUT: %.loc2_12.1: type = value_of_initializer %float.make_type.loc2_12 [template = f64] +// CHECK:STDOUT: %.loc2_12.2: type = converted %float.make_type.loc2_12, %.loc2_12.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_20.3: type = splice_block %.loc2_20.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_20: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_20: init type = call constants.%Float(%int_64.loc2_20) [template = f64] +// CHECK:STDOUT: %.loc2_20.1: type = value_of_initializer %float.make_type.loc2_20 [template = f64] +// CHECK:STDOUT: %.loc2_20.2: type = converted %float.make_type.loc2_20, %.loc2_20.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -108,15 +112,17 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] -// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] // CHECK:STDOUT: %int_64.loc3_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%int_64.loc3_22) [template = f64] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = converted %float.make_type.loc3_22, %.loc3_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc3_14.3: type = splice_block %.loc3_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] +// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -129,11 +135,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -144,20 +150,24 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] -// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] -// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] -// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_19.3: type = splice_block %.loc16_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] +// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_27.3: type = splice_block %.loc16_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] +// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/less_eq.carbon b/toolchain/check/testdata/builtins/float/less_eq.carbon index 8e0d95c45775..fa8940f233fd 100644 --- a/toolchain/check/testdata/builtins/float/less_eq.carbon +++ b/toolchain/check/testdata/builtins/float/less_eq.carbon @@ -84,20 +84,24 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%int_64.loc2_14) [template = f64] -// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %float.make_type.loc2_14 [template = f64] -// CHECK:STDOUT: %.loc2_14.2: type = converted %float.make_type.loc2_14, %.loc2_14.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%int_64.loc2_22) [template = f64] -// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %float.make_type.loc2_22 [template = f64] -// CHECK:STDOUT: %.loc2_22.2: type = converted %float.make_type.loc2_22, %.loc2_22.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_30.2: type = converted %bool.make_type, %.loc2_30.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_14.3: type = splice_block %.loc2_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%int_64.loc2_14) [template = f64] +// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %float.make_type.loc2_14 [template = f64] +// CHECK:STDOUT: %.loc2_14.2: type = converted %float.make_type.loc2_14, %.loc2_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_22.3: type = splice_block %.loc2_22.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%int_64.loc2_22) [template = f64] +// CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %float.make_type.loc2_22 [template = f64] +// CHECK:STDOUT: %.loc2_22.2: type = converted %float.make_type.loc2_22, %.loc2_22.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -108,15 +112,17 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] -// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] -// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] // CHECK:STDOUT: %int_64.loc3_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%int_64.loc3_22) [template = f64] // CHECK:STDOUT: %.loc3_22.1: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = converted %float.make_type.loc3_22, %.loc3_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc3_14.3: type = splice_block %.loc3_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc3_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%int_64.loc3_14) [template = f64] +// CHECK:STDOUT: %.loc3_14.1: type = value_of_initializer %float.make_type.loc3_14 [template = f64] +// CHECK:STDOUT: %.loc3_14.2: type = converted %float.make_type.loc3_14, %.loc3_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -129,11 +135,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -144,20 +150,24 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] -// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] -// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] -// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] -// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_19.3: type = splice_block %.loc16_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc16_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%int_64.loc16_19) [template = f64] +// CHECK:STDOUT: %.loc16_19.1: type = value_of_initializer %float.make_type.loc16_19 [template = f64] +// CHECK:STDOUT: %.loc16_19.2: type = converted %float.make_type.loc16_19, %.loc16_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_27.3: type = splice_block %.loc16_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc16_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%int_64.loc16_27) [template = f64] +// CHECK:STDOUT: %.loc16_27.1: type = value_of_initializer %float.make_type.loc16_27 [template = f64] +// CHECK:STDOUT: %.loc16_27.2: type = converted %float.make_type.loc16_27, %.loc16_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index 7fb8e8f28e4f..90ab08701326 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -73,9 +73,11 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %size.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %size: %i32 = bind_name size, %size.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -91,14 +93,6 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %int_64.1: Core.IntLiteral = int_value 64 [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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_64.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] -// CHECK:STDOUT: %int_64.2: %i32 = int_value 64 [template] // CHECK:STDOUT: %float: f64 = float_literal 0 [template] // CHECK:STDOUT: %GetFloat.type: type = fn_type @GetFloat [template] // CHECK:STDOUT: %GetFloat: %GetFloat.type = struct_value () [template] @@ -123,17 +117,6 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] -// 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.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_64, %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_64) [template = constants.%int_64.2] -// CHECK:STDOUT: %.loc6_14.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_64.2] -// CHECK:STDOUT: %.loc6_14.2: %i32 = converted %int_64, %.loc6_14.1 [template = constants.%int_64.2] -// CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%.loc6_14.2) [template = f64] -// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc6_16.2: type = converted %float.make_type, %.loc6_16.1 [template = f64] // CHECK:STDOUT: %f.var: ref f64 = var f // CHECK:STDOUT: %f: ref f64 = bind_name f, %f.var // CHECK:STDOUT: %GetFloat.decl: %GetFloat.type = fn_decl @GetFloat [template = constants.%GetFloat] { @@ -142,9 +125,11 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %dyn_size.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %dyn_size: %i32 = bind_name dyn_size, %dyn_size.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -181,9 +166,6 @@ var dyn: Float(dyn_size); // 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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_32.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32.1) [template] -// CHECK:STDOUT: %int_32.2: %i32 = int_value 32 [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.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32.1) [template] @@ -210,29 +192,10 @@ var dyn: Float(dyn_size); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Float.ref.loc10: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] -// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_32.loc10, %impl.elem0 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(constants.%int_32.1) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_32.loc10) [template = constants.%int_32.2] -// CHECK:STDOUT: %.loc10_26.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_32.2] -// CHECK:STDOUT: %.loc10_26.2: %i32 = converted %int_32.loc10, %.loc10_26.1 [template = constants.%int_32.2] -// CHECK:STDOUT: %float.make_type.loc10: init type = call %Float.ref.loc10(%.loc10_26.2) [template = ] -// CHECK:STDOUT: %.loc10_28.1: type = value_of_initializer %float.make_type.loc10 [template = ] -// CHECK:STDOUT: %.loc10_28.2: type = converted %float.make_type.loc10, %.loc10_28.1 [template = ] // CHECK:STDOUT: %invalid_float.var: ref = var invalid_float // CHECK:STDOUT: %invalid_float: ref = bind_name invalid_float, %invalid_float.var -// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %dyn_size.var: ref %i32 = var dyn_size // CHECK:STDOUT: %dyn_size: ref %i32 = bind_name dyn_size, %dyn_size.var -// CHECK:STDOUT: %Float.ref.loc16: %Float.type = name_ref Float, imports.%import_ref.1 [template = constants.%Float] -// CHECK:STDOUT: %dyn_size.ref: ref %i32 = name_ref dyn_size, %dyn_size -// CHECK:STDOUT: %.loc16_16: %i32 = bind_value %dyn_size.ref -// CHECK:STDOUT: %float.make_type.loc16: init type = call %Float.ref.loc16(%.loc16_16) -// CHECK:STDOUT: %.loc16_24.1: type = value_of_initializer %float.make_type.loc16 -// CHECK:STDOUT: %.loc16_24.2: type = converted %float.make_type.loc16, %.loc16_24.1 // CHECK:STDOUT: %dyn.var: ref = var dyn // CHECK:STDOUT: %dyn: ref = bind_name dyn, %dyn.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/float/mul.carbon b/toolchain/check/testdata/builtins/float/mul.carbon index b76b9c7a76cc..3bd14ab9a5d7 100644 --- a/toolchain/check/testdata/builtins/float/mul.carbon +++ b/toolchain/check/testdata/builtins/float/mul.carbon @@ -89,21 +89,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] -// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] // CHECK:STDOUT: %int_64.loc2_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%int_64.loc2_27) [template = f64] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = converted %float.make_type.loc2_27, %.loc2_27.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11.3: type = splice_block %.loc2_11.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19.3: type = splice_block %.loc2_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -116,29 +120,29 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] -// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] // CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] // CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_19.3: type = splice_block %.loc4_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_27.3: type = splice_block %.loc4_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type, %.loc8_8.1 [template = f64] // CHECK:STDOUT: %x.var: ref f64 = var x // CHECK:STDOUT: %x: ref f64 = bind_name x, %x.var // CHECK:STDOUT: } @@ -217,15 +221,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] -// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] -// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] // CHECK:STDOUT: %int_64.loc8_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%int_64.loc8_22) [template = f64] // CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = converted %float.make_type.loc8_22, %.loc8_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_14.3: type = splice_block %.loc8_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] +// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -240,27 +246,33 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] -// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] -// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] -// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] -// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] -// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] -// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] // CHECK:STDOUT: %int_64.loc13_39: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%int_64.loc13_39) [template = f64] // CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = converted %float.make_type.loc13_39, %.loc13_39.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_15.3: type = splice_block %.loc13_15.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_23.3: type = splice_block %.loc13_23.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %c.param: f64 = value_param runtime_param2 +// CHECK:STDOUT: %.loc13_31.3: type = splice_block %.loc13_31.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] +// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: f64 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param3 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -273,20 +285,24 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] -// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] -// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] -// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] -// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] -// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type, %.loc17_37.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc17_21.3: type = splice_block %.loc17_21.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] +// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] +// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc17_29.3: type = splice_block %.loc17_29.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] +// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] +// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -299,21 +315,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] -// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] -// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] -// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] -// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] -// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] // CHECK:STDOUT: %int_64.loc18_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%int_64.loc18_33) [template = f64] // CHECK:STDOUT: %.loc18_33.1: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = converted %float.make_type.loc18_33, %.loc18_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_17.3: type = splice_block %.loc18_17.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] +// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] +// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc18_25.3: type = splice_block %.loc18_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] +// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] +// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -324,15 +344,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] -// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] -// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] // CHECK:STDOUT: %int_64.loc20_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%int_64.loc20_33) [template = f64] // CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = converted %float.make_type.loc20_33, %.loc20_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_25.3: type = splice_block %.loc20_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] +// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] +// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -347,27 +369,33 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] -// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] -// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] -// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] -// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] -// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] -// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] -// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] -// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] // CHECK:STDOUT: %int_64.loc24_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%int_64.loc24_50) [template = f64] // CHECK:STDOUT: %.loc24_50.1: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = converted %float.make_type.loc24_50, %.loc24_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc24_26.3: type = splice_block %.loc24_26.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] +// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] +// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc24_34.3: type = splice_block %.loc24_34.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] +// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] +// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %c.param: f64 = value_param runtime_param2 +// CHECK:STDOUT: %.loc24_42.3: type = splice_block %.loc24_42.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] +// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] +// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: f64 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param3 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -380,20 +408,24 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] -// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] -// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] -// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] -// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] -// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type, %.loc28_48.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc28_32.3: type = splice_block %.loc28_32.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] +// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] +// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc28_40.3: type = splice_block %.loc28_40.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] +// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] +// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/negate.carbon b/toolchain/check/testdata/builtins/float/negate.carbon index 4d7d145df305..65d358029423 100644 --- a/toolchain/check/testdata/builtins/float/negate.carbon +++ b/toolchain/check/testdata/builtins/float/negate.carbon @@ -107,15 +107,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%int_64.loc2_14) [template = f64] -// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %float.make_type.loc2_14 [template = f64] -// CHECK:STDOUT: %.loc2_14.2: type = converted %float.make_type.loc2_14, %.loc2_14.1 [template = f64] // CHECK:STDOUT: %int_64.loc2_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%int_64.loc2_22) [template = f64] // CHECK:STDOUT: %.loc2_22.1: type = value_of_initializer %float.make_type.loc2_22 [template = f64] // CHECK:STDOUT: %.loc2_22.2: type = converted %float.make_type.loc2_22, %.loc2_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_14.3: type = splice_block %.loc2_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%int_64.loc2_14) [template = f64] +// CHECK:STDOUT: %.loc2_14.1: type = value_of_initializer %float.make_type.loc2_14 [template = f64] +// CHECK:STDOUT: %.loc2_14.2: type = converted %float.make_type.loc2_14, %.loc2_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -128,29 +130,29 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] -// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] // CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] // CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_19.3: type = splice_block %.loc4_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_27.3: type = splice_block %.loc4_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type, %.loc8_8.1 [template = f64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a.param_patt: f64) -> f64 = "float.negate"; @@ -240,21 +242,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] -// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] -// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] -// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] // CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_15.3: type = splice_block %.loc13_15.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_23.3: type = splice_block %.loc13_23.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -265,14 +271,16 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc18_21.2: type = converted %float.make_type, %.loc18_21.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type, %.loc18_29.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_21.3: type = splice_block %.loc18_21.2 [template = f64] { +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc18_21.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc18_21.2: type = converted %float.make_type, %.loc18_21.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -283,15 +291,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc19_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc19_17: init type = call constants.%Float(%int_64.loc19_17) [template = f64] -// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %float.make_type.loc19_17 [template = f64] -// CHECK:STDOUT: %.loc19_17.2: type = converted %float.make_type.loc19_17, %.loc19_17.1 [template = f64] // CHECK:STDOUT: %int_64.loc19_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc19_25: init type = call constants.%Float(%int_64.loc19_25) [template = f64] // CHECK:STDOUT: %.loc19_25.1: type = value_of_initializer %float.make_type.loc19_25 [template = f64] // CHECK:STDOUT: %.loc19_25.2: type = converted %float.make_type.loc19_25, %.loc19_25.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19_17.3: type = splice_block %.loc19_17.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc19_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc19_17: init type = call constants.%Float(%int_64.loc19_17) [template = f64] +// CHECK:STDOUT: %.loc19_17.1: type = value_of_initializer %float.make_type.loc19_17 [template = f64] +// CHECK:STDOUT: %.loc19_17.2: type = converted %float.make_type.loc19_17, %.loc19_17.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -302,15 +312,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc21_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc21_25: init type = call constants.%Float(%int_64.loc21_25) [template = f64] -// CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %float.make_type.loc21_25 [template = f64] -// CHECK:STDOUT: %.loc21_25.2: type = converted %float.make_type.loc21_25, %.loc21_25.1 [template = f64] // CHECK:STDOUT: %int_64.loc21_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc21_33: init type = call constants.%Float(%int_64.loc21_33) [template = f64] // CHECK:STDOUT: %.loc21_33.1: type = value_of_initializer %float.make_type.loc21_33 [template = f64] // CHECK:STDOUT: %.loc21_33.2: type = converted %float.make_type.loc21_33, %.loc21_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21_25.3: type = splice_block %.loc21_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc21_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc21_25: init type = call constants.%Float(%int_64.loc21_25) [template = f64] +// CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %float.make_type.loc21_25 [template = f64] +// CHECK:STDOUT: %.loc21_25.2: type = converted %float.make_type.loc21_25, %.loc21_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -325,27 +337,33 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc32_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc32_26: init type = call constants.%Float(%int_64.loc32_26) [template = f64] -// CHECK:STDOUT: %.loc32_26.1: type = value_of_initializer %float.make_type.loc32_26 [template = f64] -// CHECK:STDOUT: %.loc32_26.2: type = converted %float.make_type.loc32_26, %.loc32_26.1 [template = f64] -// CHECK:STDOUT: %int_64.loc32_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc32_34: init type = call constants.%Float(%int_64.loc32_34) [template = f64] -// CHECK:STDOUT: %.loc32_34.1: type = value_of_initializer %float.make_type.loc32_34 [template = f64] -// CHECK:STDOUT: %.loc32_34.2: type = converted %float.make_type.loc32_34, %.loc32_34.1 [template = f64] -// CHECK:STDOUT: %int_64.loc32_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc32_42: init type = call constants.%Float(%int_64.loc32_42) [template = f64] -// CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %float.make_type.loc32_42 [template = f64] -// CHECK:STDOUT: %.loc32_42.2: type = converted %float.make_type.loc32_42, %.loc32_42.1 [template = f64] // CHECK:STDOUT: %int_64.loc32_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc32_50: init type = call constants.%Float(%int_64.loc32_50) [template = f64] // CHECK:STDOUT: %.loc32_50.1: type = value_of_initializer %float.make_type.loc32_50 [template = f64] // CHECK:STDOUT: %.loc32_50.2: type = converted %float.make_type.loc32_50, %.loc32_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc32_26.3: type = splice_block %.loc32_26.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc32_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc32_26: init type = call constants.%Float(%int_64.loc32_26) [template = f64] +// CHECK:STDOUT: %.loc32_26.1: type = value_of_initializer %float.make_type.loc32_26 [template = f64] +// CHECK:STDOUT: %.loc32_26.2: type = converted %float.make_type.loc32_26, %.loc32_26.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc32_34.3: type = splice_block %.loc32_34.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc32_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc32_34: init type = call constants.%Float(%int_64.loc32_34) [template = f64] +// CHECK:STDOUT: %.loc32_34.1: type = value_of_initializer %float.make_type.loc32_34 [template = f64] +// CHECK:STDOUT: %.loc32_34.2: type = converted %float.make_type.loc32_34, %.loc32_34.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %c.param: f64 = value_param runtime_param2 +// CHECK:STDOUT: %.loc32_42.3: type = splice_block %.loc32_42.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc32_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc32_42: init type = call constants.%Float(%int_64.loc32_42) [template = f64] +// CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %float.make_type.loc32_42 [template = f64] +// CHECK:STDOUT: %.loc32_42.2: type = converted %float.make_type.loc32_42, %.loc32_42.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: f64 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param3 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -358,20 +376,24 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc43_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc43_32: init type = call constants.%Float(%int_64.loc43_32) [template = f64] -// CHECK:STDOUT: %.loc43_32.1: type = value_of_initializer %float.make_type.loc43_32 [template = f64] -// CHECK:STDOUT: %.loc43_32.2: type = converted %float.make_type.loc43_32, %.loc43_32.1 [template = f64] -// CHECK:STDOUT: %int_64.loc43_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc43_40: init type = call constants.%Float(%int_64.loc43_40) [template = f64] -// CHECK:STDOUT: %.loc43_40.1: type = value_of_initializer %float.make_type.loc43_40 [template = f64] -// CHECK:STDOUT: %.loc43_40.2: type = converted %float.make_type.loc43_40, %.loc43_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc43_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc43_48.2: type = converted %bool.make_type, %.loc43_48.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc43_32.3: type = splice_block %.loc43_32.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc43_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc43_32: init type = call constants.%Float(%int_64.loc43_32) [template = f64] +// CHECK:STDOUT: %.loc43_32.1: type = value_of_initializer %float.make_type.loc43_32 [template = f64] +// CHECK:STDOUT: %.loc43_32.2: type = converted %float.make_type.loc43_32, %.loc43_32.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc43_40.3: type = splice_block %.loc43_40.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc43_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc43_40: init type = call constants.%Float(%int_64.loc43_40) [template = f64] +// CHECK:STDOUT: %.loc43_40.1: type = value_of_initializer %float.make_type.loc43_40 [template = f64] +// CHECK:STDOUT: %.loc43_40.2: type = converted %float.make_type.loc43_40, %.loc43_40.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/neq.carbon b/toolchain/check/testdata/builtins/float/neq.carbon index 67782c3b17a5..a0291dbf186c 100644 --- a/toolchain/check/testdata/builtins/float/neq.carbon +++ b/toolchain/check/testdata/builtins/float/neq.carbon @@ -84,20 +84,24 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] -// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_27.2: type = converted %bool.make_type, %.loc2_27.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11.3: type = splice_block %.loc2_11.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19.3: type = splice_block %.loc2_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -110,11 +114,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc7: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc7: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc7: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc7: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -125,20 +129,24 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc12_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%int_64.loc12_19) [template = f64] -// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %float.make_type.loc12_19 [template = f64] -// CHECK:STDOUT: %.loc12_19.2: type = converted %float.make_type.loc12_19, %.loc12_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc12_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%int_64.loc12_27) [template = f64] -// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %float.make_type.loc12_27 [template = f64] -// CHECK:STDOUT: %.loc12_27.2: type = converted %float.make_type.loc12_27, %.loc12_27.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_19.3: type = splice_block %.loc12_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc12_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%int_64.loc12_19) [template = f64] +// CHECK:STDOUT: %.loc12_19.1: type = value_of_initializer %float.make_type.loc12_19 [template = f64] +// CHECK:STDOUT: %.loc12_19.2: type = converted %float.make_type.loc12_19, %.loc12_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc12_27.3: type = splice_block %.loc12_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc12_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%int_64.loc12_27) [template = f64] +// CHECK:STDOUT: %.loc12_27.1: type = value_of_initializer %float.make_type.loc12_27 [template = f64] +// CHECK:STDOUT: %.loc12_27.2: type = converted %float.make_type.loc12_27, %.loc12_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -249,21 +257,25 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc7_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%int_64.loc7_19) [template = f64] -// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %float.make_type.loc7_19 [template = f64] -// CHECK:STDOUT: %.loc7_19.2: type = converted %float.make_type.loc7_19, %.loc7_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc7_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%int_64.loc7_27) [template = f64] -// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %float.make_type.loc7_27 [template = f64] -// CHECK:STDOUT: %.loc7_27.2: type = converted %float.make_type.loc7_27, %.loc7_27.1 [template = f64] // CHECK:STDOUT: %int_64.loc7_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%int_64.loc7_35) [template = f64] // CHECK:STDOUT: %.loc7_35.1: type = value_of_initializer %float.make_type.loc7_35 [template = f64] // CHECK:STDOUT: %.loc7_35.2: type = converted %float.make_type.loc7_35, %.loc7_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19.3: type = splice_block %.loc7_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc7_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%int_64.loc7_19) [template = f64] +// CHECK:STDOUT: %.loc7_19.1: type = value_of_initializer %float.make_type.loc7_19 [template = f64] +// CHECK:STDOUT: %.loc7_19.2: type = converted %float.make_type.loc7_19, %.loc7_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27.3: type = splice_block %.loc7_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc7_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%int_64.loc7_27) [template = f64] +// CHECK:STDOUT: %.loc7_27.1: type = value_of_initializer %float.make_type.loc7_27 [template = f64] +// CHECK:STDOUT: %.loc7_27.2: type = converted %float.make_type.loc7_27, %.loc7_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/float/sub.carbon b/toolchain/check/testdata/builtins/float/sub.carbon index 04551d598a66..5c57f97769a3 100644 --- a/toolchain/check/testdata/builtins/float/sub.carbon +++ b/toolchain/check/testdata/builtins/float/sub.carbon @@ -89,21 +89,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] -// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] -// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] -// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] -// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] -// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] // CHECK:STDOUT: %int_64.loc2_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%int_64.loc2_27) [template = f64] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = converted %float.make_type.loc2_27, %.loc2_27.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11.3: type = splice_block %.loc2_11.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_11: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%int_64.loc2_11) [template = f64] +// CHECK:STDOUT: %.loc2_11.1: type = value_of_initializer %float.make_type.loc2_11 [template = f64] +// CHECK:STDOUT: %.loc2_11.2: type = converted %float.make_type.loc2_11, %.loc2_11.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19.3: type = splice_block %.loc2_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc2_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%int_64.loc2_19) [template = f64] +// CHECK:STDOUT: %.loc2_19.1: type = value_of_initializer %float.make_type.loc2_19 [template = f64] +// CHECK:STDOUT: %.loc2_19.2: type = converted %float.make_type.loc2_19, %.loc2_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -116,29 +120,29 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] -// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] -// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] -// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] -// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] -// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] // CHECK:STDOUT: %int_64.loc4_35: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%int_64.loc4_35) [template = f64] // CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = converted %float.make_type.loc4_35, %.loc4_35.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_19.3: type = splice_block %.loc4_19.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_19: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%int_64.loc4_19) [template = f64] +// CHECK:STDOUT: %.loc4_19.1: type = value_of_initializer %float.make_type.loc4_19 [template = f64] +// CHECK:STDOUT: %.loc4_19.2: type = converted %float.make_type.loc4_19, %.loc4_19.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_27.3: type = splice_block %.loc4_27.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc4_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%int_64.loc4_27) [template = f64] +// CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %float.make_type.loc4_27 [template = f64] +// CHECK:STDOUT: %.loc4_27.2: type = converted %float.make_type.loc4_27, %.loc4_27.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc8_8.2: type = converted %float.make_type, %.loc8_8.1 [template = f64] // CHECK:STDOUT: %x.var: ref f64 = var x // CHECK:STDOUT: %x: ref f64 = bind_name x, %x.var // CHECK:STDOUT: } @@ -217,15 +221,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] -// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] -// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] // CHECK:STDOUT: %int_64.loc8_22: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%int_64.loc8_22) [template = f64] // CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = converted %float.make_type.loc8_22, %.loc8_22.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_14.3: type = splice_block %.loc8_14.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc8_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%int_64.loc8_14) [template = f64] +// CHECK:STDOUT: %.loc8_14.1: type = value_of_initializer %float.make_type.loc8_14 [template = f64] +// CHECK:STDOUT: %.loc8_14.2: type = converted %float.make_type.loc8_14, %.loc8_14.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -240,27 +246,33 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] -// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] -// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] -// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] -// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] -// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] -// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] -// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] -// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] // CHECK:STDOUT: %int_64.loc13_39: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%int_64.loc13_39) [template = f64] // CHECK:STDOUT: %.loc13_39.1: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = converted %float.make_type.loc13_39, %.loc13_39.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_15.3: type = splice_block %.loc13_15.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_15: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%int_64.loc13_15) [template = f64] +// CHECK:STDOUT: %.loc13_15.1: type = value_of_initializer %float.make_type.loc13_15 [template = f64] +// CHECK:STDOUT: %.loc13_15.2: type = converted %float.make_type.loc13_15, %.loc13_15.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_23.3: type = splice_block %.loc13_23.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_23: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%int_64.loc13_23) [template = f64] +// CHECK:STDOUT: %.loc13_23.1: type = value_of_initializer %float.make_type.loc13_23 [template = f64] +// CHECK:STDOUT: %.loc13_23.2: type = converted %float.make_type.loc13_23, %.loc13_23.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %c.param: f64 = value_param runtime_param2 +// CHECK:STDOUT: %.loc13_31.3: type = splice_block %.loc13_31.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc13_31: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%int_64.loc13_31) [template = f64] +// CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %float.make_type.loc13_31 [template = f64] +// CHECK:STDOUT: %.loc13_31.2: type = converted %float.make_type.loc13_31, %.loc13_31.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: f64 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param3 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -273,20 +285,24 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] -// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] -// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] -// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] -// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] -// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_37.2: type = converted %bool.make_type, %.loc17_37.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc17_21.3: type = splice_block %.loc17_21.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc17_21: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%int_64.loc17_21) [template = f64] +// CHECK:STDOUT: %.loc17_21.1: type = value_of_initializer %float.make_type.loc17_21 [template = f64] +// CHECK:STDOUT: %.loc17_21.2: type = converted %float.make_type.loc17_21, %.loc17_21.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc17_29.3: type = splice_block %.loc17_29.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc17_29: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%int_64.loc17_29) [template = f64] +// CHECK:STDOUT: %.loc17_29.1: type = value_of_initializer %float.make_type.loc17_29 [template = f64] +// CHECK:STDOUT: %.loc17_29.2: type = converted %float.make_type.loc17_29, %.loc17_29.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -299,21 +315,25 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] -// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] -// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] -// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] -// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] -// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] // CHECK:STDOUT: %int_64.loc18_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%int_64.loc18_33) [template = f64] // CHECK:STDOUT: %.loc18_33.1: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = converted %float.make_type.loc18_33, %.loc18_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_17.3: type = splice_block %.loc18_17.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc18_17: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%int_64.loc18_17) [template = f64] +// CHECK:STDOUT: %.loc18_17.1: type = value_of_initializer %float.make_type.loc18_17 [template = f64] +// CHECK:STDOUT: %.loc18_17.2: type = converted %float.make_type.loc18_17, %.loc18_17.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc18_25.3: type = splice_block %.loc18_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc18_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%int_64.loc18_25) [template = f64] +// CHECK:STDOUT: %.loc18_25.1: type = value_of_initializer %float.make_type.loc18_25 [template = f64] +// CHECK:STDOUT: %.loc18_25.2: type = converted %float.make_type.loc18_25, %.loc18_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -324,15 +344,17 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] -// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] -// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] // CHECK:STDOUT: %int_64.loc20_33: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%int_64.loc20_33) [template = f64] // CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = converted %float.make_type.loc20_33, %.loc20_33.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_25.3: type = splice_block %.loc20_25.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc20_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%int_64.loc20_25) [template = f64] +// CHECK:STDOUT: %.loc20_25.1: type = value_of_initializer %float.make_type.loc20_25 [template = f64] +// CHECK:STDOUT: %.loc20_25.2: type = converted %float.make_type.loc20_25, %.loc20_25.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -347,27 +369,33 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] -// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] -// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] -// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] -// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] -// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] -// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] -// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] -// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] // CHECK:STDOUT: %int_64.loc24_50: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%int_64.loc24_50) [template = f64] // CHECK:STDOUT: %.loc24_50.1: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = converted %float.make_type.loc24_50, %.loc24_50.1 [template = f64] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc24_26.3: type = splice_block %.loc24_26.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_26: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%int_64.loc24_26) [template = f64] +// CHECK:STDOUT: %.loc24_26.1: type = value_of_initializer %float.make_type.loc24_26 [template = f64] +// CHECK:STDOUT: %.loc24_26.2: type = converted %float.make_type.loc24_26, %.loc24_26.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc24_34.3: type = splice_block %.loc24_34.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_34: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%int_64.loc24_34) [template = f64] +// CHECK:STDOUT: %.loc24_34.1: type = value_of_initializer %float.make_type.loc24_34 [template = f64] +// CHECK:STDOUT: %.loc24_34.2: type = converted %float.make_type.loc24_34, %.loc24_34.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %c.param: f64 = value_param runtime_param2 +// CHECK:STDOUT: %.loc24_42.3: type = splice_block %.loc24_42.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc24_42: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%int_64.loc24_42) [template = f64] +// CHECK:STDOUT: %.loc24_42.1: type = value_of_initializer %float.make_type.loc24_42 [template = f64] +// CHECK:STDOUT: %.loc24_42.2: type = converted %float.make_type.loc24_42, %.loc24_42.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: f64 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param3 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param @@ -380,20 +408,24 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] -// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] -// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] -// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] -// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] -// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc28_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc28_48.2: type = converted %bool.make_type, %.loc28_48.1 [template = bool] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc28_32.3: type = splice_block %.loc28_32.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc28_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%int_64.loc28_32) [template = f64] +// CHECK:STDOUT: %.loc28_32.1: type = value_of_initializer %float.make_type.loc28_32 [template = f64] +// CHECK:STDOUT: %.loc28_32.2: type = converted %float.make_type.loc28_32, %.loc28_32.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %b.param: f64 = value_param runtime_param1 +// CHECK:STDOUT: %.loc28_40.3: type = splice_block %.loc28_40.2 [template = f64] { +// CHECK:STDOUT: %int_64.loc28_40: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%int_64.loc28_40) [template = f64] +// CHECK:STDOUT: %.loc28_40.1: type = value_of_initializer %float.make_type.loc28_40 [template = f64] +// CHECK:STDOUT: %.loc28_40.2: type = converted %float.make_type.loc28_40, %.loc28_40.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: f64 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index be154cb47204..11a19c0b6943 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -26,25 +26,6 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] -// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [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_10.1, %Convert.10 [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: %int_8.1: %i32 = int_value 8 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_8.1, %Convert.11 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_8.2: Core.IntLiteral = int_value 8 [template] // CHECK:STDOUT: %array_type: type = array_type %int_8.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -78,53 +59,25 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] -// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] -// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_12, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_12) [template = constants.%int_12.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_12.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_12, %.loc4_20.1 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int_10, %impl.elem0.loc4_24 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %Convert.specific_fn.loc4_24(%int_10) [template = constants.%int_10.2] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_10.2] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int_10, %.loc4_24.1 [template = constants.%int_10.2] -// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc4_20.2, %.loc4_24.2) [template = constants.%int_8.1] -// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_26: = bound_method %int.and, %impl.elem0.loc4_26 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_26.1: %i32 = value_of_initializer %int.and [template = constants.%int_8.1] -// CHECK:STDOUT: %.loc4_26.2: %i32 = converted %int.and, %.loc4_26.1 [template = constants.%int_8.1] -// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %Convert.specific_fn.loc4_26(%.loc4_26.2) [template = constants.%int_8.2] -// CHECK:STDOUT: %.loc4_26.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%int_8.2] -// CHECK:STDOUT: %.loc4_26.4: Core.IntLiteral = converted %int.and, %.loc4_26.3 [template = constants.%int_8.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_26.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [template = constants.%int_8.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_8, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -133,15 +86,19 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index 7ab8b08777fc..ee858a1a9815 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -29,26 +29,6 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %Complement: %Complement.type = struct_value () [template] // CHECK:STDOUT: %And.type: type = fn_type @And [template] // CHECK:STDOUT: %And: %And.type = struct_value () [template] -// CHECK:STDOUT: %int_1193046.1: Core.IntLiteral = int_value 1193046 [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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1193046.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] -// CHECK:STDOUT: %int_1193046.2: %i32 = int_value 1193046 [template] -// CHECK:STDOUT: %int_-1193047: %i32 = int_value -1193047 [template] -// CHECK:STDOUT: %int_16777215.1: Core.IntLiteral = int_value 16777215 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_16777215.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.2(%int_32) [template] -// CHECK:STDOUT: %int_16777215.2: %i32 = int_value 16777215 [template] -// CHECK:STDOUT: %int_15584169.1: %i32 = int_value 15584169 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_15584169.1, %Convert.11 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_15584169.2: Core.IntLiteral = int_value 15584169 [template] // CHECK:STDOUT: %array_type: type = array_type %int_15584169.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -81,11 +61,13 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2: type = splice_block %i32.loc2_18 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -98,68 +80,38 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc3_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc3_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc3_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc3_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc3_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc3_11: type = splice_block %i32.loc3_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc3_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc3_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc3_19: type = splice_block %i32.loc3_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc3_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc3_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %And.ref: %And.type = name_ref And, %And.decl [template = constants.%And] -// CHECK:STDOUT: %Complement.ref: %Complement.type = name_ref Complement, %Complement.decl [template = constants.%Complement] -// CHECK:STDOUT: %int_1193046: Core.IntLiteral = int_value 1193046 [template = constants.%int_1193046.1] -// CHECK:STDOUT: %impl.elem0.loc5_31: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc5_31: = bound_method %int_1193046, %impl.elem0.loc5_31 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc5_31: = specific_function %Convert.bound.loc5_31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc5_31: init %i32 = call %Convert.specific_fn.loc5_31(%int_1193046) [template = constants.%int_1193046.2] -// CHECK:STDOUT: %.loc5_31.1: %i32 = value_of_initializer %int.convert_checked.loc5_31 [template = constants.%int_1193046.2] -// CHECK:STDOUT: %.loc5_31.2: %i32 = converted %int_1193046, %.loc5_31.1 [template = constants.%int_1193046.2] -// CHECK:STDOUT: %int.complement: init %i32 = call %Complement.ref(%.loc5_31.2) [template = constants.%int_-1193047] -// CHECK:STDOUT: %int_16777215: Core.IntLiteral = int_value 16777215 [template = constants.%int_16777215.1] -// CHECK:STDOUT: %.loc5_39.1: %i32 = value_of_initializer %int.complement [template = constants.%int_-1193047] -// CHECK:STDOUT: %.loc5_39.2: %i32 = converted %int.complement, %.loc5_39.1 [template = constants.%int_-1193047] -// CHECK:STDOUT: %impl.elem0.loc5_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc5_42: = bound_method %int_16777215, %impl.elem0.loc5_42 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc5_42: = specific_function %Convert.bound.loc5_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc5_42: init %i32 = call %Convert.specific_fn.loc5_42(%int_16777215) [template = constants.%int_16777215.2] -// CHECK:STDOUT: %.loc5_42.1: %i32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%int_16777215.2] -// CHECK:STDOUT: %.loc5_42.2: %i32 = converted %int_16777215, %.loc5_42.1 [template = constants.%int_16777215.2] -// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc5_39.2, %.loc5_42.2) [template = constants.%int_15584169.1] -// CHECK:STDOUT: %impl.elem0.loc5_50: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc5_50: = bound_method %int.and, %impl.elem0.loc5_50 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc5_50: = specific_function %Convert.bound.loc5_50, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc5_50.1: %i32 = value_of_initializer %int.and [template = constants.%int_15584169.1] -// CHECK:STDOUT: %.loc5_50.2: %i32 = converted %int.and, %.loc5_50.1 [template = constants.%int_15584169.1] -// CHECK:STDOUT: %int.convert_checked.loc5_50: init Core.IntLiteral = call %Convert.specific_fn.loc5_50(%.loc5_50.2) [template = constants.%int_15584169.2] -// CHECK:STDOUT: %.loc5_50.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_50 [template = constants.%int_15584169.2] -// CHECK:STDOUT: %.loc5_50.4: Core.IntLiteral = converted %int.and, %.loc5_50.3 [template = constants.%int_15584169.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %.loc5_50.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_15584169: Core.IntLiteral = int_value 15584169 [template = constants.%int_15584169.2] -// CHECK:STDOUT: %array_type.loc6: type = array_type %int_15584169, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc8_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc8_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc8_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8: type = splice_block %i32.loc8_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc8_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc8_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/convert_checked.carbon b/toolchain/check/testdata/builtins/int/convert_checked.carbon index 31a00ee65264..c3e3d09f7e27 100644 --- a/toolchain/check/testdata/builtins/int/convert_checked.carbon +++ b/toolchain/check/testdata/builtins/int/convert_checked.carbon @@ -345,11 +345,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %i32.loc4_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -362,15 +364,19 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_14: type = splice_block %i32.loc5_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc5_22: type = splice_block %i32.loc5_22 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -383,15 +389,19 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32.loc6_14: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] -// CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32.loc6_22: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_32.loc6_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %u32.loc6_30: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_14: type = splice_block %u32.loc6_14 [template = constants.%u32] { +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %u32.loc6_14: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %u32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc6_22: type = splice_block %u32.loc6_22 [template = constants.%u32] { +// CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %u32.loc6_22: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %u32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %u32 = return_slot %return.param @@ -409,11 +419,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc10_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc10_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc10_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc10: type = splice_block %i32.loc10_20 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc10_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc10_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -424,11 +436,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_21: 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: %int_32.loc11_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_21: 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u32 = return_slot %return.param @@ -439,11 +453,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc12_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_32.loc12_29: 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: %a.param: %u32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %u32 [template = constants.%u32] { +// CHECK:STDOUT: %int_32.loc12_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -454,11 +470,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc13_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32.loc13_22: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_32.loc13_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %u32.loc13_30: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %u32.loc13_22 [template = constants.%u32] { +// CHECK:STDOUT: %int_32.loc13_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %u32.loc13_22: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u32 = return_slot %return.param @@ -469,15 +487,17 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref.loc14_30: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type.loc14_41: init type = call %IntLiteral.ref.loc14_30() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_41.1: type = value_of_initializer %int_literal.make_type.loc14_41 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_41.2: type = converted %int_literal.make_type.loc14_41, %.loc14_41.1 [template = Core.IntLiteral] // CHECK:STDOUT: %IntLiteral.ref.loc14_47: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type.loc14_58: init type = call %IntLiteral.ref.loc14_47() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc14_58.1: type = value_of_initializer %int_literal.make_type.loc14_58 [template = Core.IntLiteral] // CHECK:STDOUT: %.loc14_58.2: type = converted %int_literal.make_type.loc14_58, %.loc14_58.1 [template = Core.IntLiteral] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_41.3: type = splice_block %.loc14_41.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref.loc14_30: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type.loc14_41: init type = call %IntLiteral.ref.loc14_30() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc14_41.1: type = value_of_initializer %int_literal.make_type.loc14_41 [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc14_41.2: type = converted %int_literal.make_type.loc14_41, %.loc14_41.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -488,11 +508,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i16 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i16 = return_slot %return.param @@ -503,11 +525,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] // CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u16 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u16 = return_slot %return.param @@ -518,11 +542,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20: type = splice_block %u32 [template = constants.%u32] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i16 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i16 = return_slot %return.param @@ -533,11 +559,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] // CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21: type = splice_block %u32 [template = constants.%u32] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u16 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u16 = return_slot %return.param @@ -548,13 +576,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc22_36.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc22_36.2: type = converted %int_literal.make_type, %.loc22_36.1 [template = Core.IntLiteral] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] // CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc22_36.3: type = splice_block %.loc22_36.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc22_36.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc22_36.2: type = converted %int_literal.make_type, %.loc22_36.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i16 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i16 = return_slot %return.param @@ -565,13 +595,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u16 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u16 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc23_37.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc23_37.2: type = converted %int_literal.make_type, %.loc23_37.1 [template = Core.IntLiteral] // CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] // CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_37.3: type = splice_block %.loc23_37.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc23_37.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc23_37.2: type = converted %int_literal.make_type, %.loc23_37.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u16 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u16 = return_slot %return.param @@ -582,11 +614,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc26: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i64 = return_slot %return.param @@ -597,11 +631,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc27: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u64 = return_slot %return.param @@ -612,11 +648,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %i64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc28: type = splice_block %u32 [template = constants.%u32] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i64 = return_slot %return.param @@ -627,11 +665,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: %u64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc29: type = splice_block %u32 [template = constants.%u32] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %u64 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u64 = return_slot %return.param @@ -642,13 +682,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc30_44.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc30_44.2: type = converted %int_literal.make_type, %.loc30_44.1 [template = Core.IntLiteral] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30_25: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -659,13 +701,15 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc31_46.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc31_46.2: type = converted %int_literal.make_type, %.loc31_46.1 [template = Core.IntLiteral] // CHECK:STDOUT: %a.param: %u32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc31_27: type = splice_block %u32 [template = constants.%u32] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %u32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -814,16 +858,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.4 [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_19.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_19.2: type = converted %int_literal.make_type, %.loc8_19.1 [template = Core.IntLiteral] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt32(%a.param_patt: %i32) -> %i32 = "int.convert_checked" [from "int_ops.carbon"]; @@ -995,10 +1029,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] -// CHECK:STDOUT: %int_32.loc6: 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint32(%a.param_patt: %i32) -> %u32 = "int.convert_checked" [from "int_ops.carbon"]; @@ -1167,30 +1197,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_16.loc5: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16.loc5: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] -// CHECK:STDOUT: %int_16.loc6: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16.loc6: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] -// CHECK:STDOUT: %int_16.loc8: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16.loc8: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] -// CHECK:STDOUT: %int_16.loc9: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16.loc9: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] -// CHECK:STDOUT: %int_16.loc11: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16.loc11: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] -// CHECK:STDOUT: %int_16.loc12: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16.loc12: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] -// CHECK:STDOUT: %int_16.loc14: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16.loc14: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] -// CHECK:STDOUT: %int_16.loc15: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16.loc15: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] -// CHECK:STDOUT: %int_16.loc17: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16.loc17: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] -// CHECK:STDOUT: %int_16.loc18: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16.loc18: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] -// CHECK:STDOUT: %int_16.loc20: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16.loc20: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] -// CHECK:STDOUT: %int_16.loc21: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16.loc21: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint16(%a.param_patt: %i32) -> %u16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -1506,14 +1512,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_64.loc5: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %u64.loc5: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] -// CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %u64.loc6: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] -// CHECK:STDOUT: %int_64.loc11: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %i64.loc11: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] -// CHECK:STDOUT: %int_64.loc12: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %i64.loc12: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToUint64(%a.param_patt: %u32) -> %u64 = "int.convert_checked" [from "int_ops.carbon"]; @@ -1755,14 +1753,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_64.loc5: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %u64.loc5: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] -// CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %u64.loc6: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] -// CHECK:STDOUT: %int_64.loc8: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %i64.loc8: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] -// CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %i64.loc9: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint64(%a.param_patt: %i32) -> %u64 = "int.convert_checked" [from "int_ops.carbon"]; @@ -1929,8 +1919,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToInt32(%a.param_patt: %u32) -> %i32 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2053,8 +2041,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt16(%a.param_patt: %i32) -> %i16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2154,8 +2140,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint16(%a.param_patt: %i32) -> %u16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2259,8 +2243,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToInt16(%a.param_patt: %u32) -> %i16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2370,8 +2352,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Uint32ToUint16(%a.param_patt: %u32) -> %u16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2484,8 +2464,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %u16: type = class_type @UInt, @UInt(constants.%int_16) [template = constants.%u16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint16(%a.param_patt: %i32) -> %u16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2604,8 +2582,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [template = constants.%u32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint32(%a.param_patt: %i32) -> %u32 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2725,8 +2701,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(constants.%int_64) [template = constants.%u64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToUint64(%a.param_patt: %i32) -> %u64 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2842,8 +2816,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt16(%a.param_patt: %i32) -> %i16 = "int.convert_checked" [from "int_ops.carbon"]; @@ -2957,14 +2929,6 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [template = constants.%int_16] -// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [template = constants.%i16] -// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32ToInt16(%a.param_patt: %i32) -> %i16 = "int.convert_checked" [from "int_ops.carbon"]; diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index d8a3614bad6e..d01ff9aba582 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -94,16 +94,20 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_26.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_26.2: type = converted %bool.make_type, %.loc2_26.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_10: type = splice_block %i32.loc2_10 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_18: type = splice_block %i32.loc2_18 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -116,11 +120,11 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc7: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc7: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc7: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc7: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -131,16 +135,20 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc12_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_19: type = splice_block %i32.loc12_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc12_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc12_27: type = splice_block %i32.loc12_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc12_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc12_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -274,15 +282,19 @@ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/greater.carbon b/toolchain/check/testdata/builtins/int/greater.carbon index 430c602d3043..73a4d4ec2d71 100644 --- a/toolchain/check/testdata/builtins/int/greater.carbon +++ b/toolchain/check/testdata/builtins/int/greater.carbon @@ -97,16 +97,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_31.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_31.2: type = converted %bool.make_type, %.loc2_31.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_15: type = splice_block %i32.loc2_15 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_23: type = splice_block %i32.loc2_23 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -117,11 +121,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc3_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc3: type = splice_block %i32.loc3_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -134,11 +140,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -149,16 +155,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_19: type = splice_block %i32.loc16_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_27: type = splice_block %i32.loc16_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index b1c2f176a697..0322f2e423eb 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -97,16 +97,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_33.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_33.2: type = converted %bool.make_type, %.loc2_33.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_17: type = splice_block %i32.loc2_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_25: type = splice_block %i32.loc2_25 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -117,11 +121,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc3_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc3: type = splice_block %i32.loc3_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -134,11 +140,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -149,16 +155,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_19: type = splice_block %i32.loc16_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_27: type = splice_block %i32.loc16_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index a76d6a00e7bb..7663a25e8460 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -70,25 +70,6 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %LeftShift.type.1: type = fn_type @LeftShift.1 [template] // CHECK:STDOUT: %LeftShift: %LeftShift.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [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_2.1, %Convert.10 [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_20.1: %i32 = int_value 20 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_20.1, %Convert.11 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_20.2: Core.IntLiteral = int_value 20 [template] // CHECK:STDOUT: %array_type: type = array_type %int_20.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -122,53 +103,25 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_17: type = splice_block %i32.loc2_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_25: type = splice_block %i32.loc2_25 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %LeftShift.ref: %LeftShift.type.1 = name_ref LeftShift, %LeftShift.decl [template = constants.%LeftShift] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_26: = bound_method %int_5, %impl.elem0.loc4_26 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_26: init %i32 = call %Convert.specific_fn.loc4_26(%int_5) [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc4_26.1: %i32 = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc4_26.2: %i32 = converted %int_5, %.loc4_26.1 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc4_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_29: = bound_method %int_2, %impl.elem0.loc4_29 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_29: = specific_function %Convert.bound.loc4_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_29: init %i32 = call %Convert.specific_fn.loc4_29(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_29.1: %i32 = value_of_initializer %int.convert_checked.loc4_29 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_29.2: %i32 = converted %int_2, %.loc4_29.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.left_shift: init %i32 = call %LeftShift.ref(%.loc4_26.2, %.loc4_29.2) [template = constants.%int_20.1] -// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_30: = bound_method %int.left_shift, %impl.elem0.loc4_30 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_30.1: %i32 = value_of_initializer %int.left_shift [template = constants.%int_20.1] -// CHECK:STDOUT: %.loc4_30.2: %i32 = converted %int.left_shift, %.loc4_30.1 [template = constants.%int_20.1] -// CHECK:STDOUT: %int.convert_checked.loc4_30: init Core.IntLiteral = call %Convert.specific_fn.loc4_30(%.loc4_30.2) [template = constants.%int_20.2] -// CHECK:STDOUT: %.loc4_30.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%int_20.2] -// CHECK:STDOUT: %.loc4_30.4: Core.IntLiteral = converted %int.left_shift, %.loc4_30.3 [template = constants.%int_20.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_30.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_20: Core.IntLiteral = int_value 20 [template = constants.%int_20.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_20, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -177,15 +130,19 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -285,15 +242,19 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc4_17: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_25: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc4_25: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_33: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] // CHECK:STDOUT: %i32.loc4_33: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_17: type = splice_block %i32.loc4_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_17: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %i32.loc4_17: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_25: type = splice_block %i32.loc4_25 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_25: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %i32.loc4_25: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -304,31 +265,17 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc5_14: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] // CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %i32.loc5_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %i32.loc5_14: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc26: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc40: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc40: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @LeftShift.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.left_shift"; diff --git a/toolchain/check/testdata/builtins/int/less.carbon b/toolchain/check/testdata/builtins/int/less.carbon index 6948816cc661..dd1a3ab4a546 100644 --- a/toolchain/check/testdata/builtins/int/less.carbon +++ b/toolchain/check/testdata/builtins/int/less.carbon @@ -97,16 +97,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_28.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_28.2: type = converted %bool.make_type, %.loc2_28.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_12: type = splice_block %i32.loc2_12 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_20: type = splice_block %i32.loc2_20 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -117,11 +121,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc3_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc3: type = splice_block %i32.loc3_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -134,11 +140,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -149,16 +155,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_19: type = splice_block %i32.loc16_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_27: type = splice_block %i32.loc16_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index 0febd2da77e5..99b5acbf0157 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -97,16 +97,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_30.2: type = converted %bool.make_type, %.loc2_30.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_14: type = splice_block %i32.loc2_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_22: type = splice_block %i32.loc2_22 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -117,11 +121,13 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc3_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc3_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc3: type = splice_block %i32.loc3_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc3_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc3_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -134,11 +140,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc8: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc8: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -149,16 +155,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc16_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc16_35.2: type = converted %bool.make_type, %.loc16_35.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_19: type = splice_block %i32.loc16_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_27: type = splice_block %i32.loc16_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index 5f5a11aebedd..0ce0f2716e9f 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -125,11 +125,13 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc5_22.2: type = converted %int_literal.make_type, %.loc5_22.1 [template = Core.IntLiteral] // CHECK:STDOUT: %n.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_22.3: type = splice_block %.loc5_22.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc5_22.2: type = converted %int_literal.make_type, %.loc5_22.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: Core.IntLiteral = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -189,17 +191,19 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.patt: %i64.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i64.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Int.ref.loc6_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %int_64.loc6_13: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc6_15: init type = call %Int.ref.loc6_9(%int_64.loc6_13) [template = constants.%i64.builtin] -// CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_15 [template = constants.%i64.builtin] -// CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_15, %.loc6_15.1 [template = constants.%i64.builtin] // CHECK:STDOUT: %Int.ref.loc6_21: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_64.loc6_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %int.make_type_signed.loc6_27: init type = call %Int.ref.loc6_21(%int_64.loc6_25) [template = constants.%i64.builtin] // CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6_27 [template = constants.%i64.builtin] // CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6_27, %.loc6_27.1 [template = constants.%i64.builtin] // CHECK:STDOUT: %n.param: %i64.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_15.3: type = splice_block %.loc6_15.2 [template = constants.%i64.builtin] { +// CHECK:STDOUT: %Int.ref.loc6_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] +// CHECK:STDOUT: %int_64.loc6_13: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc6_15: init type = call %Int.ref.loc6_9(%int_64.loc6_13) [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_15 [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_15, %.loc6_15.1 [template = constants.%i64.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i64.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i64.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i64.builtin = return_slot %return.param @@ -210,17 +214,19 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.patt: %i13.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i13.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Int.ref.loc10_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %int_13.loc10_13: Core.IntLiteral = int_value 13 [template = constants.%int_13] -// CHECK:STDOUT: %int.make_type_signed.loc10_15: init type = call %Int.ref.loc10_9(%int_13.loc10_13) [template = constants.%i13.builtin] -// CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_15 [template = constants.%i13.builtin] -// CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_15, %.loc10_15.1 [template = constants.%i13.builtin] // CHECK:STDOUT: %Int.ref.loc10_21: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_13.loc10_25: Core.IntLiteral = int_value 13 [template = constants.%int_13] // CHECK:STDOUT: %int.make_type_signed.loc10_27: init type = call %Int.ref.loc10_21(%int_13.loc10_25) [template = constants.%i13.builtin] // CHECK:STDOUT: %.loc10_27.1: type = value_of_initializer %int.make_type_signed.loc10_27 [template = constants.%i13.builtin] // CHECK:STDOUT: %.loc10_27.2: type = converted %int.make_type_signed.loc10_27, %.loc10_27.1 [template = constants.%i13.builtin] // CHECK:STDOUT: %n.param: %i13.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc10_15.3: type = splice_block %.loc10_15.2 [template = constants.%i13.builtin] { +// CHECK:STDOUT: %Int.ref.loc10_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] +// CHECK:STDOUT: %int_13.loc10_13: Core.IntLiteral = int_value 13 [template = constants.%int_13] +// CHECK:STDOUT: %int.make_type_signed.loc10_15: init type = call %Int.ref.loc10_9(%int_13.loc10_13) [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_15 [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_15, %.loc10_15.1 [template = constants.%i13.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i13.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i13.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i13.builtin = return_slot %return.param @@ -233,23 +239,27 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.patt: @Symbolic.%iN.builtin (%iN.builtin) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Symbolic.%iN.builtin (%iN.builtin) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_28.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_28.2: type = converted %int_literal.make_type, %.loc14_28.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %Int.ref.loc14_34: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %N.ref.loc14_38: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call %Int.ref.loc14_34(%N.ref.loc14_38) [symbolic = %iN.builtin (constants.%iN.builtin)] -// CHECK:STDOUT: %.loc14_39.1: type = value_of_initializer %int.make_type_signed.loc14_39 [symbolic = %iN.builtin (constants.%iN.builtin)] -// CHECK:STDOUT: %.loc14_39.2: type = converted %int.make_type_signed.loc14_39, %.loc14_39.1 [symbolic = %iN.builtin (constants.%iN.builtin)] // CHECK:STDOUT: %Int.ref.loc14_45: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc14_49: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] // CHECK:STDOUT: %int.make_type_signed.loc14_50: init type = call %Int.ref.loc14_45(%N.ref.loc14_49) [symbolic = %iN.builtin (constants.%iN.builtin)] // CHECK:STDOUT: %.loc14_50.1: type = value_of_initializer %int.make_type_signed.loc14_50 [symbolic = %iN.builtin (constants.%iN.builtin)] // CHECK:STDOUT: %.loc14_50.2: type = converted %int.make_type_signed.loc14_50, %.loc14_50.1 [symbolic = %iN.builtin (constants.%iN.builtin)] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param +// CHECK:STDOUT: %.loc14_28.3: type = splice_block %.loc14_28.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc14_28.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc14_28.2: type = converted %int_literal.make_type, %.loc14_28.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc14_13.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_13.2 (constants.%N)] // CHECK:STDOUT: %x.param: @Symbolic.%iN.builtin (%iN.builtin) = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_39.3: type = splice_block %.loc14_39.2 [symbolic = %iN.builtin (constants.%iN.builtin)] { +// CHECK:STDOUT: %Int.ref.loc14_34: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] +// CHECK:STDOUT: %N.ref.loc14_38: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] +// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call %Int.ref.loc14_34(%N.ref.loc14_38) [symbolic = %iN.builtin (constants.%iN.builtin)] +// CHECK:STDOUT: %.loc14_39.1: type = value_of_initializer %int.make_type_signed.loc14_39 [symbolic = %iN.builtin (constants.%iN.builtin)] +// CHECK:STDOUT: %.loc14_39.2: type = converted %int.make_type_signed.loc14_39, %.loc14_39.1 [symbolic = %iN.builtin (constants.%iN.builtin)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @Symbolic.%iN.builtin (%iN.builtin) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @Symbolic.%iN.builtin (%iN.builtin) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Symbolic.%iN.builtin (%iN.builtin) = return_slot %return.param @@ -356,17 +366,19 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.patt: %i64.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i64.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Int.ref.loc7_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %int_64.loc7_16: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call %Int.ref.loc7_12(%int_64.loc7_16) [template = constants.%i64.builtin] -// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i64.builtin] -// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i64.builtin] // CHECK:STDOUT: %Int.ref.loc7_24: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_64.loc7_28: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call %Int.ref.loc7_24(%int_64.loc7_28) [template = constants.%i64.builtin] // CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i64.builtin] // CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_30, %.loc7_30.1 [template = constants.%i64.builtin] // CHECK:STDOUT: %n.param: %i64.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_18.3: type = splice_block %.loc7_18.2 [template = constants.%i64.builtin] { +// CHECK:STDOUT: %Int.ref.loc7_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] +// CHECK:STDOUT: %int_64.loc7_16: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call %Int.ref.loc7_12(%int_64.loc7_16) [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i64.builtin] +// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i64.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i64.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i64.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i64.builtin = return_slot %return.param @@ -377,17 +389,19 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.patt: %i13.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i13.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Int.ref.loc11_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %int_13.loc11_16: Core.IntLiteral = int_value 13 [template = constants.%int_13] -// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call %Int.ref.loc11_12(%int_13.loc11_16) [template = constants.%i13.builtin] -// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i13.builtin] -// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_18, %.loc11_18.1 [template = constants.%i13.builtin] // CHECK:STDOUT: %Int.ref.loc11_24: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_13.loc11_28: Core.IntLiteral = int_value 13 [template = constants.%int_13] // CHECK:STDOUT: %int.make_type_signed.loc11_30: init type = call %Int.ref.loc11_24(%int_13.loc11_28) [template = constants.%i13.builtin] // CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %int.make_type_signed.loc11_30 [template = constants.%i13.builtin] // CHECK:STDOUT: %.loc11_30.2: type = converted %int.make_type_signed.loc11_30, %.loc11_30.1 [template = constants.%i13.builtin] // CHECK:STDOUT: %n.param: %i13.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_18.3: type = splice_block %.loc11_18.2 [template = constants.%i13.builtin] { +// CHECK:STDOUT: %Int.ref.loc11_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] +// CHECK:STDOUT: %int_13.loc11_16: Core.IntLiteral = int_value 13 [template = constants.%int_13] +// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call %Int.ref.loc11_12(%int_13.loc11_16) [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i13.builtin] +// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_18, %.loc11_18.1 [template = constants.%i13.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i13.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i13.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i13.builtin = return_slot %return.param @@ -398,17 +412,19 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.patt: %i24.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i24.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Int.ref.loc15_19: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %int_24.loc15_23: Core.IntLiteral = int_value 24 [template = constants.%int_24] -// CHECK:STDOUT: %int.make_type_signed.loc15_25: init type = call %Int.ref.loc15_19(%int_24.loc15_23) [template = constants.%i24.builtin] -// CHECK:STDOUT: %.loc15_25.1: type = value_of_initializer %int.make_type_signed.loc15_25 [template = constants.%i24.builtin] -// CHECK:STDOUT: %.loc15_25.2: type = converted %int.make_type_signed.loc15_25, %.loc15_25.1 [template = constants.%i24.builtin] // CHECK:STDOUT: %Int.ref.loc15_31: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %int_24.loc15_35: Core.IntLiteral = int_value 24 [template = constants.%int_24] // CHECK:STDOUT: %int.make_type_signed.loc15_37: init type = call %Int.ref.loc15_31(%int_24.loc15_35) [template = constants.%i24.builtin] // CHECK:STDOUT: %.loc15_37.1: type = value_of_initializer %int.make_type_signed.loc15_37 [template = constants.%i24.builtin] // CHECK:STDOUT: %.loc15_37.2: type = converted %int.make_type_signed.loc15_37, %.loc15_37.1 [template = constants.%i24.builtin] // CHECK:STDOUT: %n.param: %i24.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_25.3: type = splice_block %.loc15_25.2 [template = constants.%i24.builtin] { +// CHECK:STDOUT: %Int.ref.loc15_19: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] +// CHECK:STDOUT: %int_24.loc15_23: Core.IntLiteral = int_value 24 [template = constants.%int_24] +// CHECK:STDOUT: %int.make_type_signed.loc15_25: init type = call %Int.ref.loc15_19(%int_24.loc15_23) [template = constants.%i24.builtin] +// CHECK:STDOUT: %.loc15_25.1: type = value_of_initializer %int.make_type_signed.loc15_25 [template = constants.%i24.builtin] +// CHECK:STDOUT: %.loc15_25.2: type = converted %int.make_type_signed.loc15_25, %.loc15_25.1 [template = constants.%i24.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i24.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i24.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i24.builtin = return_slot %return.param @@ -484,7 +500,6 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -505,11 +520,6 @@ var m: Int(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%int_0) [template = ] -// CHECK:STDOUT: %.loc10_13.1: type = value_of_initializer %int.make_type_signed [template = ] -// CHECK:STDOUT: %.loc10_13.2: type = converted %int.make_type_signed, %.loc10_13.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } @@ -525,22 +535,6 @@ var m: Int(1000000000); // CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %Int.type.2: type = fn_type @Int.1 [template] // CHECK:STDOUT: %Int.2: %Int.type.2 = 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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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_-1.1: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] -// CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -570,36 +564,17 @@ var m: Int(1000000000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int.2, @Int.2(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_22: type = class_type @Int.2, @Int.2(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %i32.loc6_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int.2, @Int.2(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Int.ref: %Int.type.2 = name_ref Int, imports.%import_ref.2 [template = constants.%Int.2] -// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12_19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc12_19: = bound_method %int_1, %impl.elem0.loc12_19 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc12_19: = specific_function %Convert.bound.loc12_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc12_19: init %i32 = call %Convert.specific_fn.loc12_19(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc12_19.1: %i32 = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc12_19.2: %i32 = converted %int_1, %.loc12_19.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_19.2) [template = constants.%int_-1.1] -// CHECK:STDOUT: %impl.elem0.loc12_20: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc12_20: = bound_method %int.snegate, %impl.elem0.loc12_20 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc12_20: = specific_function %Convert.bound.loc12_20, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %.loc12_20.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1] -// CHECK:STDOUT: %.loc12_20.2: %i32 = converted %int.snegate, %.loc12_20.1 [template = constants.%int_-1.1] -// CHECK:STDOUT: %int.convert_checked.loc12_20: init Core.IntLiteral = call %Convert.specific_fn.loc12_20(%.loc12_20.2) [template = constants.%int_-1.2] -// CHECK:STDOUT: %.loc12_20.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%int_-1.2] -// CHECK:STDOUT: %.loc12_20.4: Core.IntLiteral = converted %int.snegate, %.loc12_20.3 [template = constants.%int_-1.2] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_20.4) [template = ] -// CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = ] -// CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } @@ -613,7 +588,6 @@ var m: Int(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] -// CHECK:STDOUT: %int_1000000000: Core.IntLiteral = int_value 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -634,11 +608,6 @@ var m: Int(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %int_1000000000: Core.IntLiteral = int_value 1000000000 [template = constants.%int_1000000000] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%int_1000000000) [template = ] -// CHECK:STDOUT: %.loc9_22.1: type = value_of_initializer %int.make_type_signed [template = ] -// CHECK:STDOUT: %.loc9_22.2: type = converted %int.make_type_signed, %.loc9_22.1 [template = ] // CHECK:STDOUT: %m.var: ref = var m // CHECK:STDOUT: %m: ref = bind_name m, %m.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index aba3e03aec4c..934a5f699675 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -106,11 +106,13 @@ var m: UInt(1000000000); // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc5_23.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc5_23.2: type = converted %int_literal.make_type, %.loc5_23.1 [template = Core.IntLiteral] // CHECK:STDOUT: %n.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_23.3: type = splice_block %.loc5_23.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc5_23.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc5_23.2: type = converted %int_literal.make_type, %.loc5_23.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: Core.IntLiteral = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -170,17 +172,19 @@ var m: UInt(1000000000); // CHECK:STDOUT: %return.patt: %u64.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u64.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %UInt.ref.loc6_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %int_64.loc6_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_16: init type = call %UInt.ref.loc6_9(%int_64.loc6_14) [template = constants.%u64.builtin] -// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_16 [template = constants.%u64.builtin] -// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_16, %.loc6_16.1 [template = constants.%u64.builtin] // CHECK:STDOUT: %UInt.ref.loc6_22: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %int_64.loc6_27: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %int.make_type_unsigned.loc6_29: init type = call %UInt.ref.loc6_22(%int_64.loc6_27) [template = constants.%u64.builtin] // CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %int.make_type_unsigned.loc6_29 [template = constants.%u64.builtin] // CHECK:STDOUT: %.loc6_29.2: type = converted %int.make_type_unsigned.loc6_29, %.loc6_29.1 [template = constants.%u64.builtin] // CHECK:STDOUT: %n.param: %u64.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_16.3: type = splice_block %.loc6_16.2 [template = constants.%u64.builtin] { +// CHECK:STDOUT: %UInt.ref.loc6_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] +// CHECK:STDOUT: %int_64.loc6_14: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_16: init type = call %UInt.ref.loc6_9(%int_64.loc6_14) [template = constants.%u64.builtin] +// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_16 [template = constants.%u64.builtin] +// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_16, %.loc6_16.1 [template = constants.%u64.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %u64.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %u64.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u64.builtin = return_slot %return.param @@ -191,17 +195,19 @@ var m: UInt(1000000000); // CHECK:STDOUT: %return.patt: %u13.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %u13.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %UInt.ref.loc10_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %int_13.loc10_14: Core.IntLiteral = int_value 13 [template = constants.%int_13] -// CHECK:STDOUT: %int.make_type_unsigned.loc10_16: init type = call %UInt.ref.loc10_9(%int_13.loc10_14) [template = constants.%u13.builtin] -// CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_16 [template = constants.%u13.builtin] -// CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_16, %.loc10_16.1 [template = constants.%u13.builtin] // CHECK:STDOUT: %UInt.ref.loc10_22: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %int_13.loc10_27: Core.IntLiteral = int_value 13 [template = constants.%int_13] // CHECK:STDOUT: %int.make_type_unsigned.loc10_29: init type = call %UInt.ref.loc10_22(%int_13.loc10_27) [template = constants.%u13.builtin] // CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_unsigned.loc10_29 [template = constants.%u13.builtin] // CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_unsigned.loc10_29, %.loc10_29.1 [template = constants.%u13.builtin] // CHECK:STDOUT: %n.param: %u13.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc10_16.3: type = splice_block %.loc10_16.2 [template = constants.%u13.builtin] { +// CHECK:STDOUT: %UInt.ref.loc10_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] +// CHECK:STDOUT: %int_13.loc10_14: Core.IntLiteral = int_value 13 [template = constants.%int_13] +// CHECK:STDOUT: %int.make_type_unsigned.loc10_16: init type = call %UInt.ref.loc10_9(%int_13.loc10_14) [template = constants.%u13.builtin] +// CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_16 [template = constants.%u13.builtin] +// CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_16, %.loc10_16.1 [template = constants.%u13.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %u13.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %u13.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %u13.builtin = return_slot %return.param @@ -214,23 +220,27 @@ var m: UInt(1000000000); // CHECK:STDOUT: %return.patt: @Symbolic.%uN.builtin (%uN.builtin) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Symbolic.%uN.builtin (%uN.builtin) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_28.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_28.2: type = converted %int_literal.make_type, %.loc14_28.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %UInt.ref.loc14_34: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %N.ref.loc14_39: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_unsigned.loc14_40: init type = call %UInt.ref.loc14_34(%N.ref.loc14_39) [symbolic = %uN.builtin (constants.%uN.builtin)] -// CHECK:STDOUT: %.loc14_40.1: type = value_of_initializer %int.make_type_unsigned.loc14_40 [symbolic = %uN.builtin (constants.%uN.builtin)] -// CHECK:STDOUT: %.loc14_40.2: type = converted %int.make_type_unsigned.loc14_40, %.loc14_40.1 [symbolic = %uN.builtin (constants.%uN.builtin)] // CHECK:STDOUT: %UInt.ref.loc14_46: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %N.ref.loc14_51: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] // CHECK:STDOUT: %int.make_type_unsigned.loc14_52: init type = call %UInt.ref.loc14_46(%N.ref.loc14_51) [symbolic = %uN.builtin (constants.%uN.builtin)] // CHECK:STDOUT: %.loc14_52.1: type = value_of_initializer %int.make_type_unsigned.loc14_52 [symbolic = %uN.builtin (constants.%uN.builtin)] // CHECK:STDOUT: %.loc14_52.2: type = converted %int.make_type_unsigned.loc14_52, %.loc14_52.1 [symbolic = %uN.builtin (constants.%uN.builtin)] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param +// CHECK:STDOUT: %.loc14_28.3: type = splice_block %.loc14_28.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc14_28.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc14_28.2: type = converted %int_literal.make_type, %.loc14_28.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc14_13.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_13.2 (constants.%N)] // CHECK:STDOUT: %x.param: @Symbolic.%uN.builtin (%uN.builtin) = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_40.3: type = splice_block %.loc14_40.2 [symbolic = %uN.builtin (constants.%uN.builtin)] { +// CHECK:STDOUT: %UInt.ref.loc14_34: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] +// CHECK:STDOUT: %N.ref.loc14_39: Core.IntLiteral = name_ref N, %N.loc14_13.1 [symbolic = %N.loc14_13.2 (constants.%N)] +// CHECK:STDOUT: %int.make_type_unsigned.loc14_40: init type = call %UInt.ref.loc14_34(%N.ref.loc14_39) [symbolic = %uN.builtin (constants.%uN.builtin)] +// CHECK:STDOUT: %.loc14_40.1: type = value_of_initializer %int.make_type_unsigned.loc14_40 [symbolic = %uN.builtin (constants.%uN.builtin)] +// CHECK:STDOUT: %.loc14_40.2: type = converted %int.make_type_unsigned.loc14_40, %.loc14_40.1 [symbolic = %uN.builtin (constants.%uN.builtin)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @Symbolic.%uN.builtin (%uN.builtin) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @Symbolic.%uN.builtin (%uN.builtin) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Symbolic.%uN.builtin (%uN.builtin) = return_slot %return.param @@ -279,7 +289,6 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -300,11 +309,6 @@ var m: UInt(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%int_0) [template = ] -// CHECK:STDOUT: %.loc10_14.1: type = value_of_initializer %int.make_type_unsigned [template = ] -// CHECK:STDOUT: %.loc10_14.2: type = converted %int.make_type_unsigned, %.loc10_14.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } @@ -320,22 +324,6 @@ var m: UInt(1000000000); // CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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_-1.1: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] -// CHECK:STDOUT: %int_-1.2: Core.IntLiteral = int_value -1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -365,36 +353,17 @@ var m: UInt(1000000000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %i32.loc6_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %Negate.ref: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc12_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc12_20: = bound_method %int_1, %impl.elem0.loc12_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc12_20: = specific_function %Convert.bound.loc12_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc12_20: init %i32 = call %Convert.specific_fn.loc12_20(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc12_20.1: %i32 = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc12_20.2: %i32 = converted %int_1, %.loc12_20.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_20.2) [template = constants.%int_-1.1] -// CHECK:STDOUT: %impl.elem0.loc12_21: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc12_21: = bound_method %int.snegate, %impl.elem0.loc12_21 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc12_21: = specific_function %Convert.bound.loc12_21, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.snegate [template = constants.%int_-1.1] -// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.snegate, %.loc12_21.1 [template = constants.%int_-1.1] -// CHECK:STDOUT: %int.convert_checked.loc12_21: init Core.IntLiteral = call %Convert.specific_fn.loc12_21(%.loc12_21.2) [template = constants.%int_-1.2] -// CHECK:STDOUT: %.loc12_21.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%int_-1.2] -// CHECK:STDOUT: %.loc12_21.4: Core.IntLiteral = converted %int.snegate, %.loc12_21.3 [template = constants.%int_-1.2] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc12_21.4) [template = ] -// CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_unsigned [template = ] -// CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_unsigned, %.loc12_22.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } @@ -408,7 +377,6 @@ var m: UInt(1000000000); // CHECK:STDOUT: constants { // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] -// CHECK:STDOUT: %int_1000000000: Core.IntLiteral = int_value 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -429,11 +397,6 @@ var m: UInt(1000000000); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %UInt.ref: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] -// CHECK:STDOUT: %int_1000000000: Core.IntLiteral = int_value 1000000000 [template = constants.%int_1000000000] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%int_1000000000) [template = ] -// CHECK:STDOUT: %.loc9_23.1: type = value_of_initializer %int.make_type_unsigned [template = ] -// CHECK:STDOUT: %.loc9_23.2: type = converted %int.make_type_unsigned, %.loc9_23.1 [template = ] // CHECK:STDOUT: %m.var: ref = var m // CHECK:STDOUT: %m: ref = bind_name m, %m.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/neq.carbon b/toolchain/check/testdata/builtins/int/neq.carbon index d189bd30ca35..0767f710c642 100644 --- a/toolchain/check/testdata/builtins/int/neq.carbon +++ b/toolchain/check/testdata/builtins/int/neq.carbon @@ -85,16 +85,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc2_27.2: type = converted %bool.make_type, %.loc2_27.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -107,11 +111,11 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %false_.patt: %False = binding_pattern false_ // CHECK:STDOUT: %false_.param_patt: %False = value_param_pattern %false_.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %True.ref.loc7: type = name_ref True, file.%True.decl [template = constants.%True] -// CHECK:STDOUT: %False.ref.loc7: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %true_.param: %True = value_param runtime_param0 +// CHECK:STDOUT: %True.ref.loc7: type = name_ref True, file.%True.decl [template = constants.%True] // CHECK:STDOUT: %true_: %True = bind_name true_, %true_.param // CHECK:STDOUT: %false_.param: %False = value_param runtime_param1 +// CHECK:STDOUT: %False.ref.loc7: type = name_ref False, file.%False.decl [template = constants.%False] // CHECK:STDOUT: %false_: %False = bind_name false_, %false_.param // CHECK:STDOUT: } // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { @@ -122,16 +126,20 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc12_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_35.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_35.2: type = converted %bool.make_type, %.loc12_35.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_19: type = splice_block %i32.loc12_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc12_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc12_27: type = splice_block %i32.loc12_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc12_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc12_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index 760ead62a98e..83817e6a1c83 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -26,25 +26,6 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Or.type: type = fn_type @Or [template] // CHECK:STDOUT: %Or: %Or.type = struct_value () [template] -// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [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_10.1, %Convert.10 [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: %int_14.1: %i32 = int_value 14 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_14.1, %Convert.11 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_14.2: Core.IntLiteral = int_value 14 [template] // CHECK:STDOUT: %array_type: type = array_type %int_14.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -78,53 +59,25 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_10: type = splice_block %i32.loc2_10 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_18: type = splice_block %i32.loc2_18 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Or.ref: %Or.type = name_ref Or, %Or.decl [template = constants.%Or] -// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] -// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc4_19: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_19: = bound_method %int_12, %impl.elem0.loc4_19 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_19: = specific_function %Convert.bound.loc4_19, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32 = call %Convert.specific_fn.loc4_19(%int_12) [template = constants.%int_12.2] -// CHECK:STDOUT: %.loc4_19.1: %i32 = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%int_12.2] -// CHECK:STDOUT: %.loc4_19.2: %i32 = converted %int_12, %.loc4_19.1 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_10, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_10) [template = constants.%int_10.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_10.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_10, %.loc4_23.1 [template = constants.%int_10.2] -// CHECK:STDOUT: %int.or: init %i32 = call %Or.ref(%.loc4_19.2, %.loc4_23.2) [template = constants.%int_14.1] -// CHECK:STDOUT: %impl.elem0.loc4_25: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_25: = bound_method %int.or, %impl.elem0.loc4_25 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_25: = specific_function %Convert.bound.loc4_25, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_25.1: %i32 = value_of_initializer %int.or [template = constants.%int_14.1] -// CHECK:STDOUT: %.loc4_25.2: %i32 = converted %int.or, %.loc4_25.1 [template = constants.%int_14.1] -// CHECK:STDOUT: %int.convert_checked.loc4_25: init Core.IntLiteral = call %Convert.specific_fn.loc4_25(%.loc4_25.2) [template = constants.%int_14.2] -// CHECK:STDOUT: %.loc4_25.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_25 [template = constants.%int_14.2] -// CHECK:STDOUT: %.loc4_25.4: Core.IntLiteral = converted %int.or, %.loc4_25.3 [template = constants.%int_14.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_25.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_14: Core.IntLiteral = int_value 14 [template = constants.%int_14.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_14, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -133,15 +86,19 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index 654ed666db69..b32b0cce6901 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -71,25 +71,6 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %RightShift.type.1: type = fn_type @RightShift.1 [template] // CHECK:STDOUT: %RightShift: %RightShift.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_22.1: Core.IntLiteral = int_value 22 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_22.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] -// CHECK:STDOUT: %int_22.2: %i32 = int_value 22 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [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_5.1: %i32 = int_value 5 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_5.1, %Convert.11 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.3(%int_32) [template] // CHECK:STDOUT: %int_5.2: Core.IntLiteral = int_value 5 [template] // CHECK:STDOUT: %array_type: type = array_type %int_5.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -123,53 +104,25 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_18: type = splice_block %i32.loc2_18 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_26: type = splice_block %i32.loc2_26 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %RightShift.ref: %RightShift.type.1 = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %int_22: Core.IntLiteral = int_value 22 [template = constants.%int_22.1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_27: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_27: = bound_method %int_22, %impl.elem0.loc4_27 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_27: = specific_function %Convert.bound.loc4_27, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_27: init %i32 = call %Convert.specific_fn.loc4_27(%int_22) [template = constants.%int_22.2] -// CHECK:STDOUT: %.loc4_27.1: %i32 = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%int_22.2] -// CHECK:STDOUT: %.loc4_27.2: %i32 = converted %int_22, %.loc4_27.1 [template = constants.%int_22.2] -// CHECK:STDOUT: %impl.elem0.loc4_31: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_31: = bound_method %int_2, %impl.elem0.loc4_31 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_31: = specific_function %Convert.bound.loc4_31, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_31: init %i32 = call %Convert.specific_fn.loc4_31(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_31.1: %i32 = value_of_initializer %int.convert_checked.loc4_31 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_31.2: %i32 = converted %int_2, %.loc4_31.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.right_shift: init %i32 = call %RightShift.ref(%.loc4_27.2, %.loc4_31.2) [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc4_32: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_32: = bound_method %int.right_shift, %impl.elem0.loc4_32 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_32: = specific_function %Convert.bound.loc4_32, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_32.1: %i32 = value_of_initializer %int.right_shift [template = constants.%int_5.1] -// CHECK:STDOUT: %.loc4_32.2: %i32 = converted %int.right_shift, %.loc4_32.1 [template = constants.%int_5.1] -// CHECK:STDOUT: %int.convert_checked.loc4_32: init Core.IntLiteral = call %Convert.specific_fn.loc4_32(%.loc4_32.2) [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc4_32.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc4_32.4: Core.IntLiteral = converted %int.right_shift, %.loc4_32.3 [template = constants.%int_5.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_32.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_5, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -178,15 +131,19 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -224,35 +181,8 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %Negate.type.1: type = fn_type @Negate.1 [template] // CHECK:STDOUT: %Negate: %Negate.type.1 = 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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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_-1: %i32 = int_value -1 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_1.2, %Convert.11 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %array_type.1: type = array_type %int_1.1, %i32 [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %array_type.1 [template] -// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_10.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.2(%int_32) [template] -// CHECK:STDOUT: %int_10.2: %i32 = int_value 10 [template] -// CHECK:STDOUT: %int_-10: %i32 = int_value -10 [template] -// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.bound.4: = bound_method %int_2.1, %Convert.10 [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: %int_-3: %i32 = int_value -3 [template] -// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [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.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type.2: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: %ptr.2: type = ptr_type %array_type.2 [template] @@ -286,15 +216,19 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc6_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_18: type = splice_block %i32.loc6_18 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc6_26: type = splice_block %i32.loc6_26 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -305,99 +239,21 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7: type = splice_block %i32.loc7_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Negate.ref.loc10_17: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %RightShift.ref.loc10: %RightShift.type.1 = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %Negate.ref.loc10_35: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %int_1.loc10_42: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc10_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc10_42: = bound_method %int_1.loc10_42, %impl.elem0.loc10_42 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc10_42: = specific_function %Convert.bound.loc10_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc10_42: init %i32 = call %Convert.specific_fn.loc10_42(%int_1.loc10_42) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc10_42.1: %i32 = value_of_initializer %int.convert_checked.loc10_42 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc10_42.2: %i32 = converted %int_1.loc10_42, %.loc10_42.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %int.snegate.loc10_43: init %i32 = call %Negate.ref.loc10_35(%.loc10_42.2) [template = constants.%int_-1] -// CHECK:STDOUT: %int_1.loc10_46: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc10_43.1: %i32 = value_of_initializer %int.snegate.loc10_43 [template = constants.%int_-1] -// CHECK:STDOUT: %.loc10_43.2: %i32 = converted %int.snegate.loc10_43, %.loc10_43.1 [template = constants.%int_-1] -// CHECK:STDOUT: %impl.elem0.loc10_46: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc10_46: = bound_method %int_1.loc10_46, %impl.elem0.loc10_46 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc10_46: = specific_function %Convert.bound.loc10_46, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc10_46: init %i32 = call %Convert.specific_fn.loc10_46(%int_1.loc10_46) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc10_46.1: %i32 = value_of_initializer %int.convert_checked.loc10_46 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc10_46.2: %i32 = converted %int_1.loc10_46, %.loc10_46.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %int.right_shift.loc10: init %i32 = call %RightShift.ref.loc10(%.loc10_43.2, %.loc10_46.2) [template = constants.%int_-1] -// CHECK:STDOUT: %.loc10_47.1: %i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%int_-1] -// CHECK:STDOUT: %.loc10_47.2: %i32 = converted %int.right_shift.loc10, %.loc10_47.1 [template = constants.%int_-1] -// CHECK:STDOUT: %int.snegate.loc10_48: init %i32 = call %Negate.ref.loc10_17(%.loc10_47.2) [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc10_48: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc10_48: = bound_method %int.snegate.loc10_48, %impl.elem0.loc10_48 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc10_48: = specific_function %Convert.bound.loc10_48, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %.loc10_48.1: %i32 = value_of_initializer %int.snegate.loc10_48 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc10_48.2: %i32 = converted %int.snegate.loc10_48, %.loc10_48.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %int.convert_checked.loc10_48: init Core.IntLiteral = call %Convert.specific_fn.loc10_48(%.loc10_48.2) [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc10_48.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_48 [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc10_48.4: Core.IntLiteral = converted %int.snegate.loc10_48, %.loc10_48.3 [template = constants.%int_1.1] -// CHECK:STDOUT: %array_type.loc10: type = array_type %.loc10_48.4, %i32 [template = constants.%array_type.1] // CHECK:STDOUT: %arr1.var: ref %array_type.1 = var arr1 // CHECK:STDOUT: %arr1: ref %array_type.1 = bind_name arr1, %arr1.var -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %array_type.loc11: type = array_type %int_1.loc11, %i32 [template = constants.%array_type.1] -// CHECK:STDOUT: %ptr.loc11: type = ptr_type %array_type.1 [template = constants.%ptr.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: %Negate.ref.loc14_17: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %RightShift.ref.loc14: %RightShift.type.1 = name_ref RightShift, %RightShift.decl [template = constants.%RightShift] -// CHECK:STDOUT: %Negate.ref.loc14_35: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc14_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc14_42: = bound_method %int_10, %impl.elem0.loc14_42 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc14_42: = specific_function %Convert.bound.loc14_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %Convert.specific_fn.loc14_42(%int_10) [template = constants.%int_10.2] -// CHECK:STDOUT: %.loc14_42.1: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%int_10.2] -// CHECK:STDOUT: %.loc14_42.2: %i32 = converted %int_10, %.loc14_42.1 [template = constants.%int_10.2] -// CHECK:STDOUT: %int.snegate.loc14_44: init %i32 = call %Negate.ref.loc14_35(%.loc14_42.2) [template = constants.%int_-10] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc14_44.1: %i32 = value_of_initializer %int.snegate.loc14_44 [template = constants.%int_-10] -// CHECK:STDOUT: %.loc14_44.2: %i32 = converted %int.snegate.loc14_44, %.loc14_44.1 [template = constants.%int_-10] -// CHECK:STDOUT: %impl.elem0.loc14_47: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc14_47: = bound_method %int_2, %impl.elem0.loc14_47 [template = constants.%Convert.bound.4] -// CHECK:STDOUT: %Convert.specific_fn.loc14_47: = specific_function %Convert.bound.loc14_47, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.4] -// CHECK:STDOUT: %int.convert_checked.loc14_47: init %i32 = call %Convert.specific_fn.loc14_47(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc14_47.1: %i32 = value_of_initializer %int.convert_checked.loc14_47 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc14_47.2: %i32 = converted %int_2, %.loc14_47.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.right_shift.loc14: init %i32 = call %RightShift.ref.loc14(%.loc14_44.2, %.loc14_47.2) [template = constants.%int_-3] -// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%int_-3] -// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.right_shift.loc14, %.loc14_48.1 [template = constants.%int_-3] -// CHECK:STDOUT: %int.snegate.loc14_49: init %i32 = call %Negate.ref.loc14_17(%.loc14_48.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc14_49: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc14_49: = bound_method %int.snegate.loc14_49, %impl.elem0.loc14_49 [template = constants.%Convert.bound.5] -// CHECK:STDOUT: %Convert.specific_fn.loc14_49: = specific_function %Convert.bound.loc14_49, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.5] -// CHECK:STDOUT: %.loc14_49.1: %i32 = value_of_initializer %int.snegate.loc14_49 [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc14_49.2: %i32 = converted %int.snegate.loc14_49, %.loc14_49.1 [template = constants.%int_3.1] -// CHECK:STDOUT: %int.convert_checked.loc14_49: init Core.IntLiteral = call %Convert.specific_fn.loc14_49(%.loc14_49.2) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc14_49.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_49 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc14_49.4: Core.IntLiteral = converted %int.snegate.loc14_49, %.loc14_49.3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type.loc14: type = array_type %.loc14_49.4, %i32 [template = constants.%array_type.2] // CHECK:STDOUT: %arr2.var: ref %array_type.2 = var arr2 // CHECK:STDOUT: %arr2: ref %array_type.2 = bind_name arr2, %arr2.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type.loc15: type = array_type %int_3, %i32 [template = constants.%array_type.2] -// CHECK:STDOUT: %ptr.loc15: type = ptr_type %array_type.2 [template = constants.%ptr.2] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RightShift.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; @@ -475,15 +331,19 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc4_18: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_26: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc4_26: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_34: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] // CHECK:STDOUT: %i32.loc4_34: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_18: type = splice_block %i32.loc4_18 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %i32.loc4_18: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_26: type = splice_block %i32.loc4_26 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_26: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %i32.loc4_26: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -494,23 +354,17 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc5_14: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] // CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %i32.loc5_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_14: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] +// CHECK:STDOUT: %i32.loc5_14: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [template = constants.%int_32.1] -// CHECK:STDOUT: %i32.loc24: type = class_type @Int, @Int(constants.%int_32.1) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @RightShift.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.right_shift"; diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index 2e9e4df436a3..0737efcc0274 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -96,25 +96,6 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template] // CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [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: %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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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.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] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -148,53 +129,25 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add] -// 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.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_1, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_1, %.loc4_20.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.sadd, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.sadd, %.loc4_24.1 [template = constants.%int_3.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.sadd, %.loc4_24.3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_3, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -203,15 +156,19 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -254,22 +211,6 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [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.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: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -310,11 +251,13 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc8_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc8_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc8_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc8_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8: type = splice_block %i32.loc8_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc8_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc8_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -329,19 +272,25 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_15: type = splice_block %i32.loc13_15 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_23: type = splice_block %i32.loc13_23 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %c.param: %i32 = value_param runtime_param2 +// CHECK:STDOUT: %.loc13_31: type = splice_block %i32.loc13_31 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %i32 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param3 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -354,16 +303,20 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc18_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type, %.loc18_37.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_21: type = splice_block %i32.loc18_21 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc18_29: type = splice_block %i32.loc18_29 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc18_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -376,86 +329,29 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc19_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19_17: type = splice_block %i32.loc19_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc19_25: type = splice_block %i32.loc19_25 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] -// CHECK:STDOUT: %int_1.loc25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc25: = bound_method %int_1.loc25, %impl.elem0.loc25 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc25: = specific_function %Convert.bound.loc25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %Convert.specific_fn.loc25(%int_1.loc25) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc25_27.1: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc25_27.2: %i32 = converted %int_1.loc25, %.loc25_27.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.2) // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int_3.loc30: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc30_35: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_35: = bound_method %int_3.loc30, %impl.elem0.loc30_35 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc30_35: = specific_function %Convert.bound.loc30_35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %Convert.specific_fn.loc30_35(%int_3.loc30) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc30_35.1: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc30_35.2: %i32 = converted %int_3.loc30, %.loc30_35.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2, %.loc30_35.2) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc35: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc35_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc35_42: = bound_method %int_1.loc35, %impl.elem0.loc35_42 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc35_42: = specific_function %Convert.bound.loc35_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %Convert.specific_fn.loc35_42(%int_1.loc35) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc35_45: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc35_45: = bound_method %int_2.loc35, %impl.elem0.loc35_45 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc35_45: = specific_function %Convert.bound.loc35_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %Convert.specific_fn.loc35_45(%int_2.loc35) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc35_45.1: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc35_45.2: %i32 = converted %int_2.loc35, %.loc35_45.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2, %.loc35_45.2) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var -// CHECK:STDOUT: %int_32.loc44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int_3.loc44: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type: type = array_type , %i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var // CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { @@ -464,11 +360,13 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc46_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc46_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc46_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc46: type = splice_block %i32.loc46_25 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc46_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -483,19 +381,25 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc50_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc50_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc50_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc50_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc50_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc50_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc50_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc50_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc50_26: type = splice_block %i32.loc50_26 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc50_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc50_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc50_34: type = splice_block %i32.loc50_34 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc50_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc50_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %c.param: %i32 = value_param runtime_param2 +// CHECK:STDOUT: %.loc50_42: type = splice_block %i32.loc50_42 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc50_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc50_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %i32 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param3 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -508,16 +412,20 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc54_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc54_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc54_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc54_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc54_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc54_48.2: type = converted %bool.make_type, %.loc54_48.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc54_32: type = splice_block %i32.loc54_32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc54_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc54_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc54_40: type = splice_block %i32.loc54_40 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc54_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc54_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -616,23 +524,23 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sadd"; diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index a834a6133611..c5cbd9c2a52e 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -64,25 +64,6 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Div.type.1: type = fn_type @Div.1 [template] // CHECK:STDOUT: %Div: %Div.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [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: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [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_1.1: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -116,53 +97,25 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Div.ref: %Div.type.1 = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.sdiv: init %i32 = call %Div.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.sdiv, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.sdiv [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.sdiv, %.loc4_24.1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.sdiv, %.loc4_24.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -171,15 +124,19 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -263,15 +220,19 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -284,15 +245,19 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_11: type = splice_block %i32.loc5_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc5_19: type = splice_block %i32.loc5_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -303,21 +268,17 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %i32.loc6_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %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: %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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; @@ -476,23 +437,23 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.sdiv"; diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 514490a086f0..e529f6346131 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -67,25 +67,6 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Mod.type.1: type = fn_type @Mod.1 [template] // CHECK:STDOUT: %Mod: %Mod.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [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_3.1, %Convert.10 [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: %int_2.1: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_2.2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %array_type: type = array_type %int_2.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -119,53 +100,25 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Mod.ref: %Mod.type.1 = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_5, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_5) [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_5, %.loc4_20.1 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_3, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_3, %.loc4_23.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %int.smod: init %i32 = call %Mod.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.smod, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.smod [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.smod, %.loc4_24.1 [template = constants.%int_2.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.smod, %.loc4_24.3 [template = constants.%int_2.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_2, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -174,15 +127,19 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -267,15 +224,19 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -288,15 +249,19 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_11: type = splice_block %i32.loc5_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc5_19: type = splice_block %i32.loc5_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -307,21 +272,17 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %i32.loc6_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %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: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; @@ -480,23 +441,23 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smod"; diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index 28c34a728c36..72b5cb63472b 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -38,25 +38,6 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Mul.type.1: type = fn_type @Mul.1 [template] // CHECK:STDOUT: %Mul: %Mul.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [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: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [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_6.1: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %array_type: type = array_type %int_6.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -90,53 +71,25 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Mul.ref: %Mul.type.1 = name_ref Mul, %Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.smul: init %i32 = call %Mul.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_6.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.smul, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.smul [template = constants.%int_6.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.smul, %.loc4_24.1 [template = constants.%int_6.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.smul, %.loc4_24.3 [template = constants.%int_6.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_6, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -145,15 +98,19 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -233,23 +190,23 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mul.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.smul"; diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index 78e436b3f7fc..829736364d21 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -125,19 +125,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_123.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] -// CHECK:STDOUT: %int_123.2: %i32 = int_value 123 [template] -// CHECK:STDOUT: %int_-123: %i32 = int_value -123 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_123.2, %Convert.11 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %array_type: type = array_type %int_123.1, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -174,48 +164,19 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2: type = splice_block %i32.loc2_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %int_123.loc4: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_30: = bound_method %int_123.loc4, %impl.elem0.loc4_30 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %Convert.specific_fn.loc4_30(%int_123.loc4) [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc4_30.1: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc4_30.2: %i32 = converted %int_123.loc4, %.loc4_30.1 [template = constants.%int_123.2] -// CHECK:STDOUT: %int.snegate.loc4_33: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.2) [template = constants.%int_-123] -// CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.snegate.loc4_33 [template = constants.%int_-123] -// CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.snegate.loc4_33, %.loc4_33.1 [template = constants.%int_-123] -// CHECK:STDOUT: %int.snegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%int_123.2] -// CHECK:STDOUT: %impl.elem0.loc4_34: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_34: = bound_method %int.snegate.loc4_34, %impl.elem0.loc4_34 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_34: = specific_function %Convert.bound.loc4_34, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %.loc4_34.1: %i32 = value_of_initializer %int.snegate.loc4_34 [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc4_34.2: %i32 = converted %int.snegate.loc4_34, %.loc4_34.1 [template = constants.%int_123.2] -// CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %Convert.specific_fn.loc4_34(%.loc4_34.2) [template = constants.%int_123.1] -// CHECK:STDOUT: %.loc4_34.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_34 [template = constants.%int_123.1] -// CHECK:STDOUT: %.loc4_34.4: Core.IntLiteral = converted %int.snegate.loc4_34, %.loc4_34.3 [template = constants.%int_123.1] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_34.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_123.loc5: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_123.loc5, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] -// 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: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -224,15 +185,19 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc9_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc9_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc9_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc9_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc9_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc9_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_19: type = splice_block %i32.loc9_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc9_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc9_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc9_27: type = splice_block %i32.loc9_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc9_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc9_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -286,18 +251,6 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [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: %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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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.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: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -349,15 +302,19 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_15: type = splice_block %i32.loc13_15 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_23: type = splice_block %i32.loc13_23 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -368,12 +325,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type, %.loc18_29.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_21: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -384,60 +343,23 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19: type = splice_block %i32.loc19_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] -// CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref() // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc35: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc35: = bound_method %int_1.loc35, %impl.elem0.loc35 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc35: = specific_function %Convert.bound.loc35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %Convert.specific_fn.loc35(%int_1.loc35) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var -// CHECK:STDOUT: %int_32.loc44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %array_type: type = array_type , %i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var // CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { @@ -446,11 +368,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc46_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc46_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc46_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc46: type = splice_block %i32.loc46_25 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc46_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -465,19 +389,25 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc57_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc57_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc57_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc57_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc57_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc57_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc57_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc57_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc57_26: type = splice_block %i32.loc57_26 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc57_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc57_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc57_34: type = splice_block %i32.loc57_34 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc57_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc57_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %c.param: %i32 = value_param runtime_param2 +// CHECK:STDOUT: %.loc57_42: type = splice_block %i32.loc57_42 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc57_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc57_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %i32 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param3 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -490,16 +420,20 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc68_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc68_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc68_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc68_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc68_48.2: type = converted %bool.make_type, %.loc68_48.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc68_32: type = splice_block %i32.loc68_32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc68_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc68_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc68_40: type = splice_block %i32.loc68_40 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc68_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc68_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -587,11 +521,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %i32.loc4_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -604,23 +540,23 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_11: type = splice_block %i32.loc5_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc5_19: type = splice_block %i32.loc5_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.snegate"; diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index 946ff54e7142..308e79c50eb2 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -39,25 +39,6 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] // CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [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: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [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_1.1: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -91,53 +72,25 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Sub.ref: %Sub.type.1 = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.ssub, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.ssub [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.ssub, %.loc4_24.1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.ssub, %.loc4_24.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -146,15 +99,19 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -239,25 +196,23 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.ssub"; diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index 4d45c1f842de..67a4fdf8ddef 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -93,25 +93,6 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template] // CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [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: %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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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.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] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -145,53 +126,25 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add] -// 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.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_1, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_1, %.loc4_20.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.uadd: init %i32 = call %Add.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.uadd, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.uadd [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.uadd, %.loc4_24.1 [template = constants.%int_3.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.uadd, %.loc4_24.3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_3, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -200,15 +153,19 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -251,22 +208,6 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [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.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: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -307,11 +248,13 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc8_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc8_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc8_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc8_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8: type = splice_block %i32.loc8_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc8_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc8_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -326,19 +269,25 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_15: type = splice_block %i32.loc13_15 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_23: type = splice_block %i32.loc13_23 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %c.param: %i32 = value_param runtime_param2 +// CHECK:STDOUT: %.loc13_31: type = splice_block %i32.loc13_31 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %i32 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param3 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -351,16 +300,20 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc18_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_37.2: type = converted %bool.make_type, %.loc18_37.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_21: type = splice_block %i32.loc18_21 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc18_29: type = splice_block %i32.loc18_29 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc18_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -373,86 +326,29 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc19_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19_17: type = splice_block %i32.loc19_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc19_25: type = splice_block %i32.loc19_25 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] -// CHECK:STDOUT: %int_1.loc25: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc25: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc25: = bound_method %int_1.loc25, %impl.elem0.loc25 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc25: = specific_function %Convert.bound.loc25, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %Convert.specific_fn.loc25(%int_1.loc25) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc25_27.1: %i32 = value_of_initializer %int.convert_checked.loc25 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc25_27.2: %i32 = converted %int_1.loc25, %.loc25_27.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref(%.loc25_27.2) // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int_3.loc30: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc30_35: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_35: = bound_method %int_3.loc30, %impl.elem0.loc30_35 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc30_35: = specific_function %Convert.bound.loc30_35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %int.convert_checked.loc30_35: init %i32 = call %Convert.specific_fn.loc30_35(%int_3.loc30) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc30_35.1: %i32 = value_of_initializer %int.convert_checked.loc30_35 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc30_35.2: %i32 = converted %int_3.loc30, %.loc30_35.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2, %.loc30_35.2) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc35: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc35_42: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc35_42: = bound_method %int_1.loc35, %impl.elem0.loc35_42 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc35_42: = specific_function %Convert.bound.loc35_42, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc35_42: init %i32 = call %Convert.specific_fn.loc35_42(%int_1.loc35) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35_42 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc35_45: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc35_45: = bound_method %int_2.loc35, %impl.elem0.loc35_45 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc35_45: = specific_function %Convert.bound.loc35_45, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc35_45: init %i32 = call %Convert.specific_fn.loc35_45(%int_2.loc35) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc35_45.1: %i32 = value_of_initializer %int.convert_checked.loc35_45 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc35_45.2: %i32 = converted %int_2.loc35, %.loc35_45.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2, %.loc35_45.2) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var -// CHECK:STDOUT: %int_32.loc43: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc43: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %int_1.loc43: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc43: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int_3.loc43: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type: type = array_type , %i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var // CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { @@ -461,11 +357,13 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc45_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc45_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc45_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc45_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc45: type = splice_block %i32.loc45_25 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc45_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc45_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -480,19 +378,25 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc49_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc49_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc49_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc49_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc49_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc49_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc49_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc49_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc49_26: type = splice_block %i32.loc49_26 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc49_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc49_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc49_34: type = splice_block %i32.loc49_34 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc49_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc49_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %c.param: %i32 = value_param runtime_param2 +// CHECK:STDOUT: %.loc49_42: type = splice_block %i32.loc49_42 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc49_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc49_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %i32 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param3 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -505,16 +409,20 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc53_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc53_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc53_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc53_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc53_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc53_48.2: type = converted %bool.make_type, %.loc53_48.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc53_32: type = splice_block %i32.loc53_32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc53_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc53_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc53_40: type = splice_block %i32.loc53_40 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc53_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc53_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -613,23 +521,23 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Add.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.uadd"; diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index aa6b80315153..1e529db8ee3a 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -60,25 +60,6 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Div.type.1: type = fn_type @Div.1 [template] // CHECK:STDOUT: %Div: %Div.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [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: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [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_1.1: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -112,53 +93,25 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Div.ref: %Div.type.1 = name_ref Div, %Div.decl [template = constants.%Div] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.udiv: init %i32 = call %Div.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.udiv, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.udiv [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.udiv, %.loc4_24.1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.udiv, %.loc4_24.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -167,15 +120,19 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -260,15 +217,19 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -281,15 +242,19 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_11: type = splice_block %i32.loc5_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc5_19: type = splice_block %i32.loc5_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -300,21 +265,17 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %i32.loc6_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %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: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; @@ -473,23 +434,23 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Div.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.udiv"; diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index 4cac02d36ec5..50060fad4c92 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -62,25 +62,6 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Mod.type.1: type = fn_type @Mod.1 [template] // CHECK:STDOUT: %Mod: %Mod.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_5.1: Core.IntLiteral = int_value 5 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [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_3.1, %Convert.10 [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: %int_2.1: %i32 = int_value 2 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_2.2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %array_type: type = array_type %int_2.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -114,53 +95,25 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Mod.ref: %Mod.type.1 = name_ref Mod, %Mod.decl [template = constants.%Mod] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_5, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_5) [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_5, %.loc4_20.1 [template = constants.%int_5.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_3, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_3, %.loc4_23.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %int.umod: init %i32 = call %Mod.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.umod, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.umod [template = constants.%int_2.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.umod, %.loc4_24.1 [template = constants.%int_2.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.umod, %.loc4_24.3 [template = constants.%int_2.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_2, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -169,15 +122,19 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -262,15 +219,19 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -283,15 +244,19 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_11: type = splice_block %i32.loc5_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc5_19: type = splice_block %i32.loc5_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -302,21 +267,17 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %i32.loc6_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %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: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; @@ -475,23 +436,23 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mod.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umod"; diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index 87eff36d2ee5..04efd8669fa5 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -35,25 +35,6 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Mul.type.1: type = fn_type @Mul.1 [template] // CHECK:STDOUT: %Mul: %Mul.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [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: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [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_6.1: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %array_type: type = array_type %int_6.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -87,53 +68,25 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Mul.ref: %Mul.type.1 = name_ref Mul, %Mul.decl [template = constants.%Mul] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.umul: init %i32 = call %Mul.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_6.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.umul, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.umul [template = constants.%int_6.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.umul, %.loc4_24.1 [template = constants.%int_6.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.umul, %.loc4_24.3 [template = constants.%int_6.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_6, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -142,15 +95,19 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -230,23 +187,23 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Mul.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.umul"; diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index ac618441a9b3..06f0228ce82b 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -121,19 +121,9 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %Negate: %Negate.type.1 = struct_value () [template] // CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_123.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.2(%int_32) [template] -// CHECK:STDOUT: %int_123.2: %i32 = int_value 123 [template] -// CHECK:STDOUT: %int_-123: %i32 = int_value -123 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_123.2, %Convert.11 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] // CHECK:STDOUT: %array_type: type = array_type %int_123.1, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -170,48 +160,19 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2: type = splice_block %i32.loc2_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Negate.ref.loc4_16: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %Negate.ref.loc4_23: %Negate.type.1 = name_ref Negate, %Negate.decl [template = constants.%Negate] -// CHECK:STDOUT: %int_123.loc4: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %impl.elem0.loc4_30: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_30: = bound_method %int_123.loc4, %impl.elem0.loc4_30 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_30: = specific_function %Convert.bound.loc4_30, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %Convert.specific_fn.loc4_30(%int_123.loc4) [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc4_30.1: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc4_30.2: %i32 = converted %int_123.loc4, %.loc4_30.1 [template = constants.%int_123.2] -// CHECK:STDOUT: %int.unegate.loc4_33: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.2) [template = constants.%int_-123] -// CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.unegate.loc4_33 [template = constants.%int_-123] -// CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.unegate.loc4_33, %.loc4_33.1 [template = constants.%int_-123] -// CHECK:STDOUT: %int.unegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%int_123.2] -// CHECK:STDOUT: %impl.elem0.loc4_34: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_34: = bound_method %int.unegate.loc4_34, %impl.elem0.loc4_34 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_34: = specific_function %Convert.bound.loc4_34, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %.loc4_34.1: %i32 = value_of_initializer %int.unegate.loc4_34 [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc4_34.2: %i32 = converted %int.unegate.loc4_34, %.loc4_34.1 [template = constants.%int_123.2] -// CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %Convert.specific_fn.loc4_34(%.loc4_34.2) [template = constants.%int_123.1] -// CHECK:STDOUT: %.loc4_34.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_34 [template = constants.%int_123.1] -// CHECK:STDOUT: %.loc4_34.4: Core.IntLiteral = converted %int.unegate.loc4_34, %.loc4_34.3 [template = constants.%int_123.1] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_34.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_123.loc5: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_123.loc5, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] -// 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: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -220,15 +181,19 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc9_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc9_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc9_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc9_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc9_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc9_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_19: type = splice_block %i32.loc9_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc9_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc9_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc9_27: type = splice_block %i32.loc9_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc9_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc9_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -282,18 +247,6 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %BadReturnType: %BadReturnType.type = struct_value () [template] // CHECK:STDOUT: %JustRight.type: type = fn_type @JustRight [template] // CHECK:STDOUT: %JustRight: %JustRight.type = struct_value () [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: %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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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.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: %RuntimeCallTooFew.type: type = fn_type @RuntimeCallTooFew [template] // CHECK:STDOUT: %RuntimeCallTooFew: %RuntimeCallTooFew.type = struct_value () [template] // CHECK:STDOUT: %RuntimeCallTooMany.type: type = fn_type @RuntimeCallTooMany [template] @@ -345,15 +298,19 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_15: type = splice_block %i32.loc13_15 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_23: type = splice_block %i32.loc13_23 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -364,12 +321,14 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc18_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc18_29.2: type = converted %bool.make_type, %.loc18_29.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_21: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -380,60 +339,23 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19: type = splice_block %i32.loc19_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %TooFew.ref: %TooFew.type = name_ref TooFew, %TooFew.decl [template = constants.%TooFew] -// CHECK:STDOUT: %TooFew.call: init %i32 = call %TooFew.ref() // CHECK:STDOUT: %too_few.var: ref = var too_few // CHECK:STDOUT: %too_few: ref = bind_name too_few, %too_few.var -// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %TooMany.ref: %TooMany.type = name_ref TooMany, %TooMany.decl [template = constants.%TooMany] -// CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc30: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc30_29: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_29: = bound_method %int_1.loc30, %impl.elem0.loc30_29 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc30_29: = specific_function %Convert.bound.loc30_29, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc30_29: init %i32 = call %Convert.specific_fn.loc30_29(%int_1.loc30) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc30_29.1: %i32 = value_of_initializer %int.convert_checked.loc30_29 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc30_29.2: %i32 = converted %int_1.loc30, %.loc30_29.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc30_32: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc30_32: = bound_method %int_2.loc30, %impl.elem0.loc30_32 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc30_32: = specific_function %Convert.bound.loc30_32, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc30_32: init %i32 = call %Convert.specific_fn.loc30_32(%int_2.loc30) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc30_32.1: %i32 = value_of_initializer %int.convert_checked.loc30_32 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc30_32.2: %i32 = converted %int_2.loc30, %.loc30_32.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %TooMany.call: init %i32 = call %TooMany.ref(%.loc30_29.2, %.loc30_32.2) // CHECK:STDOUT: %too_many.var: ref = var too_many // CHECK:STDOUT: %too_many: ref = bind_name too_many, %too_many.var -// CHECK:STDOUT: %int_32.loc35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %BadReturnType.ref: %BadReturnType.type = name_ref BadReturnType, %BadReturnType.decl [template = constants.%BadReturnType] -// CHECK:STDOUT: %int_1.loc35: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc35: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc35: = bound_method %int_1.loc35, %impl.elem0.loc35 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc35: = specific_function %Convert.bound.loc35, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc35: init %i32 = call %Convert.specific_fn.loc35(%int_1.loc35) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc35_42.1: %i32 = value_of_initializer %int.convert_checked.loc35 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc35_42.2: %i32 = converted %int_1.loc35, %.loc35_42.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %BadReturnType.call: init bool = call %BadReturnType.ref(%.loc35_42.2) // CHECK:STDOUT: %bad_return_type.var: ref = var bad_return_type // CHECK:STDOUT: %bad_return_type: ref = bind_name bad_return_type, %bad_return_type.var -// CHECK:STDOUT: %int_32.loc44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %JustRight.ref: %JustRight.type = name_ref JustRight, %JustRight.decl [template = constants.%JustRight] -// CHECK:STDOUT: %int_1.loc44: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_2.loc44: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %array_type: type = array_type , %i32 [template = ] // CHECK:STDOUT: %bad_call.var: ref = var bad_call // CHECK:STDOUT: %bad_call: ref = bind_name bad_call, %bad_call.var // CHECK:STDOUT: %RuntimeCallTooFew.decl: %RuntimeCallTooFew.type = fn_decl @RuntimeCallTooFew [template = constants.%RuntimeCallTooFew] { @@ -442,11 +364,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc46_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc46_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc46_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc46: type = splice_block %i32.loc46_25 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc46_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc46_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -461,19 +385,25 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc57_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc57_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc57_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc57_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc57_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc57_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc57_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc57_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc57_26: type = splice_block %i32.loc57_26 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc57_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc57_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc57_34: type = splice_block %i32.loc57_34 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc57_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc57_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %c.param: %i32 = value_param runtime_param2 +// CHECK:STDOUT: %.loc57_42: type = splice_block %i32.loc57_42 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc57_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc57_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %i32 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param3 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -486,16 +416,20 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc68_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc68_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc68_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc68_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc68_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc68_48.2: type = converted %bool.make_type, %.loc68_48.1 [template = bool] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc68_32: type = splice_block %i32.loc68_32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc68_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc68_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc68_40: type = splice_block %i32.loc68_40 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc68_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc68_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -583,11 +517,13 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %i32.loc4_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -600,23 +536,23 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_11: type = splice_block %i32.loc5_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc5_19: type = splice_block %i32.loc5_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate.1(%a.param_patt: %i32) -> %i32 = "int.unegate"; diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index 3e2f4fcdee5e..65113f94b1e7 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -36,25 +36,6 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Sub.type.1: type = fn_type @Sub.1 [template] // CHECK:STDOUT: %Sub: %Sub.type.1 = struct_value () [template] -// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [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: %Convert.bound.2: = bound_method %int_2.1, %Convert.10 [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_1.1: %i32 = int_value 1 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_1.2: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %array_type: type = array_type %int_1.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -88,53 +69,25 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Sub.ref: %Sub.type.1 = name_ref Sub, %Sub.decl [template = constants.%Sub] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_3, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_3, %.loc4_20.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc4_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_23: = bound_method %int_2, %impl.elem0.loc4_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_23: = specific_function %Convert.bound.loc4_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_23: init %i32 = call %Convert.specific_fn.loc4_23(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.1: %i32 = value_of_initializer %int.convert_checked.loc4_23 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_23.2: %i32 = converted %int_2, %.loc4_23.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc4_20.2, %.loc4_23.2) [template = constants.%int_1.1] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int.usub, %impl.elem0.loc4_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.usub [template = constants.%int_1.1] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int.usub, %.loc4_24.1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %Convert.specific_fn.loc4_24(%.loc4_24.2) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_24.4: Core.IntLiteral = converted %int.usub, %.loc4_24.3 [template = constants.%int_1.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_1, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -143,15 +96,19 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -236,25 +193,23 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc4_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_11: type = splice_block %i32.loc4_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc4_19: type = splice_block %i32.loc4_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc4_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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: %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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Sub.1(%a.param_patt: %i32, %b.param_patt: %i32) -> %i32 = "int.usub"; diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index de1754bd8d93..f3503f7d002b 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -26,25 +26,6 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Xor.type: type = fn_type @Xor [template] // CHECK:STDOUT: %Xor: %Xor.type = struct_value () [template] -// CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] -// CHECK:STDOUT: %int_10.1: Core.IntLiteral = int_value 10 [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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_12.1, %Convert.10 [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_10.1, %Convert.10 [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: %int_6.1: %i32 = int_value 6 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_6.2: Core.IntLiteral = int_value 6 [template] // CHECK:STDOUT: %array_type: type = array_type %int_6.2, %i32 [template] // CHECK:STDOUT: %ptr: type = ptr_type %array_type [template] @@ -78,53 +59,25 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc2_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc2_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_11: type = splice_block %i32.loc2_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc2_19: type = splice_block %i32.loc2_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc2_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc2_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Xor.ref: %Xor.type = name_ref Xor, %Xor.decl [template = constants.%Xor] -// CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12.1] -// CHECK:STDOUT: %int_10: Core.IntLiteral = int_value 10 [template = constants.%int_10.1] -// CHECK:STDOUT: %impl.elem0.loc4_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_20: = bound_method %int_12, %impl.elem0.loc4_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc4_20: = specific_function %Convert.bound.loc4_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc4_20: init %i32 = call %Convert.specific_fn.loc4_20(%int_12) [template = constants.%int_12.2] -// CHECK:STDOUT: %.loc4_20.1: %i32 = value_of_initializer %int.convert_checked.loc4_20 [template = constants.%int_12.2] -// CHECK:STDOUT: %.loc4_20.2: %i32 = converted %int_12, %.loc4_20.1 [template = constants.%int_12.2] -// CHECK:STDOUT: %impl.elem0.loc4_24: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc4_24: = bound_method %int_10, %impl.elem0.loc4_24 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc4_24: = specific_function %Convert.bound.loc4_24, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32 = call %Convert.specific_fn.loc4_24(%int_10) [template = constants.%int_10.2] -// CHECK:STDOUT: %.loc4_24.1: %i32 = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%int_10.2] -// CHECK:STDOUT: %.loc4_24.2: %i32 = converted %int_10, %.loc4_24.1 [template = constants.%int_10.2] -// CHECK:STDOUT: %int.xor: init %i32 = call %Xor.ref(%.loc4_20.2, %.loc4_24.2) [template = constants.%int_6.1] -// CHECK:STDOUT: %impl.elem0.loc4_26: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc4_26: = bound_method %int.xor, %impl.elem0.loc4_26 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc4_26: = specific_function %Convert.bound.loc4_26, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc4_26.1: %i32 = value_of_initializer %int.xor [template = constants.%int_6.1] -// CHECK:STDOUT: %.loc4_26.2: %i32 = converted %int.xor, %.loc4_26.1 [template = constants.%int_6.1] -// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %Convert.specific_fn.loc4_26(%.loc4_26.2) [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc4_26.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%int_6.2] -// CHECK:STDOUT: %.loc4_26.4: Core.IntLiteral = converted %int.xor, %.loc4_26.3 [template = constants.%int_6.2] -// CHECK:STDOUT: %array_type.loc4: type = array_type %.loc4_26.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [template = constants.%int_6.2] -// CHECK:STDOUT: %array_type.loc5: type = array_type %int_6, %i32 [template = constants.%array_type] -// CHECK:STDOUT: %ptr: type = ptr_type %array_type [template = constants.%ptr] // CHECK:STDOUT: %RuntimeCall.decl: %RuntimeCall.type = fn_decl @RuntimeCall [template = constants.%RuntimeCall] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 @@ -133,15 +86,19 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_19: type = splice_block %i32.loc7_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc7_27: type = splice_block %i32.loc7_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/int_literal/make_type.carbon b/toolchain/check/testdata/builtins/int_literal/make_type.carbon index 92dd742a889a..df724bca53ba 100644 --- a/toolchain/check/testdata/builtins/int_literal/make_type.carbon +++ b/toolchain/check/testdata/builtins/int_literal/make_type.carbon @@ -76,10 +76,6 @@ var i: IntLiteral(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc6_19.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc6_19.2: type = converted %int_literal.make_type, %.loc6_19.1 [template = Core.IntLiteral] // CHECK:STDOUT: %i.var: ref Core.IntLiteral = var i // CHECK:STDOUT: %i: ref Core.IntLiteral = bind_name i, %i.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/print/char.carbon b/toolchain/check/testdata/builtins/print/char.carbon index 1eb168d79e52..d9a9b442937b 100644 --- a/toolchain/check/testdata/builtins/print/char.carbon +++ b/toolchain/check/testdata/builtins/print/char.carbon @@ -67,11 +67,13 @@ fn Main() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc13_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %i32.loc13_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/builtins/print/int.carbon b/toolchain/check/testdata/builtins/print/int.carbon index 4b24230f4526..d2294037411e 100644 --- a/toolchain/check/testdata/builtins/print/int.carbon +++ b/toolchain/check/testdata/builtins/print/int.carbon @@ -67,9 +67,11 @@ fn Main() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} diff --git a/toolchain/check/testdata/builtins/read/int.carbon b/toolchain/check/testdata/builtins/read/int.carbon index 29cb202acf33..2a382b1502f8 100644 --- a/toolchain/check/testdata/builtins/read/int.carbon +++ b/toolchain/check/testdata/builtins/read/int.carbon @@ -64,15 +64,11 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ReadChar.ref.loc16: %ReadChar.type.1 = name_ref ReadChar, file.%ReadChar.decl [template = constants.%ReadChar.1] // CHECK:STDOUT: %read.char.loc16: init %i32 = call %ReadChar.ref.loc16() // CHECK:STDOUT: %.loc16_26.1: %i32 = value_of_initializer %read.char.loc16 // CHECK:STDOUT: %.loc16_26.2: %i32 = converted %read.char.loc16, %.loc16_26.1 // CHECK:STDOUT: %n: %i32 = bind_name n, %.loc16_26.2 -// 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: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ReadChar.ref.loc17: %ReadChar.type.2 = name_ref ReadChar, imports.%import_ref.5 [template = constants.%ReadChar.2] // CHECK:STDOUT: %read.char.loc17: init %i32 = call %ReadChar.ref.loc17() diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index 14157472dd79..4c9ef50efdb8 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -197,11 +197,7 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Circle { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %Circle.elem = field_decl radius, element0 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound.1] @@ -268,16 +264,13 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Circle.ref.loc18_15: type = name_ref Circle, file.%Circle.decl [template = constants.%Circle] -// CHECK:STDOUT: %Circle.ref.loc18_24: type = name_ref Circle, file.%Circle.decl [template = constants.%Circle] +// CHECK:STDOUT: %Circle.ref: type = name_ref Circle, file.%Circle.decl [template = constants.%Circle] // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, @Circle.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc18_36.1: ref %Circle = temporary_storage // CHECK:STDOUT: %Make.call: init %Circle = call %Make.ref() to %.loc18_36.1 // CHECK:STDOUT: %.loc18_36.2: ref %Circle = temporary %.loc18_36.1, %Make.call // CHECK:STDOUT: %.loc18_36.3: %Circle = bind_value %.loc18_36.2 // CHECK:STDOUT: %circle: %Circle = bind_name circle, %.loc18_36.3 -// 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: %circle.ref.loc26: %Circle = name_ref circle, %circle // CHECK:STDOUT: %radius.ref.loc26: = name_ref radius, [template = ] // CHECK:STDOUT: %radius: %i32 = bind_name radius, @@ -325,8 +318,6 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// 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: %.loc5: %A.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -338,8 +329,6 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// 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: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %x.ref: = name_ref x, [template = ] // CHECK:STDOUT: %x: %i32 = bind_name x, @@ -390,8 +379,6 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Circle { -// 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: %.loc5: %Circle.elem = field_decl radius, element0 [template] // CHECK:STDOUT: %GetRadius.decl: %GetRadius.type = fn_decl @GetRadius [template = constants.%GetRadius] { // CHECK:STDOUT: %self.patt: %Circle = binding_pattern self @@ -399,10 +386,10 @@ class A { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // 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: %self.param: %Circle = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // CHECK:STDOUT: %self: %Circle = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -422,10 +409,10 @@ class A { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // 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: %self.param: %Circle = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // CHECK:STDOUT: %self: %Circle = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -507,13 +494,9 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} -// 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: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// 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: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] @@ -574,15 +557,9 @@ class A { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_5.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] @@ -591,8 +568,6 @@ class A { // CHECK:STDOUT: %.loc5_27.1: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%int_5.2] // 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_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] diff --git a/toolchain/check/testdata/class/adapter/adapt.carbon b/toolchain/check/testdata/class/adapter/adapt.carbon index 9799d4dfe38c..f15bf71e18d0 100644 --- a/toolchain/check/testdata/class/adapter/adapt.carbon +++ b/toolchain/check/testdata/class/adapter/adapt.carbon @@ -80,11 +80,7 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %SomeClass.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6: %SomeClass.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -153,8 +149,8 @@ fn F(a: AdaptNotExtend) { // CHECK:STDOUT: %a.patt: %AdaptNotExtend = binding_pattern a // CHECK:STDOUT: %a.param_patt: %AdaptNotExtend = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %AdaptNotExtend.ref: type = name_ref AdaptNotExtend, file.%AdaptNotExtend.decl [template = constants.%AdaptNotExtend] // CHECK:STDOUT: %a.param: %AdaptNotExtend = value_param runtime_param0 +// CHECK:STDOUT: %AdaptNotExtend.ref: type = name_ref AdaptNotExtend, file.%AdaptNotExtend.decl [template = constants.%AdaptNotExtend] // CHECK:STDOUT: %a: %AdaptNotExtend = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/adapter/adapt_copy.carbon b/toolchain/check/testdata/class/adapter/adapt_copy.carbon index 4c36fadfdfbb..589d80ab2137 100644 --- a/toolchain/check/testdata/class/adapter/adapt_copy.carbon +++ b/toolchain/check/testdata/class/adapter/adapt_copy.carbon @@ -139,9 +139,9 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: %return.patt: %AdaptCopyable = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %AdaptCopyable = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %AdaptCopyable.ref.loc10_9: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] // CHECK:STDOUT: %AdaptCopyable.ref.loc10_27: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] // CHECK:STDOUT: %c.param: %AdaptCopyable = value_param runtime_param0 +// CHECK:STDOUT: %AdaptCopyable.ref.loc10_9: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] // CHECK:STDOUT: %c: %AdaptCopyable = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %AdaptCopyable = out_param runtime_param1 // CHECK:STDOUT: %return: ref %AdaptCopyable = return_slot %return.param @@ -152,17 +152,19 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %AdaptCopyable.ref.loc15_16: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] -// CHECK:STDOUT: %int_32.loc15_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_34.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc15_16, %i32.loc15_31) -// CHECK:STDOUT: %.loc15_34.2: type = converted %.loc15_34.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %AdaptCopyable.ref.loc15_41: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] // CHECK:STDOUT: %int_32.loc15_56: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc15_56: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc15_59.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc15_41, %i32.loc15_56) // CHECK:STDOUT: %.loc15_59.2: type = converted %.loc15_59.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_34.3: type = splice_block %.loc15_34.2 [template = constants.%tuple.type.2] { +// CHECK:STDOUT: %AdaptCopyable.ref.loc15_16: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] +// CHECK:STDOUT: %int_32.loc15_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc15_34.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc15_16, %i32.loc15_31) +// CHECK:STDOUT: %.loc15_34.2: type = converted %.loc15_34.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param @@ -182,7 +184,6 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%c.param_patt: %AdaptCopyable) -> %AdaptCopyable { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %AdaptCopyable.ref.loc11: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] // CHECK:STDOUT: %d.var: ref %AdaptCopyable = var d // CHECK:STDOUT: %d: ref %AdaptCopyable = bind_name d, %d.var // CHECK:STDOUT: %c.ref: %AdaptCopyable = name_ref c, %c @@ -194,11 +195,6 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: // CHECK:STDOUT: fn @InTuple(%c.param_patt: %tuple.type.2) -> %return.param_patt: %tuple.type.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %AdaptCopyable.ref.loc16: type = name_ref AdaptCopyable, file.%AdaptCopyable.decl [template = constants.%AdaptCopyable] -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc16_29.1: %tuple.type.1 = tuple_literal (%AdaptCopyable.ref.loc16, %i32.loc16) -// CHECK:STDOUT: %.loc16_29.2: type = converted %.loc16_29.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %d.var: ref %tuple.type.2 = var d // CHECK:STDOUT: %d: ref %tuple.type.2 = bind_name d, %d.var // CHECK:STDOUT: %c.ref: %tuple.type.2 = name_ref c, %c @@ -260,9 +256,9 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: %return.patt: %AdaptTuple = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %AdaptTuple = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %AdaptTuple.ref.loc10_9: type = name_ref AdaptTuple, file.%AdaptTuple.decl [template = constants.%AdaptTuple] // CHECK:STDOUT: %AdaptTuple.ref.loc10_24: type = name_ref AdaptTuple, file.%AdaptTuple.decl [template = constants.%AdaptTuple] // CHECK:STDOUT: %c.param: %AdaptTuple = value_param runtime_param0 +// CHECK:STDOUT: %AdaptTuple.ref.loc10_9: type = name_ref AdaptTuple, file.%AdaptTuple.decl [template = constants.%AdaptTuple] // CHECK:STDOUT: %c: %AdaptTuple = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %AdaptTuple = out_param runtime_param1 // CHECK:STDOUT: %return: ref %AdaptTuple = return_slot %return.param @@ -286,7 +282,6 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%c.param_patt: %AdaptTuple) -> %return.param_patt: %AdaptTuple { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %AdaptTuple.ref.loc15: type = name_ref AdaptTuple, file.%AdaptTuple.decl [template = constants.%AdaptTuple] // CHECK:STDOUT: %d.var: ref %AdaptTuple = var d // CHECK:STDOUT: %d: ref %AdaptTuple = bind_name d, %d.var // CHECK:STDOUT: %c.ref: %AdaptTuple = name_ref c, %c @@ -330,9 +325,9 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: %return.patt: %AdaptNoncopyable = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %AdaptNoncopyable = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %AdaptNoncopyable.ref.loc12_9: type = name_ref AdaptNoncopyable, file.%AdaptNoncopyable.decl [template = constants.%AdaptNoncopyable] // CHECK:STDOUT: %AdaptNoncopyable.ref.loc12_30: type = name_ref AdaptNoncopyable, file.%AdaptNoncopyable.decl [template = constants.%AdaptNoncopyable] // CHECK:STDOUT: %a.param: %AdaptNoncopyable = value_param runtime_param0 +// CHECK:STDOUT: %AdaptNoncopyable.ref.loc12_9: type = name_ref AdaptNoncopyable, file.%AdaptNoncopyable.decl [template = constants.%AdaptNoncopyable] // CHECK:STDOUT: %a: %AdaptNoncopyable = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %AdaptNoncopyable = out_param runtime_param1 // CHECK:STDOUT: %return: ref %AdaptNoncopyable = return_slot %return.param @@ -359,7 +354,6 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%a.param_patt: %AdaptNoncopyable) -> %return.param_patt: %AdaptNoncopyable { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %AdaptNoncopyable.ref.loc17: type = name_ref AdaptNoncopyable, file.%AdaptNoncopyable.decl [template = constants.%AdaptNoncopyable] // CHECK:STDOUT: %b.var: ref %AdaptNoncopyable = var b // CHECK:STDOUT: %b: ref %AdaptNoncopyable = bind_name b, %b.var // CHECK:STDOUT: %a.ref: %AdaptNoncopyable = name_ref a, %a @@ -409,9 +403,9 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: %return.patt: %AdaptNoncopyableIndirect = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %AdaptNoncopyableIndirect = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %AdaptNoncopyableIndirect.ref.loc12_9: type = name_ref AdaptNoncopyableIndirect, file.%AdaptNoncopyableIndirect.decl [template = constants.%AdaptNoncopyableIndirect] // CHECK:STDOUT: %AdaptNoncopyableIndirect.ref.loc12_38: type = name_ref AdaptNoncopyableIndirect, file.%AdaptNoncopyableIndirect.decl [template = constants.%AdaptNoncopyableIndirect] // CHECK:STDOUT: %a.param: %AdaptNoncopyableIndirect = value_param runtime_param0 +// CHECK:STDOUT: %AdaptNoncopyableIndirect.ref.loc12_9: type = name_ref AdaptNoncopyableIndirect, file.%AdaptNoncopyableIndirect.decl [template = constants.%AdaptNoncopyableIndirect] // CHECK:STDOUT: %a: %AdaptNoncopyableIndirect = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %AdaptNoncopyableIndirect = out_param runtime_param1 // CHECK:STDOUT: %return: ref %AdaptNoncopyableIndirect = return_slot %return.param @@ -444,7 +438,6 @@ fn H(a: AdaptNoncopyableIndirect) -> AdaptNoncopyableIndirect { // CHECK:STDOUT: // CHECK:STDOUT: fn @H(%a.param_patt: %AdaptNoncopyableIndirect) -> %return.param_patt: %AdaptNoncopyableIndirect { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %AdaptNoncopyableIndirect.ref.loc17: type = name_ref AdaptNoncopyableIndirect, file.%AdaptNoncopyableIndirect.decl [template = constants.%AdaptNoncopyableIndirect] // CHECK:STDOUT: %b.var: ref %AdaptNoncopyableIndirect = var b // CHECK:STDOUT: %b: ref %AdaptNoncopyableIndirect = bind_name b, %b.var // CHECK:STDOUT: %a.ref: %AdaptNoncopyableIndirect = name_ref a, %a diff --git a/toolchain/check/testdata/class/adapter/extend_adapt.carbon b/toolchain/check/testdata/class/adapter/extend_adapt.carbon index 3c624e91a6c7..139d924157ee 100644 --- a/toolchain/check/testdata/class/adapter/extend_adapt.carbon +++ b/toolchain/check/testdata/class/adapter/extend_adapt.carbon @@ -182,16 +182,16 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %a.patt: %SomeClassAdapter = binding_pattern a // CHECK:STDOUT: %a.param_patt: %SomeClassAdapter = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a.param: %SomeClassAdapter = value_param runtime_param0 +// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a: %SomeClassAdapter = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAdapterMethod.decl: %TestAdapterMethod.type = fn_decl @TestAdapterMethod [template = constants.%TestAdapterMethod] { // CHECK:STDOUT: %a.patt: %SomeClassAdapter = binding_pattern a // CHECK:STDOUT: %a.param_patt: %SomeClassAdapter = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a.param: %SomeClassAdapter = value_param runtime_param0 +// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a: %SomeClassAdapter = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -208,19 +208,15 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// 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: %.loc7: %SomeClass.elem = field_decl a, element0 [template] -// 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: %.loc8: %SomeClass.elem = field_decl b, element1 [template] // CHECK:STDOUT: %StaticMemberFunction.decl: %StaticMemberFunction.type = fn_decl @StaticMemberFunction [template = constants.%StaticMemberFunction] {} {} // CHECK:STDOUT: %AdapterMethod.decl: %AdapterMethod.type = fn_decl @AdapterMethod [template = constants.%AdapterMethod] { // CHECK:STDOUT: %self.patt: %SomeClassAdapter = binding_pattern self // CHECK:STDOUT: %self.param_patt: %SomeClassAdapter = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %self.param: %SomeClassAdapter = value_param runtime_param0 +// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl.loc4 [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %self: %SomeClassAdapter = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] @@ -291,8 +287,8 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %a.patt: %SomeClassAdapter = binding_pattern a // CHECK:STDOUT: %a.param_patt: %SomeClassAdapter = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a.param: %SomeClassAdapter = value_param runtime_param0 +// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a: %SomeClassAdapter = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -302,8 +298,8 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %self.patt: %SomeClass = binding_pattern self // CHECK:STDOUT: %self.param_patt: %SomeClass = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SomeClass [template = constants.%SomeClass] // CHECK:STDOUT: %self.param: %SomeClass = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%SomeClass [template = constants.%SomeClass] // CHECK:STDOUT: %self: %SomeClass = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] @@ -376,10 +372,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl [template = constants.%SomeClassAdapter] // 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: %a.param: %SomeClassAdapter = value_param runtime_param0 +// CHECK:STDOUT: %SomeClassAdapter.ref: type = name_ref SomeClassAdapter, file.%SomeClassAdapter.decl [template = constants.%SomeClassAdapter] // CHECK:STDOUT: %a: %SomeClassAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -387,11 +383,7 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @SomeClass { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %SomeClass.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6: %SomeClass.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -456,10 +448,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %StructAdapter.ref: type = name_ref StructAdapter, file.%StructAdapter.decl [template = constants.%StructAdapter] // 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: %a.param: %StructAdapter = value_param runtime_param0 +// CHECK:STDOUT: %StructAdapter.ref: type = name_ref StructAdapter, file.%StructAdapter.decl [template = constants.%StructAdapter] // CHECK:STDOUT: %a: %StructAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -524,10 +516,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %TupleAdapter.ref: type = name_ref TupleAdapter, file.%TupleAdapter.decl [template = constants.%TupleAdapter] // 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: %a.param: %TupleAdapter = value_param runtime_param0 +// CHECK:STDOUT: %TupleAdapter.ref: type = name_ref TupleAdapter, file.%TupleAdapter.decl [template = constants.%TupleAdapter] // CHECK:STDOUT: %a: %TupleAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -597,12 +589,14 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_31.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_31.2: type = converted %int_literal.make_type, %.loc4_31.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_31.3: type = splice_block %.loc4_31.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc4_31.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc4_31.2: type = converted %int_literal.make_type, %.loc4_31.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -614,10 +608,10 @@ fn F(a: IntAdapter) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntAdapter.ref: type = name_ref IntAdapter, file.%IntAdapter.decl [template = constants.%IntAdapter] // 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: %a.param: %IntAdapter = value_param runtime_param0 +// CHECK:STDOUT: %IntAdapter.ref: type = name_ref IntAdapter, file.%IntAdapter.decl [template = constants.%IntAdapter] // CHECK:STDOUT: %a: %IntAdapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/class/adapter/fail_adapt_bad_decl.carbon b/toolchain/check/testdata/class/adapter/fail_adapt_bad_decl.carbon index f0fa49492479..0340d91f64f2 100644 --- a/toolchain/check/testdata/class/adapter/fail_adapt_bad_decl.carbon +++ b/toolchain/check/testdata/class/adapter/fail_adapt_bad_decl.carbon @@ -131,8 +131,8 @@ class C { // CHECK:STDOUT: %b.patt: %Bad = binding_pattern b // CHECK:STDOUT: %b.param_patt: %Bad = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Bad.ref: type = name_ref Bad, file.%Bad.decl [template = constants.%Bad] // CHECK:STDOUT: %b.param: %Bad = value_param runtime_param0 +// CHECK:STDOUT: %Bad.ref: type = name_ref Bad, file.%Bad.decl [template = constants.%Bad] // CHECK:STDOUT: %b: %Bad = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -184,8 +184,8 @@ class C { // CHECK:STDOUT: %b.patt: %Bad = binding_pattern b // CHECK:STDOUT: %b.param_patt: %Bad = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Bad.ref: type = name_ref Bad, file.%Bad.decl [template = constants.%Bad] // CHECK:STDOUT: %b.param: %Bad = value_param runtime_param0 +// CHECK:STDOUT: %Bad.ref: type = name_ref Bad, file.%Bad.decl [template = constants.%Bad] // CHECK:STDOUT: %b: %Bad = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/adapter/fail_adapt_with_subobjects.carbon b/toolchain/check/testdata/class/adapter/fail_adapt_with_subobjects.carbon index 85d278e74ab4..6cde41d272bd 100644 --- a/toolchain/check/testdata/class/adapter/fail_adapt_with_subobjects.carbon +++ b/toolchain/check/testdata/class/adapter/fail_adapt_with_subobjects.carbon @@ -158,11 +158,9 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithField { -// 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: adapt_decl %i32.loc8 [template] -// 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: %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: adapt_decl %i32 [template] // CHECK:STDOUT: %.loc13: %AdaptWithField.elem = field_decl n, element [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -172,17 +170,11 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @AdaptWithFields { -// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: adapt_decl %i32.loc20 [template] -// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: adapt_decl %i32 [template] // CHECK:STDOUT: %.loc25: %AdaptWithFields.elem = field_decl a, element [template] -// 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: %.loc26: %AdaptWithFields.elem = field_decl b, element [template] -// 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: %.loc27: %AdaptWithFields.elem = field_decl c, element [template] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -236,8 +228,6 @@ class AdaptWithBaseAndFields { // CHECK:STDOUT: class @AdaptWithBaseAndFields { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc7: %AdaptWithBaseAndFields.elem.1 = base_decl %Base.ref, element [template] -// 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: %.loc8: %AdaptWithBaseAndFields.elem.2 = field_decl n, element [template] // CHECK:STDOUT: %.loc15_10: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc15_11: type = converted %.loc15_10, constants.%empty_struct_type [template = constants.%empty_struct_type] diff --git a/toolchain/check/testdata/class/adapter/init_adapt.carbon b/toolchain/check/testdata/class/adapter/init_adapt.carbon index db23ec1c7ff9..b222fa8f1681 100644 --- a/toolchain/check/testdata/class/adapter/init_adapt.carbon +++ b/toolchain/check/testdata/class/adapter/init_adapt.carbon @@ -146,9 +146,6 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %AdaptC.decl: type = class_decl @AdaptC [template = constants.%AdaptC] {} {} -// CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %AdaptC.ref.loc15: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %MakeC.decl: %MakeC.type = fn_decl @MakeC [template = constants.%MakeC] { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 @@ -165,20 +162,14 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %return.param: ref %AdaptC = out_param runtime_param0 // CHECK:STDOUT: %return: ref %AdaptC = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %AdaptC.ref.loc23: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] // CHECK:STDOUT: %d.var: ref %AdaptC = var d // CHECK:STDOUT: %d: ref %AdaptC = bind_name d, %d.var -// CHECK:STDOUT: %C.ref.loc25: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %e.var: ref %C = var e // CHECK:STDOUT: %e: ref %C = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %C.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6: %C.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -310,9 +301,6 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %AdaptC.decl: type = class_decl @AdaptC [template = constants.%AdaptC] {} {} -// CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %AdaptC.ref.loc24: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] -// CHECK:STDOUT: %C.ref.loc33: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %MakeC.decl: %MakeC.type = fn_decl @MakeC [template = constants.%MakeC] { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 @@ -329,20 +317,14 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %return.param: ref %AdaptC = out_param runtime_param0 // CHECK:STDOUT: %return: ref %AdaptC = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %AdaptC.ref.loc46: type = name_ref AdaptC, %AdaptC.decl [template = constants.%AdaptC] // CHECK:STDOUT: %d.var: ref %AdaptC = var d // CHECK:STDOUT: %d: ref %AdaptC = bind_name d, %d.var -// CHECK:STDOUT: %C.ref.loc54: type = name_ref C, %C.decl [template = constants.%C] // CHECK:STDOUT: %e.var: ref %C = var e // CHECK:STDOUT: %e: ref %C = bind_name e, %e.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %C.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6: %C.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base.carbon b/toolchain/check/testdata/class/base.carbon index 1206470ba429..59ad333269de 100644 --- a/toolchain/check/testdata/class/base.carbon +++ b/toolchain/check/testdata/class/base.carbon @@ -116,7 +116,6 @@ class Derived { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %int_32.loc17_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc17_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc17_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] @@ -124,6 +123,7 @@ class Derived { // CHECK:STDOUT: %.loc17_35.1: %tuple.type.1 = tuple_literal (%i32.loc17_27, %i32.loc17_32) // CHECK:STDOUT: %.loc17_35.2: type = converted %.loc17_35.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %d.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param @@ -131,8 +131,6 @@ class Derived { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// 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: %.loc4: %Base.elem = field_decl b, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -145,8 +143,6 @@ class Derived { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc8: %Derived.elem.1 = base_decl %Base.ref, element0 [template] -// 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: %.loc10: %Derived.elem.2 = field_decl d, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -251,8 +247,6 @@ class Derived { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Derived { -// 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: %.loc7: %Derived.elem = field_decl d, element0 [template] // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.d [template = constants.%complete_type.4] diff --git a/toolchain/check/testdata/class/base_field.carbon b/toolchain/check/testdata/class/base_field.carbon index 52868facb66c..f30b0f5464fb 100644 --- a/toolchain/check/testdata/class/base_field.carbon +++ b/toolchain/check/testdata/class/base_field.carbon @@ -69,12 +69,14 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: %return.patt: %ptr.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %ptr.loc24_21: type = ptr_type %Derived [template = constants.%ptr.2] // 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: %ptr.loc24_30: type = ptr_type %i32 [template = constants.%ptr.3] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc24: type = splice_block %ptr.loc24_21 [template = constants.%ptr.2] { +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] +// CHECK:STDOUT: %ptr.loc24_21: type = ptr_type %Derived [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.3 = return_slot %return.param @@ -82,14 +84,8 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// 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: %.loc12: %Base.elem = field_decl a, element0 [template] -// 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: %.loc13: %Base.elem = field_decl b, element1 [template] -// 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: %.loc14: %Base.elem = field_decl c, element2 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.c [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -104,11 +100,7 @@ fn Access(p: Derived*) -> i32* { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc18: %Derived.elem.1 = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc20: %Derived.elem.2 = field_decl d, element1 [template] -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc21: %Derived.elem.2 = field_decl e, element2 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.e.1 [template = constants.%complete_type.4] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/base_method.carbon b/toolchain/check/testdata/class/base_method.carbon index 7e148f16e372..747b90c83db6 100644 --- a/toolchain/check/testdata/class/base_method.carbon +++ b/toolchain/check/testdata/class/base_method.carbon @@ -77,11 +77,13 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc17_11: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %ptr.loc17: type = ptr_type %Base [template = constants.%ptr.1] // CHECK:STDOUT: %self.param.loc17: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc17_26: type = splice_block %ptr.loc17 [template = constants.%ptr.1] { +// CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Base [template = constants.%Base] +// CHECK:STDOUT: %ptr.loc17: type = ptr_type %Base [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc17: %ptr.1 = bind_name self, %self.param.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [template = constants.%Derived] {} {} @@ -89,25 +91,27 @@ fn Call(p: Derived*) { // CHECK:STDOUT: %p.patt: %ptr.3 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr.3 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] // CHECK:STDOUT: %p.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc25: type = splice_block %ptr [template = constants.%ptr.3] { +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] +// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// 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: %.loc12: %Base.elem = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc17_11: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %ptr.loc14: type = ptr_type %Base [template = constants.%ptr.1] // CHECK:STDOUT: %self.param.loc14: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc14: type = splice_block %ptr.loc14 [template = constants.%ptr.1] { +// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%Base [template = constants.%Base] +// CHECK:STDOUT: %ptr.loc14: type = ptr_type %Base [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc14: %ptr.1 = bind_name self, %self.param.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] diff --git a/toolchain/check/testdata/class/base_method_qualified.carbon b/toolchain/check/testdata/class/base_method_qualified.carbon index 44f6e7397498..f6684ee51895 100644 --- a/toolchain/check/testdata/class/base_method_qualified.carbon +++ b/toolchain/check/testdata/class/base_method_qualified.carbon @@ -97,10 +97,10 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // 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: %a.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %a: %Derived = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -111,11 +111,13 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] // 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: %p.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc29: type = splice_block %ptr [template = constants.%ptr.3] { +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] +// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -126,10 +128,10 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // 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: %a.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %a: %Derived = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -140,11 +142,13 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] -// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] // 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: %p.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc37: type = splice_block %ptr [template = constants.%ptr.3] { +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] +// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -158,16 +162,16 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %self.patt: %Derived = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Derived = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Derived [template = constants.%Derived] // CHECK:STDOUT: %self.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Derived [template = constants.%Derived] // CHECK:STDOUT: %self: %Derived = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type.2 = fn_decl @G.2 [template = constants.%G.2] { // CHECK:STDOUT: %self.patt: %Derived = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Derived = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Derived [template = constants.%Derived] // CHECK:STDOUT: %self.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Derived [template = constants.%Derived] // CHECK:STDOUT: %self: %Derived = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.3] @@ -188,10 +192,10 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // 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: %self.param: %Base = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %self: %Base = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -202,10 +206,10 @@ fn PassDerivedToBaseIndirect(p: Derived*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // 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: %self.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl.loc11 [template = constants.%Derived] // CHECK:STDOUT: %self: %Derived = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/class/base_method_shadow.carbon b/toolchain/check/testdata/class/base_method_shadow.carbon index 63cfe6d4e61c..77068a8135fc 100644 --- a/toolchain/check/testdata/class/base_method_shadow.carbon +++ b/toolchain/check/testdata/class/base_method_shadow.carbon @@ -95,21 +95,29 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %d.patt: %ptr.6 = binding_pattern d // CHECK:STDOUT: %d.param_patt: %ptr.6 = value_param_pattern %d.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %ptr.loc29_13: type = ptr_type %A [template = constants.%ptr.1] -// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %ptr.loc29_20: type = ptr_type %B [template = constants.%ptr.3] -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr.loc29_27: type = ptr_type %C [template = constants.%ptr.5] -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %ptr.loc29_34: type = ptr_type %D [template = constants.%ptr.6] // CHECK:STDOUT: %a.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc29_13: type = splice_block %ptr.loc29_13 [template = constants.%ptr.1] { +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %ptr.loc29_13: type = ptr_type %A [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.1 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %ptr.3 = value_param runtime_param1 +// CHECK:STDOUT: %.loc29_20: type = splice_block %ptr.loc29_20 [template = constants.%ptr.3] { +// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %ptr.loc29_20: type = ptr_type %B [template = constants.%ptr.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %ptr.3 = bind_name b, %b.param // CHECK:STDOUT: %c.param: %ptr.5 = value_param runtime_param2 +// CHECK:STDOUT: %.loc29_27: type = splice_block %ptr.loc29_27 [template = constants.%ptr.5] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr.loc29_27: type = ptr_type %C [template = constants.%ptr.5] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %ptr.5 = bind_name c, %c.param // CHECK:STDOUT: %d.param: %ptr.6 = value_param runtime_param3 +// CHECK:STDOUT: %.loc29_34: type = splice_block %ptr.loc29_34 [template = constants.%ptr.6] { +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] +// CHECK:STDOUT: %ptr.loc29_34: type = ptr_type %D [template = constants.%ptr.6] +// CHECK:STDOUT: } // CHECK:STDOUT: %d: %ptr.6 = bind_name d, %d.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -118,11 +126,13 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc12: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc12_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [template = constants.%A] -// CHECK:STDOUT: %ptr: type = ptr_type %A [template = constants.%ptr.1] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_23: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%A [template = constants.%A] +// CHECK:STDOUT: %ptr: type = ptr_type %A [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] @@ -139,11 +149,13 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %F.decl: %F.type.2 = fn_decl @F.2 [template = constants.%F.2] { // CHECK:STDOUT: %self.patt: %ptr.3 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.3 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc17_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] -// CHECK:STDOUT: %ptr: type = ptr_type %B [template = constants.%ptr.3] // CHECK:STDOUT: %self.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc17_23: type = splice_block %ptr [template = constants.%ptr.3] { +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] +// CHECK:STDOUT: %ptr: type = ptr_type %B [template = constants.%ptr.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.3 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.2] @@ -162,11 +174,13 @@ fn Call(a: A*, b: B*, c: C*, d: D*) { // CHECK:STDOUT: %F.decl: %F.type.3 = fn_decl @F.3 [template = constants.%F.3] { // CHECK:STDOUT: %self.patt: %ptr.5 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.5 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc22: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc22_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.5] // CHECK:STDOUT: %self.param: %ptr.5 = value_param runtime_param0 +// CHECK:STDOUT: %.loc22_23: type = splice_block %ptr [template = constants.%ptr.5] { +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.5] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.5 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.3 [template = constants.%complete_type.3] diff --git a/toolchain/check/testdata/class/basic.carbon b/toolchain/check/testdata/class/basic.carbon index ec52c5abbfa8..c7a8d89e65c4 100644 --- a/toolchain/check/testdata/class/basic.carbon +++ b/toolchain/check/testdata/class/basic.carbon @@ -74,11 +74,13 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc21_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc21_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc21: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21: type = splice_block %i32.loc21_15 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc21_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc21_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc21: %i32 = bind_name n, %n.param.loc21 // CHECK:STDOUT: %return.param.loc21: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc21: ref %i32 = return_slot %return.param.loc21 @@ -103,11 +105,13 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc12_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc12_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %i32.loc12_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc12_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc12_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -118,17 +122,17 @@ fn Run() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc16_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc16_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc16: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16: type = splice_block %i32.loc16_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc16: %i32 = bind_name n, %n.param.loc16 // CHECK:STDOUT: %return.param.loc16: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc16: ref %i32 = return_slot %return.param.loc16 // CHECK:STDOUT: } -// 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: %.loc18: %Class.elem = field_decl k, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/complete_in_member_fn.carbon b/toolchain/check/testdata/class/complete_in_member_fn.carbon index 50b7d737294c..e187b287e9c8 100644 --- a/toolchain/check/testdata/class/complete_in_member_fn.carbon +++ b/toolchain/check/testdata/class/complete_in_member_fn.carbon @@ -51,16 +51,14 @@ class C { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // 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: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %.loc14: %C.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/compound_field.carbon b/toolchain/check/testdata/class/compound_field.carbon index c0186b5d0d09..86f9af24e2c2 100644 --- a/toolchain/check/testdata/class/compound_field.carbon +++ b/toolchain/check/testdata/class/compound_field.carbon @@ -90,10 +90,10 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref.loc24: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // 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: %d.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Derived.ref.loc24: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -104,10 +104,10 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %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: %d.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -118,12 +118,14 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %return.patt: %ptr.5 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref.loc32: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %ptr.loc32_36: type = ptr_type %Derived [template = constants.%ptr.4] // 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: %ptr.loc32_45: type = ptr_type %i32 [template = constants.%ptr.5] // CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %.loc32: type = splice_block %ptr.loc32_36 [template = constants.%ptr.4] { +// CHECK:STDOUT: %Derived.ref.loc32: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] +// CHECK:STDOUT: %ptr.loc32_36: type = ptr_type %Derived [template = constants.%ptr.4] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.5 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.5 = return_slot %return.param @@ -134,12 +136,14 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: %return.patt: %ptr.5 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %ptr.loc36_33: type = ptr_type %Derived [template = constants.%ptr.4] // 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: %ptr.loc36_42: type = ptr_type %i32 [template = constants.%ptr.5] // CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %.loc36: type = splice_block %ptr.loc36_33 [template = constants.%ptr.4] { +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] +// CHECK:STDOUT: %ptr.loc36_33: type = ptr_type %Derived [template = constants.%ptr.4] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.5 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.5 = return_slot %return.param @@ -147,14 +151,8 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// 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: %.loc12: %Base.elem = field_decl a, element0 [template] -// 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: %.loc13: %Base.elem = field_decl b, element1 [template] -// 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: %.loc14: %Base.elem = field_decl c, element2 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.c [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -169,11 +167,7 @@ fn AccessBaseIndirect(p: Derived*) -> i32* { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc18: %Derived.elem.1 = base_decl %Base.ref, element0 [template] -// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc20: %Derived.elem.2 = field_decl d, element1 [template] -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc21: %Derived.elem.2 = field_decl e, element2 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.e.1 [template = constants.%complete_type.4] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/cross_package_import.carbon b/toolchain/check/testdata/class/cross_package_import.carbon index d2fbf9b2d734..62b5487289ee 100644 --- a/toolchain/check/testdata/class/cross_package_import.carbon +++ b/toolchain/check/testdata/class/cross_package_import.carbon @@ -201,7 +201,6 @@ var c: Other.C = {}; // CHECK:STDOUT: .C = %import_ref.1 // CHECK:STDOUT: import Other//other_define // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//other_define, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//other_define, loc4_10, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//other_define, inst16 [no loc], unloaded // CHECK:STDOUT: } @@ -214,8 +213,6 @@ var c: Other.C = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -238,7 +235,6 @@ var c: Other.C = {}; // CHECK:STDOUT: --- fail_extern.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %C: type = class_type @C [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -251,7 +247,6 @@ var c: Other.C = {}; // CHECK:STDOUT: .C = %import_ref // CHECK:STDOUT: import Other//other_extern // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: type = import_ref Other//other_extern, C, loaded [template = constants.%C] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -262,8 +257,6 @@ var c: Other.C = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref [template = constants.%C] // CHECK:STDOUT: %c.var: ref = var c // CHECK:STDOUT: %c: ref = bind_name c, %c.var // CHECK:STDOUT: } @@ -296,7 +289,6 @@ var c: Other.C = {}; // CHECK:STDOUT: import Other//other_define // CHECK:STDOUT: import Other//other_extern // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//other_define, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//other_define, loc4_10, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//other_define, inst16 [no loc], unloaded // CHECK:STDOUT: } @@ -309,8 +301,6 @@ var c: Other.C = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -349,7 +339,6 @@ var c: Other.C = {}; // CHECK:STDOUT: import Other//other_define // CHECK:STDOUT: import Other//other_conflict // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//other_define, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//other_define, loc4_10, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//other_define, inst16 [no loc], unloaded // CHECK:STDOUT: } @@ -362,8 +351,6 @@ var c: Other.C = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/derived_to_base.carbon b/toolchain/check/testdata/class/derived_to_base.carbon index d21ea07f24b2..f6830842aca7 100644 --- a/toolchain/check/testdata/class/derived_to_base.carbon +++ b/toolchain/check/testdata/class/derived_to_base.carbon @@ -128,11 +128,13 @@ fn ConvertInit() { // CHECK:STDOUT: %return.patt: %ptr.5 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.5 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr.loc25_20: type = ptr_type %C [template = constants.%ptr.4] // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %ptr.loc25_27: type = ptr_type %B [template = constants.%ptr.5] // CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %.loc25_20: type = splice_block %ptr.loc25_20 [template = constants.%ptr.4] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr.loc25_20: type = ptr_type %C [template = constants.%ptr.4] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.5 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.5 = return_slot %return.param @@ -143,11 +145,13 @@ fn ConvertInit() { // CHECK:STDOUT: %return.patt: %ptr.8 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.8 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %ptr.loc26_20: type = ptr_type %B [template = constants.%ptr.5] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %ptr.loc26_27: type = ptr_type %A [template = constants.%ptr.8] // CHECK:STDOUT: %p.param: %ptr.5 = value_param runtime_param0 +// CHECK:STDOUT: %.loc26_20: type = splice_block %ptr.loc26_20 [template = constants.%ptr.5] { +// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %ptr.loc26_20: type = ptr_type %B [template = constants.%ptr.5] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.5 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.8 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.8 = return_slot %return.param @@ -158,11 +162,13 @@ fn ConvertInit() { // CHECK:STDOUT: %return.patt: %ptr.8 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.8 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr.loc27_20: type = ptr_type %C [template = constants.%ptr.4] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %ptr.loc27_27: type = ptr_type %A [template = constants.%ptr.8] // CHECK:STDOUT: %p.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %.loc27_20: type = splice_block %ptr.loc27_20 [template = constants.%ptr.4] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr.loc27_20: type = ptr_type %C [template = constants.%ptr.4] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.4 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.8 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.8 = return_slot %return.param @@ -171,8 +177,8 @@ fn ConvertInit() { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %ConvertRef.decl: %ConvertRef.type = fn_decl @ConvertRef [template = constants.%ConvertRef] { @@ -181,11 +187,13 @@ fn ConvertInit() { // CHECK:STDOUT: %return.patt: %ptr.8 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.8 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr.loc33_19: type = ptr_type %C [template = constants.%ptr.4] // CHECK:STDOUT: %A.ref.loc33: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %ptr.loc33_26: type = ptr_type %A [template = constants.%ptr.8] // CHECK:STDOUT: %c.param: %ptr.4 = value_param runtime_param0 +// CHECK:STDOUT: %.loc33: type = splice_block %ptr.loc33_19 [template = constants.%ptr.4] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr.loc33_19: type = ptr_type %C [template = constants.%ptr.4] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %ptr.4 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %ptr.8 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.8 = return_slot %return.param @@ -194,8 +202,6 @@ fn ConvertInit() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// 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: %.loc12: %A.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -208,8 +214,6 @@ fn ConvertInit() { // CHECK:STDOUT: class @B { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc16: %B.elem.1 = base_decl %A.ref, element0 [template] -// 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: %.loc17: %B.elem.2 = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.b.1 [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -224,8 +228,6 @@ fn ConvertInit() { // CHECK:STDOUT: class @C { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc21: %C.elem.1 = base_decl %B.ref, element0 [template] -// 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: %.loc22: %C.elem.2 = field_decl c, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.c.1 [template = constants.%complete_type.5] // CHECK:STDOUT: @@ -270,7 +272,6 @@ fn ConvertInit() { // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertValue(%c.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %c.ref: %C = name_ref c, %c // CHECK:STDOUT: %.loc30_15.1: ref %B = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc30_15.2: ref %A = class_element_access %.loc30_15.1, element0 @@ -294,7 +295,6 @@ fn ConvertInit() { // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertInit() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %.loc38_39.1: %struct_type.a.2 = struct_literal (%int_1) // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index 7d5dd15499e9..7441ecf269dc 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -224,7 +224,6 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Contains { -// CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc15: = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: @@ -272,7 +271,6 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Var() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: return @@ -307,8 +305,8 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %a.patt: %Abstract = binding_pattern a // CHECK:STDOUT: %a.param_patt: %Abstract = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Abstract.ref.loc7: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %a.param: %Abstract = value_param runtime_param0 +// CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %a: %Abstract = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -323,7 +321,6 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %Abstract) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Abstract.ref.loc8: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %a.ref: %Abstract = name_ref a, %a // CHECK:STDOUT: %l: %Abstract = bind_name l, // CHECK:STDOUT: return @@ -407,16 +404,16 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %a.patt: %Abstract = binding_pattern a // CHECK:STDOUT: %a.param_patt: %Abstract = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %a.param: %Abstract = value_param runtime_param0 +// CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %a: %Abstract = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { // CHECK:STDOUT: %p.patt: %Abstract = binding_pattern p // CHECK:STDOUT: %p.param_patt: %Abstract = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %p.param: %Abstract = value_param runtime_param0 +// CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %p: %Abstract = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -499,8 +496,6 @@ fn CallReturnAbstract() { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc8: %Derived.elem.1 = base_decl %Abstract.ref, element0 [template] -// 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: %.loc10: %Derived.elem.2 = field_decl d, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -562,9 +557,9 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %return.patt: %Abstract = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Abstract = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Abstract.ref.loc13_14: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %Abstract.ref.loc13_27: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %a.param: %Abstract = value_param runtime_param0 +// CHECK:STDOUT: %Abstract.ref.loc13_14: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %a: %Abstract = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %Abstract = out_param runtime_param1 // CHECK:STDOUT: %return: ref %Abstract = return_slot %return.param @@ -582,8 +577,6 @@ fn CallReturnAbstract() { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc8: %Derived.elem.1 = base_decl %Abstract.ref, element0 [template] -// 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: %.loc10: %Derived.elem.2 = field_decl d, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -643,10 +636,10 @@ fn CallReturnAbstract() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %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: %d.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -654,8 +647,6 @@ fn CallReturnAbstract() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Abstract { -// 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: %.loc5: %Abstract.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -668,8 +659,6 @@ fn CallReturnAbstract() { // CHECK:STDOUT: class @Derived { // CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc9: %Derived.elem.1 = base_decl %Abstract.ref, element0 [template] -// 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: %.loc11: %Derived.elem.2 = field_decl d, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -728,7 +717,6 @@ fn CallReturnAbstract() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Abstract.ref: type = name_ref Abstract, file.%Abstract.decl [template = constants.%Abstract] // CHECK:STDOUT: %.loc8: %empty_struct_type = struct_literal () // CHECK:STDOUT: %l: %Abstract = bind_name l, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/fail_addr_not_self.carbon b/toolchain/check/testdata/class/fail_addr_not_self.carbon index 17375149f2a6..c4be24431262 100644 --- a/toolchain/check/testdata/class/fail_addr_not_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_not_self.carbon @@ -57,18 +57,22 @@ class Class { // CHECK:STDOUT: %a.patt.loc16_13.2: %ptr = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc16_13.1 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %ptr = value_param_pattern %a.patt.loc16_13.2, runtime_param [symbolic = %a.patt.loc16_13.1 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr] // CHECK:STDOUT: %a.param: %ptr = value_param runtime_param +// CHECK:STDOUT: %.loc16: type = splice_block %ptr [template = constants.%ptr] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc16_13.2: %ptr = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc16_13.1 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %b.patt: %ptr = binding_pattern b // CHECK:STDOUT: %b.param_patt: %ptr = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr] // CHECK:STDOUT: %b.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %.loc21: type = splice_block %ptr [template = constants.%ptr] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %ptr = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] diff --git a/toolchain/check/testdata/class/fail_addr_self.carbon b/toolchain/check/testdata/class/fail_addr_self.carbon index ee4409ee6c14..5a585232dade 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -71,12 +71,14 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref.loc20_9: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %Class.ref.loc20_19: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Class.ref.loc20_9: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param1 +// CHECK:STDOUT: %.loc20: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref.loc20_19: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -85,19 +87,21 @@ fn F(c: Class, p: Class*) { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc12: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc12_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_24: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %Class = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Class = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] diff --git a/toolchain/check/testdata/class/fail_base_bad_type.carbon b/toolchain/check/testdata/class/fail_base_bad_type.carbon index a8507308fa66..2e4d8c582b78 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -210,11 +210,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromError.ref: type = name_ref DeriveFromError, file.%DeriveFromError.decl [template = constants.%DeriveFromError] -// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromError [template = constants.%ptr] // 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: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_55: type = splice_block %ptr [template = constants.%ptr] { +// CHECK:STDOUT: %DeriveFromError.ref: type = name_ref DeriveFromError, file.%DeriveFromError.decl [template = constants.%DeriveFromError] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromError [template = constants.%ptr] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -236,7 +238,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @AccessMemberWithInvalidBaseError(%p.param_patt: %ptr) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p -// CHECK:STDOUT: %.loc13: ref %DeriveFromError = deref %p.ref +// CHECK:STDOUT: %.loc13_75: ref %DeriveFromError = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -275,11 +277,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, file.%DeriveFromNonType.decl [template = constants.%DeriveFromNonType] -// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromNonType [template = constants.%ptr] // 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: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_58: type = splice_block %ptr [template = constants.%ptr] { +// CHECK:STDOUT: %DeriveFromNonType.ref: type = name_ref DeriveFromNonType, file.%DeriveFromNonType.decl [template = constants.%DeriveFromNonType] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromNonType [template = constants.%ptr] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -302,7 +306,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @AccessMemberWithInvalidBasNonType(%p.param_patt: %ptr) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr = name_ref p, %p -// CHECK:STDOUT: %.loc15: ref %DeriveFromNonType = deref %p.ref +// CHECK:STDOUT: %.loc15_78: ref %DeriveFromNonType = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -347,12 +351,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %ptr.loc14_40: type = ptr_type %DeriveFromi32 [template = constants.%ptr.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: %ptr.loc14_49: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_40: type = splice_block %ptr.loc14_40 [template = constants.%ptr.1] { +// CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] +// CHECK:STDOUT: %ptr.loc14_40: type = ptr_type %DeriveFromi32 [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param @@ -363,11 +369,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] -// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromi32 [template = constants.%ptr.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: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_51: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %DeriveFromi32.ref: type = name_ref DeriveFromi32, file.%DeriveFromi32.decl [template = constants.%DeriveFromi32] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromi32 [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -400,7 +408,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @AccessMemberWithInvalidBasei32(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p -// CHECK:STDOUT: %.loc20: ref %DeriveFromi32 = deref %p.ref +// CHECK:STDOUT: %.loc20_71: ref %DeriveFromi32 = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -450,13 +458,15 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %ptr.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %ptr.loc21_44: type = ptr_type %DeriveFromTuple [template = constants.%ptr.2] // CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %.loc21_56: %tuple.type.1 = tuple_literal (%Base.ref) // CHECK:STDOUT: %.loc21_57: type = converted %.loc21_56, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %ptr.loc21_57: type = ptr_type %tuple.type.2 [template = constants.%ptr.3] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21_44: type = splice_block %ptr.loc21_44 [template = constants.%ptr.2] { +// CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] +// CHECK:STDOUT: %ptr.loc21_44: type = ptr_type %DeriveFromTuple [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.3 = return_slot %return.param @@ -467,11 +477,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] -// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromTuple [template = constants.%ptr.2] // 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: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_55: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %DeriveFromTuple.ref: type = name_ref DeriveFromTuple, file.%DeriveFromTuple.decl [template = constants.%DeriveFromTuple] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromTuple [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -510,7 +522,7 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @AccessMemberWithInvalidBaseTuple(%p.param_patt: %ptr.2) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p -// CHECK:STDOUT: %.loc23: ref %DeriveFromTuple = deref %p.ref +// CHECK:STDOUT: %.loc23_75: ref %DeriveFromTuple = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -554,8 +566,6 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %ptr.1 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %ptr.loc21_46: type = ptr_type %DeriveFromStruct [template = constants.%ptr.2] // CHECK:STDOUT: %int_32.loc21_57: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc21_57: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_66: Core.IntLiteral = int_value 32 [template = constants.%int_32] @@ -563,6 +573,10 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] // CHECK:STDOUT: %ptr.loc21_70: type = ptr_type %struct_type.a.b [template = constants.%ptr.1] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21_46: type = splice_block %ptr.loc21_46 [template = constants.%ptr.2] { +// CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] +// CHECK:STDOUT: %ptr.loc21_46: type = ptr_type %DeriveFromStruct [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.1 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.1 = return_slot %return.param @@ -573,11 +587,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] -// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromStruct [template = constants.%ptr.2] // 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: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc24_57: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %DeriveFromStruct.ref: type = name_ref DeriveFromStruct, file.%DeriveFromStruct.decl [template = constants.%DeriveFromStruct] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromStruct [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -603,14 +619,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @ConvertToBadBaseStruct(%p.param_patt: %ptr.2) -> %ptr.1 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p -// CHECK:STDOUT: %.loc21: %ptr.1 = converted %p.ref, [template = ] +// CHECK:STDOUT: %.loc21_82: %ptr.1 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AccessMemberWithInvalidBaseStruct(%p.param_patt: %ptr.2) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p -// CHECK:STDOUT: %.loc24: ref %DeriveFromStruct = deref %p.ref +// CHECK:STDOUT: %.loc24_77: ref %DeriveFromStruct = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -656,11 +672,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] -// CHECK:STDOUT: %ptr.loc28_54: type = ptr_type %DeriveFromIncomplete [template = constants.%ptr.1] // CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] // CHECK:STDOUT: %ptr.loc28_70: type = ptr_type %Incomplete [template = constants.%ptr.2] // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc28_54: type = splice_block %ptr.loc28_54 [template = constants.%ptr.1] { +// CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] +// CHECK:STDOUT: %ptr.loc28_54: type = ptr_type %DeriveFromIncomplete [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param @@ -671,11 +689,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] -// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromIncomplete [template = constants.%ptr.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: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30_65: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %DeriveFromIncomplete.ref: type = name_ref DeriveFromIncomplete, file.%DeriveFromIncomplete.decl [template = constants.%DeriveFromIncomplete] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromIncomplete [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -699,14 +719,14 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: fn @ConvertToBadBaseIncomplete(%p.param_patt: %ptr.1) -> %ptr.2 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p -// CHECK:STDOUT: %.loc28: %ptr.2 = converted %p.ref, [template = ] +// CHECK:STDOUT: %.loc28_82: %ptr.2 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @AccessMemberWithInvalidBaseIncomplete(%p.param_patt: %ptr.1) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p -// CHECK:STDOUT: %.loc30: ref %DeriveFromIncomplete = deref %p.ref +// CHECK:STDOUT: %.loc30_85: ref %DeriveFromIncomplete = deref %p.ref // CHECK:STDOUT: %n.ref: = name_ref n, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -760,11 +780,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %ptr.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %ptr.loc17_44: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] // CHECK:STDOUT: %Final.ref: type = name_ref Final, file.%Final.decl [template = constants.%Final] // CHECK:STDOUT: %ptr.loc17_55: type = ptr_type %Final [template = constants.%ptr.3] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc17: type = splice_block %ptr.loc17_44 [template = constants.%ptr.2] { +// CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] +// CHECK:STDOUT: %ptr.loc17_44: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.3 = return_slot %return.param @@ -775,11 +797,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] // 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: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -790,11 +814,13 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] -// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] // 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: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc25: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %DeriveFromFinal.ref: type = name_ref DeriveFromFinal, file.%DeriveFromFinal.decl [template = constants.%DeriveFromFinal] +// CHECK:STDOUT: %ptr: type = ptr_type %DeriveFromFinal [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -802,8 +828,6 @@ fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Final { -// 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: %.loc5: %Final.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_base_misplaced.carbon b/toolchain/check/testdata/class/fail_base_misplaced.carbon index fbd0ce4c4fae..cab8006aab9b 100644 --- a/toolchain/check/testdata/class/fail_base_misplaced.carbon +++ b/toolchain/check/testdata/class/fail_base_misplaced.carbon @@ -45,7 +45,5 @@ fn F() { // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @F(); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_base_unbound.carbon b/toolchain/check/testdata/class/fail_base_unbound.carbon index 76b1ad017bdb..1ed694588f75 100644 --- a/toolchain/check/testdata/class/fail_base_unbound.carbon +++ b/toolchain/check/testdata/class/fail_base_unbound.carbon @@ -48,7 +48,6 @@ let b: B = C.base; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [template = constants.%B] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { diff --git a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon index 6cddd1cf7dc8..deee7774126a 100644 --- a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon +++ b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon @@ -68,10 +68,10 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // 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: %a.param: %A = value_param runtime_param0 +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %a: %A = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -79,8 +79,6 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// 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: %.loc12: %A.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -91,8 +89,6 @@ fn AccessBInA(a: A) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// 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: %.loc16: %B.elem = field_decl b, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b [template = constants.%complete_type.4] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon index 8243ac5840d9..dd2b85dab7c9 100644 --- a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon +++ b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon @@ -55,7 +55,6 @@ fn Make() -> C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %NoSuchType.ref: = name_ref NoSuchType, [template = ] // CHECK:STDOUT: %.loc15: = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_derived_to_base.carbon b/toolchain/check/testdata/class/fail_derived_to_base.carbon index a4cbf0c1d80a..6b319c89ebdd 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -96,11 +96,13 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %return.patt: %ptr.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %B2.ref: type = name_ref B2, file.%B2.decl [template = constants.%B2] -// CHECK:STDOUT: %ptr.loc31_26: type = ptr_type %B2 [template = constants.%ptr.2] // CHECK:STDOUT: %A1.ref: type = name_ref A1, file.%A1.decl [template = constants.%A1] // CHECK:STDOUT: %ptr.loc31_34: type = ptr_type %A1 [template = constants.%ptr.3] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc31_26: type = splice_block %ptr.loc31_26 [template = constants.%ptr.2] { +// CHECK:STDOUT: %B2.ref: type = name_ref B2, file.%B2.decl [template = constants.%B2] +// CHECK:STDOUT: %ptr.loc31_26: type = ptr_type %B2 [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.3 = return_slot %return.param @@ -112,11 +114,13 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: %return.patt: %ptr.7 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.7 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %ptr.loc41_35: type = ptr_type %Incomplete [template = constants.%ptr.6] // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] // CHECK:STDOUT: %ptr.loc41_43: type = ptr_type %A2 [template = constants.%ptr.7] // CHECK:STDOUT: %p.param: %ptr.6 = value_param runtime_param0 +// CHECK:STDOUT: %.loc41_35: type = splice_block %ptr.loc41_35 [template = constants.%ptr.6] { +// CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, file.%Incomplete.decl [template = constants.%Incomplete] +// CHECK:STDOUT: %ptr.loc41_35: type = ptr_type %Incomplete [template = constants.%ptr.6] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.6 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.7 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.7 = return_slot %return.param @@ -124,8 +128,6 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A1 { -// 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: %.loc12: %A1.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -136,8 +138,6 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A2 { -// 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: %.loc16: %A2.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -150,8 +150,6 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: class @B2 { // CHECK:STDOUT: %A2.ref: type = name_ref A2, file.%A2.decl [template = constants.%A2] // CHECK:STDOUT: %.loc20: %B2.elem.1 = base_decl %A2.ref, element0 [template] -// 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: %.loc21: %B2.elem.2 = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.b.1 [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -168,14 +166,14 @@ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDOUT: fn @ConvertUnrelated(%p.param_patt: %ptr.2) -> %ptr.3 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p -// CHECK:STDOUT: %.loc31: %ptr.3 = converted %p.ref, [template = ] +// CHECK:STDOUT: %.loc31_46: %ptr.3 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConvertIncomplete(%p.param_patt: %ptr.6) -> %ptr.7 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %p.ref: %ptr.6 = name_ref p, %p -// CHECK:STDOUT: %.loc41: %ptr.7 = converted %p.ref, [template = ] +// CHECK:STDOUT: %.loc41_55: %ptr.7 = converted %p.ref, [template = ] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_extend_cycle.carbon b/toolchain/check/testdata/class/fail_extend_cycle.carbon index e984c9946f9b..e451fc829426 100644 --- a/toolchain/check/testdata/class/fail_extend_cycle.carbon +++ b/toolchain/check/testdata/class/fail_extend_cycle.carbon @@ -87,7 +87,6 @@ base class A { // CHECK:STDOUT: class @.1 { // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc27: %.elem = base_decl %A.ref, element0 [template] -// CHECK:STDOUT: %C.ref: = name_ref C, [template = ] // CHECK:STDOUT: %.loc31: = field_decl c, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index 45a26d9633d0..db3d41b167da 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -76,14 +76,8 @@ class Class { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// 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: %.loc17: %Class.elem = field_decl j, element0 [template] -// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc23: %Class.elem = field_decl k, element1 [template] -// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc29: = bound_method %int_0, %impl.elem0.loc29 [template = constants.%Convert.bound.1] @@ -92,8 +86,6 @@ class Class { // CHECK:STDOUT: %.loc29_25.1: %i32 = value_of_initializer %int.convert_checked.loc29 [template = constants.%int_0.2] // 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_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc34: = bound_method %int_1, %impl.elem0.loc34 [template = constants.%Convert.bound.2] diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index a29eab64d3a9..053e35afa5da 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -80,15 +80,17 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %n.patt: = binding_pattern n // CHECK:STDOUT: %n.param_patt: = value_param_pattern %n.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc32: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc32_10.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc32_10.2 (constants.%N.2)] -// CHECK:STDOUT: %Self.ref: = name_ref Self, [template = ] -// CHECK:STDOUT: %T.ref: = name_ref T, [template = ] // CHECK:STDOUT: %self.param: = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: = name_ref Self, [template = ] // CHECK:STDOUT: %self: = bind_name self, %self.param // CHECK:STDOUT: %n.param: = value_param runtime_param1 +// CHECK:STDOUT: %T.ref: = name_ref T, [template = ] // CHECK:STDOUT: %n: = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -107,7 +109,6 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %complete_type.loc14_1.2: = complete_type_witness @Class.%struct_type.a (%struct_type.a) [symbolic = %complete_type.loc14_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: %.loc12: @Class.%Class.elem (%Class.elem) = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { // CHECK:STDOUT: %self.patt: @F.%Class (%Class) = binding_pattern self @@ -115,12 +116,14 @@ fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDOUT: %n.patt: @F.%T (%T) = binding_pattern n // CHECK:STDOUT: %n.param_patt: @F.%T (%T) = value_param_pattern %n.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13 [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @F.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_14.2: type = splice_block %Self.ref [symbolic = %Class (constants.%Class)] { +// CHECK:STDOUT: %.loc13_14.1: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc13_14.1 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.%Class (%Class) = bind_name self, %self.param // CHECK:STDOUT: %n.param: @F.%T (%T) = value_param runtime_param1 +// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %n: @F.%T (%T) = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type.loc14_1.1: = complete_type_witness %struct_type.a [symbolic = %complete_type.loc14_1.2 (constants.%complete_type.1)] diff --git a/toolchain/check/testdata/class/fail_import_misuses.carbon b/toolchain/check/testdata/class/fail_import_misuses.carbon index 2ec2f5fb8e6d..48db94307c6a 100644 --- a/toolchain/check/testdata/class/fail_import_misuses.carbon +++ b/toolchain/check/testdata/class/fail_import_misuses.carbon @@ -111,7 +111,6 @@ var a: Incomplete; // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {} -// CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, imports.%import_ref.2 [template = constants.%Incomplete] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_incomplete.carbon b/toolchain/check/testdata/class/fail_incomplete.carbon index 982296f8646a..d08f14abfb73 100644 --- a/toolchain/check/testdata/class/fail_incomplete.carbon +++ b/toolchain/check/testdata/class/fail_incomplete.carbon @@ -242,7 +242,6 @@ class C { // CHECK:STDOUT: %Class.decl: type = class_decl @Class [template = constants.%Class] {} {} // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} // CHECK:STDOUT: %CallClassFunction.decl: %CallClassFunction.type = fn_decl @CallClassFunction [template = constants.%CallClassFunction] {} {} -// CHECK:STDOUT: %Class.ref: type = name_ref Class, %Class.decl [template = constants.%Class] // CHECK:STDOUT: %global_var.var: ref = var global_var // CHECK:STDOUT: %global_var: ref = bind_name global_var, %global_var.var // CHECK:STDOUT: %ConvertFromStruct.decl: %ConvertFromStruct.type = fn_decl @ConvertFromStruct [template = constants.%ConvertFromStruct] { @@ -259,11 +258,13 @@ class C { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.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: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc44: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -274,11 +275,13 @@ class C { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.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: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc55: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -289,10 +292,12 @@ class C { // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref.loc73_12: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %Class.ref.loc73_23: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc73: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref.loc73_12: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param1 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param @@ -301,17 +306,19 @@ class C { // CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref.loc77: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc77: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %TakeIncomplete.decl: %TakeIncomplete.type = fn_decl @TakeIncomplete [template = constants.%TakeIncomplete] { // CHECK:STDOUT: %c.patt: %Class = binding_pattern c // CHECK:STDOUT: %c.param_patt: %Class = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %ReturnIncomplete.decl: %ReturnIncomplete.type = fn_decl @ReturnIncomplete [template = constants.%ReturnIncomplete] { @@ -326,9 +333,11 @@ class C { // CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc92: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallReturnIncomplete.decl: %CallReturnIncomplete.type = fn_decl @CallReturnIncomplete [template = constants.%CallReturnIncomplete] {} {} @@ -337,9 +346,11 @@ class C { // CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc136: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -350,11 +361,13 @@ class C { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc133: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc133_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc133_24: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.3] @@ -406,7 +419,6 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @Let(%p.param_patt: %ptr.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref.loc85: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %p.ref: %ptr.1 = name_ref p, %p // CHECK:STDOUT: %.loc85: ref %Class = deref %p.ref // CHECK:STDOUT: %c: = bind_name c, @@ -473,7 +485,6 @@ class C { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc11: = field_decl c, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index f713a96dec8f..dde6a52bcda9 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -77,11 +77,7 @@ fn F() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// 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: %.loc12: %Class.elem = field_decl a, element0 [template] -// 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: %.loc13: %Class.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index b25bb19094bf..c154e1e5101e 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -79,20 +79,18 @@ fn F() { // CHECK:STDOUT: %p.patt: %ptr.1 = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr.1 = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// 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: %.loc12: %Class.elem = field_decl a, element0 [template] -// 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: %.loc13: %Class.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -107,13 +105,12 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref.loc25_10: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.var: ref %Class = var c // CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var // 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_33.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %Class.ref.loc25_38: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// 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.5, element0 [template = constants.%Convert.10] // 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] diff --git a/toolchain/check/testdata/class/fail_memaccess_category.carbon b/toolchain/check/testdata/class/fail_memaccess_category.carbon index 2fe95cf72eb7..c3158aae6a1f 100644 --- a/toolchain/check/testdata/class/fail_memaccess_category.carbon +++ b/toolchain/check/testdata/class/fail_memaccess_category.carbon @@ -79,12 +79,14 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %b.patt: %B = binding_pattern b // CHECK:STDOUT: %b.param_patt: %B = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %A} [template = constants.%struct_type.a.1] -// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %s.param: %struct_type.a.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19: type = splice_block %struct_type.a [template = constants.%struct_type.a.1] { +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %A} [template = constants.%struct_type.a.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %s: %struct_type.a.1 = bind_name s, %s.param // CHECK:STDOUT: %b.param: %B = value_param runtime_param1 +// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %b: %B = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -93,11 +95,13 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc12: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc12_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %ptr: type = ptr_type %A [template = constants.%ptr.1] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_20: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %ptr: type = ptr_type %A [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] @@ -109,7 +113,6 @@ fn F(s: {.a: A}, b: B) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %.loc16: %B.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.2] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_method.carbon b/toolchain/check/testdata/class/fail_method.carbon index ea19c923e1e0..63a7dcb57c4d 100644 --- a/toolchain/check/testdata/class/fail_method.carbon +++ b/toolchain/check/testdata/class/fail_method.carbon @@ -84,8 +84,8 @@ fn F(c: Class) { // CHECK:STDOUT: %c.patt: %Class = binding_pattern c // CHECK:STDOUT: %c.param_patt: %Class = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref.loc18: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Class.ref.loc18: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -96,8 +96,8 @@ fn F(c: Class) { // CHECK:STDOUT: %self.patt: %Class = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Class = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] diff --git a/toolchain/check/testdata/class/fail_method_modifiers.carbon b/toolchain/check/testdata/class/fail_method_modifiers.carbon index 15513e95bfdc..c74835a28bd1 100644 --- a/toolchain/check/testdata/class/fail_method_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_method_modifiers.carbon @@ -100,16 +100,16 @@ base class BaseClass { // CHECK:STDOUT: %self.patt: %FinalClass = binding_pattern self // CHECK:STDOUT: %self.param_patt: %FinalClass = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] // CHECK:STDOUT: %self.param: %FinalClass = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] // CHECK:STDOUT: %self: %FinalClass = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Virtual.decl: %Virtual.type = fn_decl @Virtual [template = constants.%Virtual] { // CHECK:STDOUT: %self.patt: %FinalClass = binding_pattern self // CHECK:STDOUT: %self.param_patt: %FinalClass = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] // CHECK:STDOUT: %self.param: %FinalClass = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FinalClass [template = constants.%FinalClass] // CHECK:STDOUT: %self: %FinalClass = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] @@ -126,16 +126,16 @@ base class BaseClass { // CHECK:STDOUT: %self.patt: %AbstractClass = binding_pattern self // CHECK:STDOUT: %self.param_patt: %AbstractClass = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] // CHECK:STDOUT: %self.param: %AbstractClass = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] // CHECK:STDOUT: %self: %AbstractClass = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Final.decl: %Final.type = fn_decl @Final [template = constants.%Final] { // CHECK:STDOUT: %self.patt: %AbstractClass = binding_pattern self // CHECK:STDOUT: %self.param_patt: %AbstractClass = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] // CHECK:STDOUT: %self.param: %AbstractClass = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%AbstractClass [template = constants.%AbstractClass] // CHECK:STDOUT: %self: %AbstractClass = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] @@ -152,8 +152,8 @@ base class BaseClass { // CHECK:STDOUT: %self.patt: %BaseClass = binding_pattern self // CHECK:STDOUT: %self.param_patt: %BaseClass = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%BaseClass [template = constants.%BaseClass] // CHECK:STDOUT: %self.param: %BaseClass = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%BaseClass [template = constants.%BaseClass] // CHECK:STDOUT: %self: %BaseClass = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] diff --git a/toolchain/check/testdata/class/fail_method_redefinition.carbon b/toolchain/check/testdata/class/fail_method_redefinition.carbon index 4336edc648cb..1e6fbaf8e2a4 100644 --- a/toolchain/check/testdata/class/fail_method_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_method_redefinition.carbon @@ -59,8 +59,5 @@ class Class { // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return -// CHECK:STDOUT: -// CHECK:STDOUT: !.loc19: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_redefinition.carbon b/toolchain/check/testdata/class/fail_redefinition.carbon index 35f2b6d4ebf0..edcb3e1fd4ac 100644 --- a/toolchain/check/testdata/class/fail_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_redefinition.carbon @@ -128,9 +128,6 @@ fn Class.I() {} // CHECK:STDOUT: fn @I.1() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return -// CHECK:STDOUT: -// CHECK:STDOUT: !.loc43: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @G.1(); diff --git a/toolchain/check/testdata/class/fail_self.carbon b/toolchain/check/testdata/class/fail_self.carbon index f811759befd3..3c642bb093f8 100644 --- a/toolchain/check/testdata/class/fail_self.carbon +++ b/toolchain/check/testdata/class/fail_self.carbon @@ -94,8 +94,8 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %self.patt: %Class = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Class = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc25: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.param.loc25: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc25: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc25: %Class = bind_name self, %self.param.loc25 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { @@ -111,8 +111,8 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %ws.patt: %WrongSelf = binding_pattern ws // CHECK:STDOUT: %ws.param_patt: %WrongSelf = value_param_pattern %ws.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %WrongSelf.ref: type = name_ref WrongSelf, file.%WrongSelf.decl [template = constants.%WrongSelf] // CHECK:STDOUT: %ws.param: %WrongSelf = value_param runtime_param0 +// CHECK:STDOUT: %WrongSelf.ref: type = name_ref WrongSelf, file.%WrongSelf.decl [template = constants.%WrongSelf] // CHECK:STDOUT: %ws: %WrongSelf = bind_name ws, %ws.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -122,8 +122,8 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %self.patt: %Class = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Class = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.param.loc16: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc16: %Class = bind_name self, %self.param.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { @@ -148,8 +148,8 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: %self.patt: %Class = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Class = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] @@ -167,7 +167,6 @@ fn CallWrongSelf(ws: WrongSelf) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return.param_patt: %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Self.ref.loc33: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.var: ref %Class = var self // CHECK:STDOUT: %self: ref %Class = bind_name self, %self.var // CHECK:STDOUT: %self.ref: ref %Class = name_ref self, %self diff --git a/toolchain/check/testdata/class/fail_self_param.carbon b/toolchain/check/testdata/class/fail_self_param.carbon index 9c63a698b3a0..1ef6924cf2f5 100644 --- a/toolchain/check/testdata/class/fail_self_param.carbon +++ b/toolchain/check/testdata/class/fail_self_param.carbon @@ -22,7 +22,6 @@ var v: C(0); // CHECK:STDOUT: %C.generic: %C.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,12 +42,10 @@ var v: C(0); // CHECK:STDOUT: %x.patt.loc14_22.1: = symbolic_binding_pattern x, 0 [symbolic = %x.patt.loc14_22.2 (constants.%x.patt)] // CHECK:STDOUT: %x.param_patt: = value_param_pattern %x.patt.loc14_22.1, runtime_param [symbolic = %x.patt.loc14_22.2 (constants.%x.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %self.ref: = name_ref self, [template = ] // CHECK:STDOUT: %x.param: = value_param runtime_param +// CHECK:STDOUT: %self.ref: = name_ref self, [template = ] // CHECK:STDOUT: %x: = bind_symbolic_name x, 0, %x.param [template = ] // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/fail_self_type_member.carbon b/toolchain/check/testdata/class/fail_self_type_member.carbon index ce7510e8cf3f..9db3b12b3df0 100644 --- a/toolchain/check/testdata/class/fail_self_type_member.carbon +++ b/toolchain/check/testdata/class/fail_self_type_member.carbon @@ -29,8 +29,6 @@ fn F() -> bool { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Class: type = class_type @Class [template] -// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %Class.elem: type = unbound_element_type %Class, bool [template] // CHECK:STDOUT: %struct_type.b: type = struct_type {.b: bool} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b [template] @@ -39,19 +37,14 @@ fn F() -> bool { // CHECK:STDOUT: file {} // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc12_10.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc12_10.2: type = converted %bool.make_type, %.loc12_10.1 [template = bool] -// CHECK:STDOUT: %.loc12_8: %Class.elem = field_decl b, element0 [template] +// CHECK:STDOUT: %.loc12: %Class.elem = field_decl b, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Class -// CHECK:STDOUT: .b = %.loc12_8 +// CHECK:STDOUT: .b = %.loc12 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() -> bool { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @F() -> bool; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_todo_local_class.carbon b/toolchain/check/testdata/class/fail_todo_local_class.carbon index 39c8fc2aa61c..7b246ca8fe42 100644 --- a/toolchain/check/testdata/class/fail_todo_local_class.carbon +++ b/toolchain/check/testdata/class/fail_todo_local_class.carbon @@ -48,7 +48,5 @@ class A { // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @F() { -// CHECK:STDOUT: !entry: -// CHECK:STDOUT: } +// CHECK:STDOUT: fn @F(); // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/fail_unbound_field.carbon b/toolchain/check/testdata/class/fail_unbound_field.carbon index 3c28b48a51fb..37f56bcf47ae 100644 --- a/toolchain/check/testdata/class/fail_unbound_field.carbon +++ b/toolchain/check/testdata/class/fail_unbound_field.carbon @@ -69,8 +69,6 @@ fn G() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// 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: %.loc12: %Class.elem = field_decl field, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern diff --git a/toolchain/check/testdata/class/fail_unknown_member.carbon b/toolchain/check/testdata/class/fail_unknown_member.carbon index f381b0f3297d..70ffa1b3537a 100644 --- a/toolchain/check/testdata/class/fail_unknown_member.carbon +++ b/toolchain/check/testdata/class/fail_unknown_member.carbon @@ -55,10 +55,10 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // 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: %c.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -66,8 +66,6 @@ fn G(c: Class) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// 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: %.loc12: %Class.elem = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/field_access.carbon b/toolchain/check/testdata/class/field_access.carbon index e237f048eebc..75379cfab9d3 100644 --- a/toolchain/check/testdata/class/field_access.carbon +++ b/toolchain/check/testdata/class/field_access.carbon @@ -67,11 +67,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// 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: %.loc12: %Class.elem = field_decl j, element0 [template] -// 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: %.loc13: %Class.elem = field_decl k, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -84,7 +80,6 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.var: ref %Class = var c // CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var // CHECK:STDOUT: %c.ref.loc18: ref %Class = name_ref c, %c @@ -107,8 +102,6 @@ fn Run() { // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc19_7: init %i32 = converted %int_2, %int.convert_checked.loc19 [template = constants.%int_2.2] // CHECK:STDOUT: assign %.loc19_4, %.loc19_7 -// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %cj.var: ref %i32 = var cj // CHECK:STDOUT: %cj: ref %i32 = bind_name cj, %cj.var // CHECK:STDOUT: %c.ref.loc20: ref %Class = name_ref c, %c @@ -116,8 +109,6 @@ fn Run() { // CHECK:STDOUT: %.loc20_18.1: ref %i32 = class_element_access %c.ref.loc20, element0 // CHECK:STDOUT: %.loc20_18.2: %i32 = bind_value %.loc20_18.1 // CHECK:STDOUT: assign %cj.var, %.loc20_18.2 -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ck.var: ref %i32 = var ck // CHECK:STDOUT: %ck: ref %i32 = bind_name ck, %ck.var // CHECK:STDOUT: %c.ref.loc21: ref %Class = name_ref c, %c diff --git a/toolchain/check/testdata/class/field_access_in_value.carbon b/toolchain/check/testdata/class/field_access_in_value.carbon index 748ddba84a38..8fef8721fe7e 100644 --- a/toolchain/check/testdata/class/field_access_in_value.carbon +++ b/toolchain/check/testdata/class/field_access_in_value.carbon @@ -68,11 +68,7 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// 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: %.loc12: %Class.elem = field_decl j, element0 [template] -// 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: %.loc13: %Class.elem = field_decl k, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.j.k [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -85,7 +81,6 @@ fn Test() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Test() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref.loc17: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %cv.var: ref %Class = var cv // CHECK:STDOUT: %cv: ref %Class = bind_name cv, %cv.var // CHECK:STDOUT: %cv.ref.loc18: ref %Class = name_ref cv, %cv @@ -108,12 +103,9 @@ fn Test() { // CHECK:STDOUT: %int.convert_checked.loc19: init %i32 = call %Convert.specific_fn.loc19(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc19_8: init %i32 = converted %int_2, %int.convert_checked.loc19 [template = constants.%int_2.2] // CHECK:STDOUT: assign %.loc19_5, %.loc19_8 -// CHECK:STDOUT: %Class.ref.loc20: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %cv.ref.loc20: ref %Class = name_ref cv, %cv // CHECK:STDOUT: %.loc20: %Class = bind_value %cv.ref.loc20 // CHECK:STDOUT: %c: %Class = bind_name c, %.loc20 -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %cj.var: ref %i32 = var cj // CHECK:STDOUT: %cj: ref %i32 = bind_name cj, %cj.var // CHECK:STDOUT: %c.ref.loc21: %Class = name_ref c, %c @@ -121,8 +113,6 @@ fn Test() { // CHECK:STDOUT: %.loc21_18.1: ref %i32 = class_element_access %c.ref.loc21, element0 // CHECK:STDOUT: %.loc21_18.2: %i32 = bind_value %.loc21_18.1 // CHECK:STDOUT: assign %cj.var, %.loc21_18.2 -// 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: %ck.var: ref %i32 = var ck // CHECK:STDOUT: %ck: ref %i32 = bind_name ck, %ck.var // CHECK:STDOUT: %c.ref.loc22: %Class = name_ref c, %c diff --git a/toolchain/check/testdata/class/forward_declared.carbon b/toolchain/check/testdata/class/forward_declared.carbon index 3a48a2227a03..2e732fd03fbc 100644 --- a/toolchain/check/testdata/class/forward_declared.carbon +++ b/toolchain/check/testdata/class/forward_declared.carbon @@ -42,11 +42,13 @@ fn F(p: Class*) -> Class* { return p; } // CHECK:STDOUT: %return.patt: %ptr = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref.loc13_9: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr.loc13_14: type = ptr_type %Class [template = constants.%ptr] // CHECK:STDOUT: %Class.ref.loc13_20: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %ptr.loc13_25: type = ptr_type %Class [template = constants.%ptr] // CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %ptr.loc13_14 [template = constants.%ptr] { +// CHECK:STDOUT: %Class.ref.loc13_9: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr.loc13_14: type = ptr_type %Class [template = constants.%ptr] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr = return_slot %return.param diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index fbd77d1ae767..e934762500d8 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -175,10 +175,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter] // 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: %a.param: %Adapter = value_param runtime_param0 +// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter] // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -197,7 +197,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)] // CHECK:STDOUT: %.loc5: @C.%C.elem (%C.elem.1) = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: @@ -312,10 +311,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, imports.%import_ref.2 [template = constants.%Adapter] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter = value_param runtime_param0 +// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, imports.%import_ref.2 [template = constants.%Adapter] // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -437,10 +436,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter] // 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: %a.param: %Adapter = value_param runtime_param0 +// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter] // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -459,7 +458,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_9.1 [symbolic = %T.loc4_9.2 (constants.%T)] // CHECK:STDOUT: %.loc5: @C.%C.elem (%C.elem.1) = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: @@ -572,7 +570,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %complete_type.loc9_1.2: = complete_type_witness @C.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc9_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_9.1 [symbolic = %T.loc7_9.2 (constants.%T)] // CHECK:STDOUT: %.loc8: @C.%C.elem (%C.elem.1) = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type.loc9_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc9_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: @@ -671,10 +668,10 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, imports.%import_ref.2 [template = constants.%Adapter] // 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: %a.param: %Adapter = value_param runtime_param0 +// CHECK:STDOUT: %Adapter.ref: type = name_ref Adapter, imports.%import_ref.2 [template = constants.%Adapter] // CHECK:STDOUT: %a: %Adapter = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -783,13 +780,15 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter.generic] -// CHECK:STDOUT: %int_32.loc8_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc8_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.2] // CHECK:STDOUT: %int_32.loc8_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc8_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8: type = splice_block %Adapter [template = constants.%Adapter.2] { +// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter.generic] +// CHECK:STDOUT: %int_32.loc8_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc8_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %Adapter.2 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -895,13 +894,15 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.generic] -// CHECK:STDOUT: %int_32.loc6_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.2] // CHECK:STDOUT: %int_32.loc6_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %Adapter.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %Adapter [template = constants.%Adapter.2] { +// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.generic] +// CHECK:STDOUT: %int_32.loc6_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %Adapter.2 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -913,12 +914,14 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.generic] -// CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%C) [template = constants.%Adapter.3] // 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: %a.param: %Adapter.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc14: type = splice_block %Adapter [template = constants.%Adapter.3] { +// CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.generic] +// CHECK:STDOUT: %C.ref.loc14: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%C) [template = constants.%Adapter.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %Adapter.3 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -941,8 +944,6 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// 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: %.loc11: %C.elem = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.5] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/base_is_generic.carbon b/toolchain/check/testdata/class/generic/base_is_generic.carbon index e73a3bf47288..e20aa461dc8b 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -146,10 +146,10 @@ fn H() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %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: %d.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -168,7 +168,6 @@ fn H() { // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Base.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_17.1 [symbolic = %T.loc4_17.2 (constants.%T)] // CHECK:STDOUT: %.loc5: @Base.%Base.elem (%Base.elem.1) = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: @@ -180,8 +179,6 @@ fn H() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Param { -// 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: %.loc9: %Param.elem = field_decl y, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -303,10 +300,10 @@ fn H() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, imports.%import_ref.3 [template = constants.%Derived] // 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: %d.param: %Derived = value_param runtime_param0 +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, imports.%import_ref.3 [template = constants.%Derived] // CHECK:STDOUT: %d: %Derived = bind_name d, %d.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -632,11 +629,9 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc13_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %int_32.loc13_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] // CHECK:STDOUT: %.loc13_22: %G.type.3 = specific_constant @X.%G.decl, @X(constants.%i32) [template = constants.%G.3] // CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc13_22 [template = constants.%G.3] @@ -832,11 +827,9 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc7_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.generic] -// CHECK:STDOUT: %int_32.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.2] // CHECK:STDOUT: %.loc7_22: %G.type.3 = specific_constant imports.%import_ref.10, @X(constants.%i32) [template = constants.%G.3] // CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc7_22 [template = constants.%G.3] diff --git a/toolchain/check/testdata/class/generic/basic.carbon b/toolchain/check/testdata/class/generic/basic.carbon index 8f57ad7b575e..40e22c404fa9 100644 --- a/toolchain/check/testdata/class/generic/basic.carbon +++ b/toolchain/check/testdata/class/generic/basic.carbon @@ -101,12 +101,14 @@ class Declaration(T:! type); // CHECK:STDOUT: %return.patt: @GetAddr.%ptr.loc12_38.1 (%ptr.2) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @GetAddr.%ptr.loc12_38.1 (%ptr.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_25: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc12_25 [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %ptr.loc12_29.2: type = ptr_type %Class [symbolic = %ptr.loc12_29.1 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ptr.loc12_38.2: type = ptr_type %T [symbolic = %ptr.loc12_38.1 (constants.%ptr.2)] // CHECK:STDOUT: %self.param: @GetAddr.%ptr.loc12_29.1 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_29: type = splice_block %ptr.loc12_29.2 [symbolic = %ptr.loc12_29.1 (constants.%ptr.1)] { +// CHECK:STDOUT: %.loc12_25: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc12_25 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %ptr.loc12_29.2: type = ptr_type %Class [symbolic = %ptr.loc12_29.1 (constants.%ptr.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @GetAddr.%ptr.loc12_29.1 (%ptr.1) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @GetAddr.%ptr.loc12_38.1 (%ptr.2) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @GetAddr.%ptr.loc12_38.1 (%ptr.2) = return_slot %return.param @@ -117,15 +119,16 @@ class Declaration(T:! type); // CHECK:STDOUT: %return.patt: @GetValue.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @GetValue.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc17 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @GetValue.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %.loc17_21.2: type = splice_block %Self.ref [symbolic = %Class (constants.%Class)] { +// CHECK:STDOUT: %.loc17_21.1: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc17_21.1 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @GetValue.%Class (%Class) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @GetValue.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @GetValue.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: %.loc21: @Class.%Class.elem (%Class.elem) = field_decl k, element0 [template] // CHECK:STDOUT: %complete_type.loc22_1.1: = complete_type_witness %struct_type.k [symbolic = %complete_type.loc22_1.2 (constants.%complete_type)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 377985bd09b0..ed8b1c7bba3f 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -101,18 +101,8 @@ class Outer(T:! type) { // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_5.1, %Convert.10 [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: %Class.2: type = class_type @Class, @Class(%ptr.1, %int_5.2) [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.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: %Class.3: type = class_type @Class, @Class(%empty_tuple.type, %int_0.2) [template] // CHECK:STDOUT: } @@ -140,38 +130,17 @@ class Outer(T:! type) { // CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { -// 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: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref.loc6: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] -// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr.1] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] -// CHECK:STDOUT: %impl.elem0.loc6: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5, %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_5) [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc6_21.1: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%int_5.2] -// CHECK:STDOUT: %.loc6_21.2: %i32 = converted %int_5, %.loc6_21.1 [template = constants.%int_5.2] -// CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%ptr.1, constants.%int_5.2) [template = constants.%Class.2] // CHECK:STDOUT: %a.var: ref %Class.2 = var a // CHECK:STDOUT: %a: ref %Class.2 = bind_name a, %a.var -// CHECK:STDOUT: %Class.ref.loc9: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %.loc9_15: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %.loc9_19.1: type = converted %.loc9_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %impl.elem0.loc9: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc9: = bound_method %int_0, %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_0) [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc9_19.2: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc9_19.3: %i32 = converted %int_0, %.loc9_19.2 [template = constants.%int_0.2] -// CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%empty_tuple.type, constants.%int_0.2) [template = constants.%Class.3] // CHECK:STDOUT: %b.var: ref %Class.3 = var b // CHECK:STDOUT: %b: ref %Class.3 = bind_name b, %b.var // CHECK:STDOUT: } @@ -232,7 +201,6 @@ class Outer(T:! type) { // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -256,17 +224,15 @@ class Outer(T:! type) { // CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { -// 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: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] -// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -309,9 +275,6 @@ class Outer(T:! type) { // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -335,19 +298,15 @@ class Outer(T:! type) { // CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { -// 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: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] -// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -390,8 +349,6 @@ class Outer(T:! type) { // CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T, %N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template] -// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -416,19 +373,15 @@ class Outer(T:! type) { // CHECK:STDOUT: %N.patt.loc4_23.1: %i32 = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_23.1, runtime_param [symbolic = %N.patt.loc4_23.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { -// 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: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc4_23.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_23.2 (constants.%N.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] -// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr] -// CHECK:STDOUT: %.loc15: type = converted %int_5, [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon index 25f7c6f0cf00..8f8f7759eb2f 100644 --- a/toolchain/check/testdata/class/generic/complete_in_conversion.carbon +++ b/toolchain/check/testdata/class/generic/complete_in_conversion.carbon @@ -48,10 +48,8 @@ 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.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.5: = interface_witness (%Convert.9) [template] // CHECK:STDOUT: %Convert.bound.1: = bound_method %N.2, %Convert.9 [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] @@ -104,12 +102,14 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc2_27.2: type = converted %int_literal.make_type, %.loc2_27.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc2_27.3: type = splice_block %.loc2_27.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc2_27.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc2_27.2: type = converted %int_literal.make_type, %.loc2_27.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -119,26 +119,30 @@ fn F(a: A(0)*) { // CHECK:STDOUT: %N.patt.loc6_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc6_9.1, runtime_param [symbolic = %N.patt.loc6_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32: type = class_type @Int.2, @Int.2(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc6: type = splice_block %i32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32: type = class_type @Int.2, @Int.2(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc6_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_9.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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.6, 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] -// CHECK:STDOUT: %.loc15_12.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] -// CHECK:STDOUT: %.loc15_12.2: %i32 = converted %int_0, %.loc15_12.1 [template = constants.%int_0.2] -// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%int_0.2) [template = constants.%A.2] -// CHECK:STDOUT: %ptr.loc15: type = ptr_type %A.2 [template = constants.%ptr.2] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// 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.6, 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] +// CHECK:STDOUT: %.loc15_12.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_0.2] +// CHECK:STDOUT: %.loc15_12.2: %i32 = converted %int_0, %.loc15_12.1 [template = constants.%int_0.2] +// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%int_0.2) [template = constants.%A.2] +// CHECK:STDOUT: %ptr: type = ptr_type %A.2 [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -158,10 +162,10 @@ 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.loc12_14.2: = bound_method %N.loc6_9.2, constants.%Convert.9 [symbolic = %Convert.bound.loc12_14.2 (constants.%Convert.bound.1)] -// CHECK:STDOUT: %Convert.specific_fn.loc12_14.2: = specific_function %Convert.bound.loc12_14.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc12_14.2 (constants.%Convert.specific_fn.1)] -// CHECK:STDOUT: %int.convert_checked.loc12_14.2: init Core.IntLiteral = call %Convert.specific_fn.loc12_14.2(%N.loc6_9.2) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %iN.builtin: type = int_type signed, %int.convert_checked.loc12_14.2 [symbolic = %iN.builtin (constants.%iN.builtin.2)] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.loc6_9.2, constants.%Convert.9 [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.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)] @@ -170,24 +174,13 @@ fn F(a: A(0)*) { // CHECK:STDOUT: class { // CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc7: @A.%A.elem.loc7 (%A.elem.1) = base_decl %B.ref, element0 [template] -// CHECK:STDOUT: %Int.ref: %Int.type.1 = name_ref Int, file.%Int.decl [template = constants.%Int.1] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc6_9.1 [symbolic = %N.loc6_9.2 (constants.%N.2)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] -// CHECK:STDOUT: %Convert.bound.loc12_14.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc12_14.2 (constants.%Convert.bound.1)] -// CHECK:STDOUT: %Convert.specific_fn.loc12_14.1: = specific_function %Convert.bound.loc12_14.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc12_14.2 (constants.%Convert.specific_fn.1)] -// CHECK:STDOUT: %int.convert_checked.loc12_14.1: init Core.IntLiteral = call %Convert.specific_fn.loc12_14.1(%N.ref) [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc12_14.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc12_14.2: Core.IntLiteral = converted %N.ref, %.loc12_14.1 [symbolic = %int.convert_checked.loc12_14.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_14.2) [symbolic = %iN.builtin (constants.%iN.builtin.2)] -// CHECK:STDOUT: %.loc12_15.1: type = value_of_initializer %int.make_type_signed [symbolic = %iN.builtin (constants.%iN.builtin.2)] -// CHECK:STDOUT: %.loc12_15.2: type = converted %int.make_type_signed, %.loc12_15.1 [symbolic = %iN.builtin (constants.%iN.builtin.2)] -// CHECK:STDOUT: %.loc12_8: @A.%A.elem.loc12 (%A.elem.2) = field_decl n, element1 [template] +// CHECK:STDOUT: %.loc12: @A.%A.elem.loc12 (%A.elem.2) = field_decl n, element1 [template] // CHECK:STDOUT: %complete_type.loc13_1.1: = complete_type_witness %struct_type.base.n [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.4)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%A.1 // CHECK:STDOUT: .base = %.loc7 -// CHECK:STDOUT: .n = %.loc12_8 +// CHECK:STDOUT: .n = %.loc12 // CHECK:STDOUT: extend %B.ref // CHECK:STDOUT: complete_type_witness = %complete_type.loc13_1.1 // CHECK:STDOUT: } @@ -197,8 +190,6 @@ fn F(a: A(0)*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %ptr.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %ptr.loc19: type = ptr_type %B [template = constants.%ptr.3] // CHECK:STDOUT: %a.ref: %ptr.2 = name_ref a, %a // CHECK:STDOUT: %.loc19_16.1: ref %A.2 = deref %a.ref // CHECK:STDOUT: %.loc19_16.2: ref %B = class_element_access %.loc19_16.1, element0 @@ -222,9 +213,9 @@ fn F(a: A(0)*) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %A => constants.%A.2 // CHECK:STDOUT: %A.elem.loc7 => constants.%A.elem.3 -// CHECK:STDOUT: %Convert.bound.loc12_14.2 => constants.%Convert.bound.3 -// CHECK:STDOUT: %Convert.specific_fn.loc12_14.2 => constants.%Convert.specific_fn.3 -// CHECK:STDOUT: %int.convert_checked.loc12_14.2 => constants.%int_0.1 +// CHECK:STDOUT: %Convert.bound => constants.%Convert.bound.3 +// CHECK:STDOUT: %Convert.specific_fn => constants.%Convert.specific_fn.3 +// CHECK:STDOUT: %int.convert_checked => constants.%int_0.1 // CHECK:STDOUT: %iN.builtin => // CHECK:STDOUT: %require_complete => // CHECK:STDOUT: %A.elem.loc12 => diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index 8bf84d3bab36..95a9889dc701 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -91,13 +91,15 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %int_32.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] // CHECK:STDOUT: %int_32.loc15_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc15_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc15: type = splice_block %Class [template = constants.%Class.2] { +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %Class.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -110,13 +112,15 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %return.patt: @G.%T.loc19_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @G.%T.loc19_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %T.ref.loc19_25: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc19_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_26.2 (constants.%Class.1)] // CHECK:STDOUT: %T.ref.loc19_32: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc19_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_6.2 (constants.%T)] // CHECK:STDOUT: %c.param: @G.%Class.loc19_26.2 (%Class.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc19: type = splice_block %Class.loc19_26.1 [symbolic = %Class.loc19_26.2 (constants.%Class.1)] { +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %T.ref.loc19_25: type = name_ref T, %T.loc19_6.1 [symbolic = %T.loc19_6.2 (constants.%T)] +// CHECK:STDOUT: %Class.loc19_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_26.2 (constants.%Class.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: @G.%Class.loc19_26.2 (%Class.1) = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref @G.%T.loc19_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @G.%T.loc19_6.2 (%T) = return_slot %return.param @@ -129,13 +133,15 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %return.patt: @H.%U.loc23_6.2 (%U) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @H.%U.loc23_6.2 (%U) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %U.ref.loc23_25: type = name_ref U, %U.loc23_6.1 [symbolic = %U.loc23_6.2 (constants.%U)] -// CHECK:STDOUT: %Class.loc23_26.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc23_26.2 (constants.%Class.3)] // CHECK:STDOUT: %U.ref.loc23_32: type = name_ref U, %U.loc23_6.1 [symbolic = %U.loc23_6.2 (constants.%U)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc23_6.1: type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc23_6.2 (constants.%U)] // CHECK:STDOUT: %c.param: @H.%Class.loc23_26.2 (%Class.3) = value_param runtime_param0 +// CHECK:STDOUT: %.loc23: type = splice_block %Class.loc23_26.1 [symbolic = %Class.loc23_26.2 (constants.%Class.3)] { +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %U.ref.loc23_25: type = name_ref U, %U.loc23_6.1 [symbolic = %U.loc23_6.2 (constants.%U)] +// CHECK:STDOUT: %Class.loc23_26.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc23_26.2 (constants.%Class.3)] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: @H.%Class.loc23_26.2 (%Class.3) = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref @H.%U.loc23_6.2 (%U) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @H.%U.loc23_6.2 (%U) = return_slot %return.param @@ -154,7 +160,6 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %complete_type.loc13_1.2: = complete_type_witness @Class.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: %.loc12: @Class.%Class.elem (%Class.elem.1) = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type.loc13_1.1: = complete_type_witness %struct_type.x.1 [symbolic = %complete_type.loc13_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 42a27cb9d555..9f8180f539d0 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -176,8 +176,6 @@ class Class(U:! type) { // CHECK:STDOUT: %F: @CompleteClass.%F.type (%F.type.1) = struct_value () [symbolic = %F (constants.%F.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// 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: %.loc7: @CompleteClass.%CompleteClass.elem (%CompleteClass.elem) = field_decl n, element0 [template] // CHECK:STDOUT: %F.decl: @CompleteClass.%F.type (%F.type.1) = fn_decl @F.1 [symbolic = @CompleteClass.%F (constants.%F.1)] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern @@ -337,7 +335,6 @@ class Class(U:! type) { // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Class.%struct_type.x (%struct_type.x) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.3)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4 [symbolic = %T.1 (constants.%T)] // CHECK:STDOUT: %.loc5: @Class.%Class.elem (%Class.elem) = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.x [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.3)] // CHECK:STDOUT: @@ -480,8 +477,8 @@ class Class(U:! type) { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -489,8 +486,8 @@ class Class(U:! type) { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -517,10 +514,6 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @UseMethod() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] // CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v // CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc6: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] @@ -547,10 +540,6 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @UseField() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.2] // CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v // CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] @@ -674,11 +663,6 @@ class Class(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Use() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.generic] -// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr.1] -// CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%ptr.1) [template = constants.%CompleteClass.2] // CHECK:STDOUT: %v.var: ref %CompleteClass.2 = var v // CHECK:STDOUT: %v: ref %CompleteClass.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] @@ -791,7 +775,6 @@ class Class(U:! type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: = name_ref T, [template = ] // CHECK:STDOUT: %.loc16: = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness [template = ] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index bbe942e6c128..58b33b621e74 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -100,11 +100,11 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.patt: @InitFromStructGeneric.%T.loc8_26.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @InitFromStructGeneric.%T.loc8_26.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_39: type = name_ref T, %T.loc8_26.1 [symbolic = %T.loc8_26.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc8_45: type = name_ref T, %T.loc8_26.1 [symbolic = %T.loc8_26.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_26.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_26.2 (constants.%T)] // CHECK:STDOUT: %x.param: @InitFromStructGeneric.%T.loc8_26.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc8_39: type = name_ref T, %T.loc8_26.1 [symbolic = %T.loc8_26.2 (constants.%T)] // CHECK:STDOUT: %x: @InitFromStructGeneric.%T.loc8_26.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @InitFromStructGeneric.%T.loc8_26.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @InitFromStructGeneric.%T.loc8_26.2 (%T) = return_slot %return.param @@ -115,11 +115,13 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc13_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13_38: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %i32.loc13_30 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %i32 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -138,7 +140,6 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Class.%struct_type.k (%struct_type.k.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %.loc5: @Class.%Class.elem (%Class.elem.1) = field_decl k, element0 [template] // CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.k.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: @@ -155,26 +156,23 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %require_complete.loc8: = require_complete_type @InitFromStructGeneric.%T.loc8_26.2 (%T) [symbolic = %require_complete.loc8 (constants.%require_complete.1)] -// CHECK:STDOUT: %Class.loc9_17.2: type = class_type @Class, @Class(%T.loc8_26.2) [symbolic = %Class.loc9_17.2 (constants.%Class.1)] -// CHECK:STDOUT: %require_complete.loc9: = require_complete_type @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) [symbolic = %require_complete.loc9 (constants.%require_complete.2)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T.loc8_26.2) [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %require_complete.loc9: = require_complete_type @InitFromStructGeneric.%Class (%Class.1) [symbolic = %require_complete.loc9 (constants.%require_complete.2)] // CHECK:STDOUT: %struct_type.k: type = struct_type {.k: @InitFromStructGeneric.%T.loc8_26.2 (%T)} [symbolic = %struct_type.k (constants.%struct_type.k.1)] -// CHECK:STDOUT: %Class.elem: type = unbound_element_type @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1), @InitFromStructGeneric.%T.loc8_26.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] +// CHECK:STDOUT: %Class.elem: type = unbound_element_type @InitFromStructGeneric.%Class (%Class.1), @InitFromStructGeneric.%T.loc8_26.2 (%T) [symbolic = %Class.elem (constants.%Class.elem.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @InitFromStructGeneric.%T.loc8_26.2 (%T)) -> @InitFromStructGeneric.%T.loc8_26.2 (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc8_26.1 [symbolic = %T.loc8_26.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc9_17.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc9_17.2 (constants.%Class.1)] -// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = var v -// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = bind_name v, %v.var +// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class (%Class.1) = var v +// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class (%Class.1) = bind_name v, %v.var // CHECK:STDOUT: %x.ref: @InitFromStructGeneric.%T.loc8_26.2 (%T) = name_ref x, %x // CHECK:STDOUT: %.loc9_28.1: @InitFromStructGeneric.%struct_type.k (%struct_type.k.1) = struct_literal (%x.ref) // CHECK:STDOUT: %.loc9_28.2: ref @InitFromStructGeneric.%T.loc8_26.2 (%T) = class_element_access %v.var, element0 // CHECK:STDOUT: %.loc9_28.3: init @InitFromStructGeneric.%T.loc8_26.2 (%T) = initialize_from %x.ref to %.loc9_28.2 -// CHECK:STDOUT: %.loc9_28.4: init @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = class_init (%.loc9_28.3), %v.var -// CHECK:STDOUT: %.loc9_29: init @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = converted %.loc9_28.1, %.loc9_28.4 +// CHECK:STDOUT: %.loc9_28.4: init @InitFromStructGeneric.%Class (%Class.1) = class_init (%.loc9_28.3), %v.var +// CHECK:STDOUT: %.loc9_29: init @InitFromStructGeneric.%Class (%Class.1) = converted %.loc9_28.1, %.loc9_28.4 // CHECK:STDOUT: assign %v.var, %.loc9_29 -// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.1) = name_ref v, %v +// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class (%Class.1) = name_ref v, %v // CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%Class.elem (%Class.elem.1) = name_ref k, @Class.%.loc5 [template = @Class.%.loc5] // CHECK:STDOUT: %.loc10_11.1: ref @InitFromStructGeneric.%T.loc8_26.2 (%T) = class_element_access %v.ref, element0 // CHECK:STDOUT: %.loc10_11.2: @InitFromStructGeneric.%T.loc8_26.2 (%T) = bind_value %.loc10_11.1 @@ -184,10 +182,6 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @InitFromStructSpecific(%x.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// 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: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] // CHECK:STDOUT: %v.var: ref %Class.2 = var v // CHECK:STDOUT: %v: ref %Class.2 = bind_name v, %v.var // CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x @@ -291,11 +285,11 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.patt: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_40: type = name_ref T, %T.loc8_27.1 [symbolic = %T.loc8_27.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc8_46: type = name_ref T, %T.loc8_27.1 [symbolic = %T.loc8_27.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_27.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_27.2 (constants.%T)] // CHECK:STDOUT: %x.param: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc8_40: type = name_ref T, %T.loc8_27.1 [symbolic = %T.loc8_27.2 (constants.%T)] // CHECK:STDOUT: %x: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = return_slot %return.param @@ -306,11 +300,13 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc12_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc12_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %i32.loc12_31 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc12_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc12_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %i32 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index b723c18aab9f..b55fb156dbb5 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -123,13 +123,15 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %int_32.loc10_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] // CHECK:STDOUT: %int_32.loc10_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc10_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc10: type = splice_block %Class [template = constants.%Class.2] { +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32.loc10_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc10_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %Class.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -140,13 +142,15 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %int_32.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] // CHECK:STDOUT: %int_32.loc14_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc14_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc14: type = splice_block %Class [template = constants.%Class.2] { +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc14_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %Class.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -157,14 +161,16 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %int_32.loc18_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] -// CHECK:STDOUT: %ptr: type = ptr_type %Class.2 [template = constants.%ptr.5] // CHECK:STDOUT: %int_32.loc18_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc18_38: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %p.param: %ptr.5 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18: type = splice_block %ptr [template = constants.%ptr.5] { +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %int_32.loc18_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc18_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.2] +// CHECK:STDOUT: %ptr: type = ptr_type %Class.2 [template = constants.%ptr.5] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.5 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -187,7 +193,6 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %complete_type.loc8_1.2: = complete_type_witness @Class.%struct_type.x (%struct_type.x.1) [symbolic = %complete_type.loc8_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc2_13.1 [symbolic = %T.loc2_13.2 (constants.%T)] // CHECK:STDOUT: %.loc3: @Class.%Class.elem (%Class.elem.1) = field_decl x, element0 [template] // CHECK:STDOUT: %Get.decl: @Class.%Get.type (%Get.type.1) = fn_decl @Get [symbolic = @Class.%Get (constants.%Get.1)] { // CHECK:STDOUT: %self.patt: @Get.%Class (%Class.1) = binding_pattern self @@ -195,10 +200,12 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %return.patt: @Get.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Get.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_16: type = specific_constant constants.%Class.1, @Class(constants.%T) [symbolic = %Class (constants.%Class.1)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc5_16 [symbolic = %Class (constants.%Class.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc2_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @Get.%Class (%Class.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_16.2: type = splice_block %Self.ref [symbolic = %Class (constants.%Class.1)] { +// CHECK:STDOUT: %.loc5_16.1: type = specific_constant constants.%Class.1, @Class(constants.%T) [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc5_16.1 [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @Get.%Class (%Class.1) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Get.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Get.%T (%T) = return_slot %return.param @@ -210,12 +217,14 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %return.patt: @GetAddr.%ptr.loc7_38.1 (%ptr.2) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @GetAddr.%ptr.loc7_38.1 (%ptr.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_25: type = specific_constant constants.%Class.1, @Class(constants.%T) [symbolic = %Class (constants.%Class.1)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc7_25 [symbolic = %Class (constants.%Class.1)] -// CHECK:STDOUT: %ptr.loc7_29.2: type = ptr_type %Class.1 [symbolic = %ptr.loc7_29.1 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc2_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %ptr.loc7_38.2: type = ptr_type %T [symbolic = %ptr.loc7_38.1 (constants.%ptr.2)] // CHECK:STDOUT: %self.param: @GetAddr.%ptr.loc7_29.1 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_29: type = splice_block %ptr.loc7_29.2 [symbolic = %ptr.loc7_29.1 (constants.%ptr.1)] { +// CHECK:STDOUT: %.loc7_25: type = specific_constant constants.%Class.1, @Class(constants.%T) [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc7_25 [symbolic = %Class (constants.%Class.1)] +// CHECK:STDOUT: %ptr.loc7_29.2: type = ptr_type %Class.1 [symbolic = %ptr.loc7_29.1 (constants.%ptr.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @GetAddr.%ptr.loc7_29.1 (%ptr.1) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @GetAddr.%ptr.loc7_38.1 (%ptr.2) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @GetAddr.%ptr.loc7_38.1 (%ptr.2) = return_slot %return.param diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index daa2d24f0400..b1e789b9d645 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -101,9 +101,9 @@ class C(T:! type) { // CHECK:STDOUT: %return.patt: @F.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.ref.loc5_17: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %n.param: @F.%T (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %n: @F.%T (%T) = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref @F.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T (%T) = return_slot %return.param @@ -114,15 +114,16 @@ class C(T:! type) { // CHECK:STDOUT: %return.patt: @G.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @G.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc9 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @G.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_14.2: type = splice_block %Self.ref [symbolic = %Class (constants.%Class)] { +// CHECK:STDOUT: %.loc9_14.1: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc9_14.1 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @G.%Class (%Class) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @G.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @G.%T (%T) = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %.loc13: @Class.%Class.elem (%Class.elem) = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type.loc14_1.1: = complete_type_witness %struct_type.n [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] // CHECK:STDOUT: @@ -246,15 +247,13 @@ class C(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %F.decl: @C.%F.type (%F.type) = fn_decl @F [symbolic = @C.%F (constants.%F)] {} {} -// CHECK:STDOUT: %.loc11_14.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc11_11: @C.%C.elem (%C.elem) = field_decl data, element0 [template] +// CHECK:STDOUT: %.loc11: @C.%C.elem (%C.elem) = field_decl data, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.data [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C // CHECK:STDOUT: .F = %F.decl -// CHECK:STDOUT: .data = %.loc11_11 +// CHECK:STDOUT: .data = %.loc11 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -267,7 +266,7 @@ class C(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %data.ref: @F.%C.elem (%C.elem) = name_ref data, @C.%.loc11_11 [template = @C.%.loc11_11] +// CHECK:STDOUT: %data.ref: @F.%C.elem (%C.elem) = name_ref data, @C.%.loc11 [template = @C.%.loc11] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/member_lookup.carbon b/toolchain/check/testdata/class/generic/member_lookup.carbon index 4fdc4a954708..71a799cc4643 100644 --- a/toolchain/check/testdata/class/generic/member_lookup.carbon +++ b/toolchain/check/testdata/class/generic/member_lookup.carbon @@ -151,13 +151,15 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.patt: @AccessDerived.%T.loc13_18.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @AccessDerived.%T.loc13_18.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] -// CHECK:STDOUT: %T.ref.loc13_39: type = name_ref T, %T.loc13_18.1 [symbolic = %T.loc13_18.2 (constants.%T)] -// CHECK:STDOUT: %Derived.loc13_40.1: type = class_type @Derived, @Derived(constants.%T) [symbolic = %Derived.loc13_40.2 (constants.%Derived.1)] // CHECK:STDOUT: %T.ref.loc13_46: type = name_ref T, %T.loc13_18.1 [symbolic = %T.loc13_18.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc13_18.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_18.2 (constants.%T)] // CHECK:STDOUT: %x.param: @AccessDerived.%Derived.loc13_40.2 (%Derived.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %Derived.loc13_40.1 [symbolic = %Derived.loc13_40.2 (constants.%Derived.1)] { +// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] +// CHECK:STDOUT: %T.ref.loc13_39: type = name_ref T, %T.loc13_18.1 [symbolic = %T.loc13_18.2 (constants.%T)] +// CHECK:STDOUT: %Derived.loc13_40.1: type = class_type @Derived, @Derived(constants.%T) [symbolic = %Derived.loc13_40.2 (constants.%Derived.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @AccessDerived.%Derived.loc13_40.2 (%Derived.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @AccessDerived.%T.loc13_18.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @AccessDerived.%T.loc13_18.2 (%T) = return_slot %return.param @@ -170,13 +172,15 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.patt: @AccessBase.%T.loc17_15.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @AccessBase.%T.loc17_15.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] -// CHECK:STDOUT: %T.ref.loc17_36: type = name_ref T, %T.loc17_15.1 [symbolic = %T.loc17_15.2 (constants.%T)] -// CHECK:STDOUT: %Derived.loc17_37.1: type = class_type @Derived, @Derived(constants.%T) [symbolic = %Derived.loc17_37.2 (constants.%Derived.1)] // CHECK:STDOUT: %T.ref.loc17_43: type = name_ref T, %T.loc17_15.1 [symbolic = %T.loc17_15.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc17_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc17_15.2 (constants.%T)] // CHECK:STDOUT: %x.param: @AccessBase.%Derived.loc17_37.2 (%Derived.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc17: type = splice_block %Derived.loc17_37.1 [symbolic = %Derived.loc17_37.2 (constants.%Derived.1)] { +// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] +// CHECK:STDOUT: %T.ref.loc17_36: type = name_ref T, %T.loc17_15.1 [symbolic = %T.loc17_15.2 (constants.%T)] +// CHECK:STDOUT: %Derived.loc17_37.1: type = class_type @Derived, @Derived(constants.%T) [symbolic = %Derived.loc17_37.2 (constants.%Derived.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @AccessBase.%Derived.loc17_37.2 (%Derived.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @AccessBase.%T.loc17_15.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @AccessBase.%T.loc17_15.2 (%T) = return_slot %return.param @@ -187,13 +191,15 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] -// CHECK:STDOUT: %int_32.loc21_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Derived: type = class_type @Derived, @Derived(constants.%i32) [template = constants.%Derived.2] // CHECK:STDOUT: %int_32.loc21_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc21_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %Derived.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21: type = splice_block %Derived [template = constants.%Derived.2] { +// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] +// CHECK:STDOUT: %int_32.loc21_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc21_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Derived: type = class_type @Derived, @Derived(constants.%i32) [template = constants.%Derived.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %Derived.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -212,7 +218,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Base.%struct_type.b (%struct_type.b.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_17.1 [symbolic = %T.loc4_17.2 (constants.%T)] // CHECK:STDOUT: %.loc5: @Base.%Base.elem (%Base.elem.1) = field_decl b, element0 [template] // CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.b.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: @@ -239,10 +244,9 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.ref: %Base.type = name_ref Base, file.%Base.decl [template = constants.%Base.generic] -// CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: %Base.loc9_22.1: type = class_type @Base, @Base(constants.%T) [symbolic = %Base.loc9_22.2 (constants.%Base.1)] // CHECK:STDOUT: %.loc9: @Derived.%Derived.elem.loc9 (%Derived.elem.1) = base_decl %Base.loc9_22.1, element0 [template] -// CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: %.loc10: @Derived.%Derived.elem.loc10 (%Derived.elem.2) = field_decl d, element1 [template] // CHECK:STDOUT: %complete_type.loc11_1.1: = complete_type_witness %struct_type.base.d.1 [symbolic = %complete_type.loc11_1.2 (constants.%complete_type.2)] // CHECK:STDOUT: @@ -470,13 +474,15 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.patt: @AccessMissingBase.%T.loc13_22.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @AccessMissingBase.%T.loc13_22.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Base.ref: %Base.type = name_ref Base, file.%Base.decl [template = constants.%Base.generic] -// CHECK:STDOUT: %T.ref.loc13_40: type = name_ref T, %T.loc13_22.1 [symbolic = %T.loc13_22.2 (constants.%T)] -// CHECK:STDOUT: %Base.loc13_41.1: type = class_type @Base, @Base(constants.%T) [symbolic = %Base.loc13_41.2 (constants.%Base.1)] // CHECK:STDOUT: %T.ref.loc13_47: type = name_ref T, %T.loc13_22.1 [symbolic = %T.loc13_22.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc13_22.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_22.2 (constants.%T)] // CHECK:STDOUT: %x.param: @AccessMissingBase.%Base.loc13_41.2 (%Base.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %Base.loc13_41.1 [symbolic = %Base.loc13_41.2 (constants.%Base.1)] { +// CHECK:STDOUT: %Base.ref: %Base.type = name_ref Base, file.%Base.decl [template = constants.%Base.generic] +// CHECK:STDOUT: %T.ref.loc13_40: type = name_ref T, %T.loc13_22.1 [symbolic = %T.loc13_22.2 (constants.%T)] +// CHECK:STDOUT: %Base.loc13_41.1: type = class_type @Base, @Base(constants.%T) [symbolic = %Base.loc13_41.2 (constants.%Base.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @AccessMissingBase.%Base.loc13_41.2 (%Base.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @AccessMissingBase.%T.loc13_22.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @AccessMissingBase.%T.loc13_22.2 (%T) = return_slot %return.param @@ -489,13 +495,15 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.patt: @AccessMissingDerived.%T.loc21_25.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @AccessMissingDerived.%T.loc21_25.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] -// CHECK:STDOUT: %T.ref.loc21_46: type = name_ref T, %T.loc21_25.1 [symbolic = %T.loc21_25.2 (constants.%T)] -// CHECK:STDOUT: %Derived.loc21_47.1: type = class_type @Derived, @Derived(constants.%T) [symbolic = %Derived.loc21_47.2 (constants.%Derived.1)] // CHECK:STDOUT: %T.ref.loc21_53: type = name_ref T, %T.loc21_25.1 [symbolic = %T.loc21_25.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc21_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc21_25.2 (constants.%T)] // CHECK:STDOUT: %x.param: @AccessMissingDerived.%Derived.loc21_47.2 (%Derived.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc21: type = splice_block %Derived.loc21_47.1 [symbolic = %Derived.loc21_47.2 (constants.%Derived.1)] { +// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] +// CHECK:STDOUT: %T.ref.loc21_46: type = name_ref T, %T.loc21_25.1 [symbolic = %T.loc21_25.2 (constants.%T)] +// CHECK:STDOUT: %Derived.loc21_47.1: type = class_type @Derived, @Derived(constants.%T) [symbolic = %Derived.loc21_47.2 (constants.%Derived.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @AccessMissingDerived.%Derived.loc21_47.2 (%Derived.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @AccessMissingDerived.%T.loc21_25.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @AccessMissingDerived.%T.loc21_25.2 (%T) = return_slot %return.param @@ -506,13 +514,15 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] -// CHECK:STDOUT: %int_32.loc29_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc29_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Derived: type = class_type @Derived, @Derived(constants.%i32) [template = constants.%Derived.2] // CHECK:STDOUT: %int_32.loc29_46: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc29_46: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.param: %Derived.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc29: type = splice_block %Derived [template = constants.%Derived.2] { +// CHECK:STDOUT: %Derived.ref: %Derived.type = name_ref Derived, file.%Derived.decl [template = constants.%Derived.generic] +// CHECK:STDOUT: %int_32.loc29_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc29_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Derived: type = class_type @Derived, @Derived(constants.%i32) [template = constants.%Derived.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %Derived.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -531,7 +541,6 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: %complete_type.loc6_1.2: = complete_type_witness @Base.%struct_type.b (%struct_type.b.1) [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_17.1 [symbolic = %T.loc4_17.2 (constants.%T)] // CHECK:STDOUT: %.loc5: @Base.%Base.elem (%Base.elem.1) = field_decl b, element0 [template] // CHECK:STDOUT: %complete_type.loc6_1.1: = complete_type_witness %struct_type.b.1 [symbolic = %complete_type.loc6_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: @@ -558,10 +567,9 @@ fn AccessMissingConcrete(x: Derived(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Base.ref: %Base.type = name_ref Base, file.%Base.decl [template = constants.%Base.generic] -// CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T)] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: %Base.loc9_22.1: type = class_type @Base, @Base(constants.%T) [symbolic = %Base.loc9_22.2 (constants.%Base.1)] // CHECK:STDOUT: %.loc9: @Derived.%Derived.elem.loc9 (%Derived.elem.1) = base_decl %Base.loc9_22.1, element0 [template] -// CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.loc8_15.1 [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: %.loc10: @Derived.%Derived.elem.loc10 (%Derived.elem.2) = field_decl d, element1 [template] // CHECK:STDOUT: %complete_type.loc11_1.1: = complete_type_witness %struct_type.base.d.1 [symbolic = %complete_type.loc11_1.2 (constants.%complete_type.2)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index a0b5b0400905..d00cadf435ba 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -152,9 +152,9 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] -// CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc10_31: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %n.param.loc10: %T = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %n.loc10: %T = bind_name n, %n.param.loc10 // CHECK:STDOUT: %return.param.loc10: ref %T = out_param runtime_param1 // CHECK:STDOUT: %return.loc10: ref %T = return_slot %return.param.loc10 @@ -167,10 +167,12 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc14: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] -// CHECK:STDOUT: %.loc14: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = constants.%Class] -// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14 [symbolic = constants.%Class] // CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc14 [symbolic = constants.%T] // CHECK:STDOUT: %self.param.loc14: %Class = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_28.2: type = splice_block %Self.ref.loc14 [symbolic = constants.%Class] { +// CHECK:STDOUT: %.loc14_28.1: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = constants.%Class] +// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14_28.1 [symbolic = constants.%Class] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc14: %Class = bind_name self, %self.param.loc14 // CHECK:STDOUT: %return.param.loc14: ref %T = out_param runtime_param1 // CHECK:STDOUT: %return.loc14: ref %T = return_slot %return.param.loc14 @@ -199,9 +201,9 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %return.patt: %T = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %T = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T.loc5 (constants.%T)] // CHECK:STDOUT: %T.ref.loc5_17: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T.loc5 (constants.%T)] // CHECK:STDOUT: %n.param.loc5: @F.%T.loc5 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc5_11: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T.loc5 (constants.%T)] // CHECK:STDOUT: %n.loc5: @F.%T.loc5 (%T) = bind_name n, %n.param.loc5 // CHECK:STDOUT: %return.param.loc5: ref @F.%T.loc5 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return.loc5: ref @F.%T.loc5 (%T) = return_slot %return.param.loc5 @@ -212,15 +214,16 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %return.patt: %T = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %T = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, %.loc6 [symbolic = %Class (constants.%Class)] // CHECK:STDOUT: %T.ref.loc6: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T.loc6 (constants.%T)] // CHECK:STDOUT: %self.param.loc6: @G.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_14.2: type = splice_block %Self.ref.loc6 [symbolic = %Class (constants.%Class)] { +// CHECK:STDOUT: %.loc6_14.1: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, %.loc6_14.1 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc6: @G.%Class (%Class) = bind_name self, %self.param.loc6 // CHECK:STDOUT: %return.param.loc6: ref @G.%T.loc6 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return.loc6: ref @G.%T.loc6 (%T) = return_slot %return.param.loc6 // CHECK:STDOUT: } -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %.loc7: @Class.%Class.elem (%Class.elem) = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type.loc8_1.1: = complete_type_witness %struct_type.n [symbolic = %complete_type.loc8_1.2 (constants.%complete_type)] // CHECK:STDOUT: @@ -343,15 +346,17 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] -// CHECK:STDOUT: %T.ref.loc10_22: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %N.param: %T = value_param runtime_param +// CHECK:STDOUT: %T.ref.loc10_22: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %N.loc10: %T = bind_symbolic_name N, 1, %N.param [symbolic = constants.%N] -// CHECK:STDOUT: %.loc10: type = specific_constant constants.%B, @B(constants.%T, constants.%N) [symbolic = constants.%B] -// CHECK:STDOUT: %Self.ref.loc10: type = name_ref Self, %.loc10 [symbolic = constants.%B] -// CHECK:STDOUT: %T.ref.loc10_42: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %self.param.loc10: %B = value_param runtime_param0 +// CHECK:STDOUT: %.loc10_33.2: type = splice_block %Self.ref.loc10 [symbolic = constants.%B] { +// CHECK:STDOUT: %.loc10_33.1: type = specific_constant constants.%B, @B(constants.%T, constants.%N) [symbolic = constants.%B] +// CHECK:STDOUT: %Self.ref.loc10: type = name_ref Self, %.loc10_33.1 [symbolic = constants.%B] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc10: %B = bind_name self, %self.param.loc10 // CHECK:STDOUT: %a.param.loc10: %T = value_param runtime_param1 +// CHECK:STDOUT: %T.ref.loc10_42: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %a.loc10: %T = bind_name a, %a.param.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -369,8 +374,8 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %N.patt.loc5_11.1: @B.%T (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc5_11.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: @B.%T (%T) = value_param_pattern %N.patt.loc5_11.1, runtime_param [symbolic = %N.patt.loc5_11.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc4_9.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.param: @B.%T (%T) = value_param runtime_param +// CHECK:STDOUT: %T.ref: type = name_ref T, @A.%T.loc4_9.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %N.loc5_11.1: @B.%T (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc5_11.2 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] @@ -398,12 +403,14 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %a.patt: %T = binding_pattern a // CHECK:STDOUT: %a.param_patt: %T = value_param_pattern %a.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6: type = specific_constant constants.%B, @B(constants.%T, constants.%N) [symbolic = %B (constants.%B)] -// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, %.loc6 [symbolic = %B (constants.%B)] -// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, @A.%T.loc4_9.1 [symbolic = %T.loc6 (constants.%T)] // CHECK:STDOUT: %self.param.loc6: @F.%B (%B) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_16.2: type = splice_block %Self.ref.loc6 [symbolic = %B (constants.%B)] { +// CHECK:STDOUT: %.loc6_16.1: type = specific_constant constants.%B, @B(constants.%T, constants.%N) [symbolic = %B (constants.%B)] +// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, %.loc6_16.1 [symbolic = %B (constants.%B)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc6: @F.%B (%B) = bind_name self, %self.param.loc6 // CHECK:STDOUT: %a.param.loc6: @F.%T.loc6 (%T) = value_param runtime_param1 +// CHECK:STDOUT: %T.ref.loc6: type = name_ref T, @A.%T.loc4_9.1 [symbolic = %T.loc6 (constants.%T)] // CHECK:STDOUT: %a.loc6: @F.%T.loc6 (%T) = bind_name a, %a.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] @@ -741,9 +748,11 @@ fn Generic(T:! ()).WrongType() {} // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} { -// CHECK:STDOUT: %.loc14_17.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %T.param: %empty_tuple.type = value_param runtime_param +// CHECK:STDOUT: %.loc14_17.3: type = splice_block %.loc14_17.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc14_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc14_12.1: %empty_tuple.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc14_12.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/method_deduce.carbon b/toolchain/check/testdata/class/generic/method_deduce.carbon index dcf0429e1f2d..abffce41b6dd 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -97,14 +97,16 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %return.patt: %tuple.type.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %A.ref.loc19_31: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.2] // CHECK:STDOUT: %A.ref.loc19_39: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc19: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc19_43.1: %tuple.type.1 = tuple_literal (%A.ref.loc19_39, %B.ref.loc19) // CHECK:STDOUT: %.loc19_43.2: type = converted %.loc19_43.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %c.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19_32: type = splice_block %Class [template = constants.%Class.2] { +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %A.ref.loc19_31: type = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %Class.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %tuple.type.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.3 = return_slot %return.param @@ -115,14 +117,16 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %return.patt: %tuple.type.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %A.ref.loc23_50: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.2] // CHECK:STDOUT: %A.ref.loc23_58: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %B.ref.loc23: type = name_ref B, file.%B.decl [template = constants.%B] // CHECK:STDOUT: %.loc23_62.1: %tuple.type.1 = tuple_literal (%A.ref.loc23_58, %B.ref.loc23) // CHECK:STDOUT: %.loc23_62.2: type = converted %.loc23_62.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %c.param: %Class.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_51: type = splice_block %Class [template = constants.%Class.2] { +// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] +// CHECK:STDOUT: %A.ref.loc23_50: type = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%A) [template = constants.%Class.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %Class.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %tuple.type.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.3 = return_slot %return.param @@ -179,12 +183,12 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %return.patt: @GetNoDeduce.%tuple.type (%tuple.type.2) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @GetNoDeduce.%tuple.type (%tuple.type.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc16_21: type = name_ref T, @Class.%T.loc14_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.ref.loc16_38: type = name_ref T, @Class.%T.loc14_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %U.ref.loc16_41: type = name_ref U, %U.loc16_24.2 [symbolic = %U.loc16_24.1 (constants.%U)] // CHECK:STDOUT: %.loc16_42.1: %tuple.type.1 = tuple_literal (%T.ref.loc16_38, %U.ref.loc16_41) // CHECK:STDOUT: %.loc16_42.2: type = converted %.loc16_42.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %x.param: @GetNoDeduce.%T (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc16_21: type = name_ref T, @Class.%T.loc14_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %x: @GetNoDeduce.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc16_24.2: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc16_24.1 (constants.%U)] diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index bb0eb10ba11e..867a293925e2 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -243,9 +243,11 @@ class E(U:! type) {} // CHECK:STDOUT: %N.patt.loc4_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_9.1, runtime_param [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { -// 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: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc4_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { @@ -254,10 +256,10 @@ class E(U:! type) {} // CHECK:STDOUT: %N.patt.loc12_19.1: @.1.%T.loc12_9.2 (%T) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.3)] // CHECK:STDOUT: %N.param_patt: @.1.%T.loc12_9.2 (%T) = value_param_pattern %N.patt.loc12_19.1, runtime_param [symbolic = %N.patt.loc12_19.2 (constants.%N.patt.3)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_9.1 [symbolic = %T.loc12_9.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_9.2 (constants.%T)] // CHECK:STDOUT: %N.param: @.1.%T.loc12_9.2 (%T) = value_param runtime_param +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc12_9.1 [symbolic = %T.loc12_9.2 (constants.%T)] // CHECK:STDOUT: %N.loc12_19.1: @.1.%T.loc12_9.2 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc12_19.2 (constants.%N.3)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -343,11 +345,13 @@ class E(U:! type) {} // CHECK:STDOUT: %U.patt.loc12_19.1: %i32 = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc12_19.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: %i32 = value_param_pattern %U.patt.loc12_19.1, runtime_param [symbolic = %U.patt.loc12_19.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// 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: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_9.2 (constants.%T)] // CHECK:STDOUT: %U.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc12: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %U.loc12_19.1: %i32 = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc12_19.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -431,9 +435,11 @@ class E(U:! type) {} // CHECK:STDOUT: %T.patt.loc12_9.1: %i32 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %i32 = value_param_pattern %T.patt.loc12_9.1, runtime_param [symbolic = %T.patt.loc12_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// 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: %T.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc12: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %T.loc12_9.1: %i32 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_9.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index 3e80296538cb..fc9b75f2f6e3 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -144,8 +144,8 @@ class Class(T:! type) { // CHECK:STDOUT: generic fn @F(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: !definition: // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc17_19.2: type = class_type @Class, @Class(%T) [symbolic = %Class.loc17_19.2 (constants.%Class)] -// CHECK:STDOUT: %require_complete: = require_complete_type @F.%Class.loc17_19.2 (%Class) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %Class: type = class_type @Class, @Class(%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %require_complete: = require_complete_type @F.%Class (%Class) [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: %MakeSelf.type: type = fn_type @MakeSelf, @Class(%T) [symbolic = %MakeSelf.type (constants.%MakeSelf.type)] // CHECK:STDOUT: %MakeSelf: @F.%MakeSelf.type (%MakeSelf.type) = struct_value () [symbolic = %MakeSelf (constants.%MakeSelf)] // CHECK:STDOUT: %MakeSelf.specific_fn.loc17_23.2: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic = %MakeSelf.specific_fn.loc17_23.2 (constants.%MakeSelf.specific_fn)] @@ -155,26 +155,21 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc17_19.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc17_19.2 (constants.%Class)] -// CHECK:STDOUT: %c.var: ref @F.%Class.loc17_19.2 (%Class) = var c -// CHECK:STDOUT: %c: ref @F.%Class.loc17_19.2 (%Class) = bind_name c, %c.var +// CHECK:STDOUT: %c.var: ref @F.%Class (%Class) = var c +// CHECK:STDOUT: %c: ref @F.%Class (%Class) = bind_name c, %c.var // CHECK:STDOUT: %.loc17_23: @F.%MakeSelf.type (%MakeSelf.type) = specific_constant @Class.%MakeSelf.decl, @Class(constants.%T) [symbolic = %MakeSelf (constants.%MakeSelf)] // CHECK:STDOUT: %MakeSelf.ref: @F.%MakeSelf.type (%MakeSelf.type) = name_ref MakeSelf, %.loc17_23 [symbolic = %MakeSelf (constants.%MakeSelf)] // CHECK:STDOUT: %MakeSelf.specific_fn.loc17_23.1: = specific_function %MakeSelf.ref, @MakeSelf(constants.%T) [symbolic = %MakeSelf.specific_fn.loc17_23.2 (constants.%MakeSelf.specific_fn)] -// CHECK:STDOUT: %.loc17_9: ref @F.%Class.loc17_19.2 (%Class) = splice_block %c.var {} -// CHECK:STDOUT: %MakeSelf.call: init @F.%Class.loc17_19.2 (%Class) = call %MakeSelf.specific_fn.loc17_23.1() to %.loc17_9 +// CHECK:STDOUT: %.loc17_9: ref @F.%Class (%Class) = splice_block %c.var {} +// CHECK:STDOUT: %MakeSelf.call: init @F.%Class (%Class) = call %MakeSelf.specific_fn.loc17_23.1() to %.loc17_9 // CHECK:STDOUT: assign %c.var, %MakeSelf.call -// CHECK:STDOUT: %.loc18_12: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class.loc17_19.2 (constants.%Class)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_12 [symbolic = %Class.loc17_19.2 (constants.%Class)] -// CHECK:STDOUT: %s.var: ref @F.%Class.loc17_19.2 (%Class) = var s -// CHECK:STDOUT: %s: ref @F.%Class.loc17_19.2 (%Class) = bind_name s, %s.var +// CHECK:STDOUT: %s.var: ref @F.%Class (%Class) = var s +// CHECK:STDOUT: %s: ref @F.%Class (%Class) = bind_name s, %s.var // CHECK:STDOUT: %.loc18_19: @F.%MakeClass.type (%MakeClass.type) = specific_constant @Class.%MakeClass.decl, @Class(constants.%T) [symbolic = %MakeClass (constants.%MakeClass)] // CHECK:STDOUT: %MakeClass.ref: @F.%MakeClass.type (%MakeClass.type) = name_ref MakeClass, %.loc18_19 [symbolic = %MakeClass (constants.%MakeClass)] // CHECK:STDOUT: %MakeClass.specific_fn.loc18_19.1: = specific_function %MakeClass.ref, @MakeClass(constants.%T) [symbolic = %MakeClass.specific_fn.loc18_19.2 (constants.%MakeClass.specific_fn)] -// CHECK:STDOUT: %.loc18_9: ref @F.%Class.loc17_19.2 (%Class) = splice_block %s.var {} -// CHECK:STDOUT: %MakeClass.call: init @F.%Class.loc17_19.2 (%Class) = call %MakeClass.specific_fn.loc18_19.1() to %.loc18_9 +// CHECK:STDOUT: %.loc18_9: ref @F.%Class (%Class) = splice_block %s.var {} +// CHECK:STDOUT: %MakeClass.call: init @F.%Class (%Class) = call %MakeClass.specific_fn.loc18_19.1() to %.loc18_9 // CHECK:STDOUT: assign %s.var, %MakeClass.call // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/stringify.carbon b/toolchain/check/testdata/class/generic/stringify.carbon index 8c4a9b0f3454..b14be55814b3 100644 --- a/toolchain/check/testdata/class/generic/stringify.carbon +++ b/toolchain/check/testdata/class/generic/stringify.carbon @@ -117,11 +117,8 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %NoParams.decl: type = class_decl @NoParams [template = constants.%NoParams] {} {} // CHECK:STDOUT: %EmptyParams.decl: %EmptyParams.type = class_decl @EmptyParams [template = constants.%EmptyParams.generic] {} {} -// CHECK:STDOUT: %NoParams.ref: type = name_ref NoParams, %NoParams.decl [template = constants.%NoParams] // CHECK:STDOUT: %v.var: ref %NoParams = var v // CHECK:STDOUT: %v: ref %NoParams = bind_name v, %v.var -// CHECK:STDOUT: %EmptyParams.ref: %EmptyParams.type = name_ref EmptyParams, %EmptyParams.decl [template = constants.%EmptyParams.generic] -// CHECK:STDOUT: %EmptyParams: type = class_type @EmptyParams [template = constants.%EmptyParams] // CHECK:STDOUT: %w.var: ref %EmptyParams = var w // CHECK:STDOUT: %w: ref %EmptyParams = bind_name w, %w.var // CHECK:STDOUT: } @@ -200,25 +197,8 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %Outer.ref.loc9: %Outer.type = name_ref Outer, %Outer.decl [template = constants.%Outer.generic] -// CHECK:STDOUT: %.loc9_15: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc9_16: type = converted %.loc9_15, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %ptr.loc9: type = ptr_type %empty_struct_type [template = constants.%ptr.1] -// CHECK:STDOUT: %Outer.loc9: type = class_type @Outer, @Outer(constants.%ptr.1) [template = constants.%Outer.2] // CHECK:STDOUT: %v.var: ref %Outer.2 = var v // CHECK:STDOUT: %v: ref %Outer.2 = bind_name v, %v.var -// CHECK:STDOUT: %Outer.ref.loc19: %Outer.type = name_ref Outer, %Outer.decl [template = constants.%Outer.generic] -// CHECK:STDOUT: %.loc19_15: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc19_16: type = converted %.loc19_15, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %ptr.loc19_16: type = ptr_type %empty_struct_type [template = constants.%ptr.1] -// CHECK:STDOUT: %Outer.loc19: type = class_type @Outer, @Outer(constants.%ptr.1) [template = constants.%Outer.2] -// CHECK:STDOUT: %.loc19_18: %Inner.type.2 = specific_constant @Outer.%Inner.decl, @Outer(constants.%ptr.1) [template = constants.%Inner.generic.2] -// CHECK:STDOUT: %Inner.ref: %Inner.type.2 = name_ref Inner, %.loc19_18 [template = constants.%Inner.generic.2] -// 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: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] -// CHECK:STDOUT: %ptr.loc19_34: type = ptr_type %struct_type.a [template = constants.%ptr.2] -// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%ptr.1, constants.%ptr.2) [template = constants.%Inner.2] // CHECK:STDOUT: %w.var: ref %Inner.2 = var w // CHECK:STDOUT: %w: ref %Inner.2 = bind_name w, %w.var // CHECK:STDOUT: } @@ -312,13 +292,6 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %C.1: type = class_type @C, @C(%N.2) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.2: = complete_type_witness %empty_struct_type [template] -// CHECK:STDOUT: %int_123.1: Core.IntLiteral = int_value 123 [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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_123.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn: = specific_function %Convert.bound, @Convert.2(%int_32) [template] // CHECK:STDOUT: %int_123.2: %i32 = int_value 123 [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%int_123.2) [template] // CHECK:STDOUT: } @@ -343,20 +316,13 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %N.patt.loc4_9.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_9.1, runtime_param [symbolic = %N.patt.loc4_9.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { -// 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: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc4_9.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_9.2 (constants.%N.2)] // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [template = constants.%int_123.1] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound: = bound_method %int_123, %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_123) [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc13_13.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_123.2] -// CHECK:STDOUT: %.loc13_13.2: %i32 = converted %int_123, %.loc13_13.1 [template = constants.%int_123.2] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_123.2) [template = constants.%C.2] // CHECK:STDOUT: %v.var: ref %C.2 = var v // CHECK:STDOUT: %v: ref %C.2 = bind_name v, %v.var // CHECK:STDOUT: } @@ -412,20 +378,11 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %E: type = class_type @E, @E(%F) [symbolic] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type.4: = complete_type_witness %empty_struct_type [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: %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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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.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: %D.val.1: %D = struct_value (%int_1.2, %int_2.2) [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] @@ -459,43 +416,16 @@ var g: E({.a = 1, .b = 2}) = {} as E({.a = 3, .b = 4} as D); // CHECK:STDOUT: %F.patt.loc9_9.1: %D = symbolic_binding_pattern F, 0 [symbolic = %F.patt.loc9_9.2 (constants.%F.patt)] // CHECK:STDOUT: %F.param_patt: %D = value_param_pattern %F.patt.loc9_9.1, runtime_param [symbolic = %F.patt.loc9_9.2 (constants.%F.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %F.param: %D = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %F.loc9_9.1: %D = bind_symbolic_name F, 0, %F.param [symbolic = %F.loc9_9.2 (constants.%F)] // CHECK:STDOUT: } -// CHECK:STDOUT: %E.ref: %E.type = name_ref E, %E.decl [template = constants.%E.generic] -// 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: %.loc24_25.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc24_25.1: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc24_25.1: = bound_method %int_1, %impl.elem0.loc24_25.1 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc24_25.1: = specific_function %Convert.bound.loc24_25.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc24_25.1: init %i32 = call %Convert.specific_fn.loc24_25.1(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc24_25.2: init %i32 = converted %int_1, %int.convert_checked.loc24_25.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc24_25.3: ref %D = temporary_storage -// CHECK:STDOUT: %.loc24_25.4: ref %i32 = class_element_access %.loc24_25.3, element0 -// CHECK:STDOUT: %.loc24_25.5: init %i32 = initialize_from %.loc24_25.2 to %.loc24_25.4 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc24_25.2: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc24_25.2: = bound_method %int_2, %impl.elem0.loc24_25.2 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc24_25.2: = specific_function %Convert.bound.loc24_25.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc24_25.2: init %i32 = call %Convert.specific_fn.loc24_25.2(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc24_25.6: init %i32 = converted %int_2, %int.convert_checked.loc24_25.2 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc24_25.7: ref %i32 = class_element_access %.loc24_25.3, element1 -// CHECK:STDOUT: %.loc24_25.8: init %i32 = initialize_from %.loc24_25.6 to %.loc24_25.7 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc24_25.9: init %D = class_init (%.loc24_25.5, %.loc24_25.8), %.loc24_25.3 [template = constants.%D.val.1] -// CHECK:STDOUT: %.loc24_25.10: ref %D = temporary %.loc24_25.3, %.loc24_25.9 -// CHECK:STDOUT: %.loc24_26.1: ref %D = converted %.loc24_25.1, %.loc24_25.10 -// CHECK:STDOUT: %.loc24_26.2: %D = bind_value %.loc24_26.1 // CHECK:STDOUT: %g.var: ref = var g // CHECK:STDOUT: %g: ref = bind_name g, %g.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %D.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6: %D.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic_method.carbon b/toolchain/check/testdata/class/generic_method.carbon index 18b894325615..5944b23dca7d 100644 --- a/toolchain/check/testdata/class/generic_method.carbon +++ b/toolchain/check/testdata/class/generic_method.carbon @@ -60,12 +60,14 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc16: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] -// CHECK:STDOUT: %.loc16: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = constants.%Class] -// CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, %.loc16 [symbolic = constants.%Class] -// CHECK:STDOUT: %T.ref.loc16: type = name_ref T, %T.loc16 [symbolic = constants.%T] // CHECK:STDOUT: %self.param.loc16: %Class = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_28.2: type = splice_block %Self.ref.loc16 [symbolic = constants.%Class] { +// CHECK:STDOUT: %.loc16_28.1: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = constants.%Class] +// CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, %.loc16_28.1 [symbolic = constants.%Class] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc16: %Class = bind_name self, %self.param.loc16 // CHECK:STDOUT: %n.param.loc16: %T = value_param runtime_param1 +// CHECK:STDOUT: %T.ref.loc16: type = name_ref T, %T.loc16 [symbolic = constants.%T] // CHECK:STDOUT: %n.loc16: %T = bind_name n, %n.param.loc16 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -84,7 +86,6 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %complete_type.loc14_1.2: = complete_type_witness @Class.%struct_type.a (%struct_type.a) [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_13.1 [symbolic = %T.loc11_13.2 (constants.%T)] // CHECK:STDOUT: %.loc12: @Class.%Class.elem (%Class.elem) = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] { // CHECK:STDOUT: %self.patt: %Class = binding_pattern self @@ -92,12 +93,14 @@ fn Class(T:! type).F[self: Self](n: T) {} // CHECK:STDOUT: %n.patt: %T = binding_pattern n // CHECK:STDOUT: %n.param_patt: %T = value_param_pattern %n.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, %.loc13 [symbolic = %Class (constants.%Class)] -// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T.loc13 (constants.%T)] // CHECK:STDOUT: %self.param.loc13: @F.%Class (%Class) = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_14.2: type = splice_block %Self.ref.loc13 [symbolic = %Class (constants.%Class)] { +// CHECK:STDOUT: %.loc13_14.1: type = specific_constant constants.%Class, @Class(constants.%T) [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, %.loc13_14.1 [symbolic = %Class (constants.%Class)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc13: @F.%Class (%Class) = bind_name self, %self.param.loc13 // CHECK:STDOUT: %n.param.loc13: @F.%T.loc13 (%T) = value_param runtime_param1 +// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T.loc13 (constants.%T)] // CHECK:STDOUT: %n.loc13: @F.%T.loc13 (%T) = bind_name n, %n.param.loc13 // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type.loc14_1.1: = complete_type_witness %struct_type.a [symbolic = %complete_type.loc14_1.2 (constants.%complete_type)] diff --git a/toolchain/check/testdata/class/import.carbon b/toolchain/check/testdata/class/import.carbon index 8dda32981715..713eb12d0db6 100644 --- a/toolchain/check/testdata/class/import.carbon +++ b/toolchain/check/testdata/class/import.carbon @@ -103,8 +103,6 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Field { -// 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: %.loc8: %Field.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -119,18 +117,20 @@ fn Run() { // CHECK:STDOUT: %self.patt: %ForwardDeclared = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ForwardDeclared = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] // CHECK:STDOUT: %self.param: %ForwardDeclared = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] // CHECK:STDOUT: %self: %ForwardDeclared = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %ptr = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc15: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc15_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] -// CHECK:STDOUT: %ptr: type = ptr_type %ForwardDeclared [template = constants.%ptr] // CHECK:STDOUT: %self.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_23: type = splice_block %ptr [template = constants.%ptr] { +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%ForwardDeclared [template = constants.%ForwardDeclared] +// CHECK:STDOUT: %ptr: type = ptr_type %ForwardDeclared [template = constants.%ptr] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type.1] @@ -261,14 +261,12 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%import_ref.1 [template = constants.%Empty] // CHECK:STDOUT: %a.var: ref %Empty = var a // CHECK:STDOUT: %a: ref %Empty = bind_name a, %a.var // CHECK:STDOUT: %.loc7_19.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc7_19.2: init %Empty = class_init (), %a.var [template = constants.%Empty.val] // CHECK:STDOUT: %.loc7_20: init %Empty = converted %.loc7_19.1, %.loc7_19.2 [template = constants.%Empty.val] // CHECK:STDOUT: assign %a.var, %.loc7_20 -// CHECK:STDOUT: %Field.ref: type = name_ref Field, imports.%import_ref.2 [template = constants.%Field] // CHECK:STDOUT: %b.var: ref %Field = var b // CHECK:STDOUT: %b: ref %Field = bind_name b, %b.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] @@ -293,7 +291,6 @@ fn Run() { // CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %Convert.specific_fn.loc10(%int_2) [template = constants.%int_2.2] // CHECK:STDOUT: %.loc10_7: init %i32 = converted %int_2, %int.convert_checked.loc10 [template = constants.%int_2.2] // CHECK:STDOUT: assign %.loc10_4, %.loc10_7 -// CHECK:STDOUT: %ForwardDeclared.ref.loc12: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.1] // CHECK:STDOUT: %c.var: ref %ForwardDeclared.1 = var c // CHECK:STDOUT: %c: ref %ForwardDeclared.1 = bind_name c, %c.var // CHECK:STDOUT: %.loc12_29.1: %empty_struct_type = struct_literal () @@ -310,15 +307,11 @@ fn Run() { // 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) -// CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.1] -// CHECK:STDOUT: %ptr.loc16: type = ptr_type %ForwardDeclared.1 [template = constants.%ptr.3] // CHECK:STDOUT: %d.var: ref %ptr.3 = var d // CHECK:STDOUT: %d: ref %ptr.3 = bind_name d, %d.var // CHECK:STDOUT: %c.ref.loc16: ref %ForwardDeclared.1 = name_ref c, %c // CHECK:STDOUT: %addr.loc16: %ptr.3 = addr_of %c.ref.loc16 // CHECK:STDOUT: assign %d.var, %addr.loc16 -// CHECK:STDOUT: %Incomplete.ref: type = name_ref Incomplete, imports.%import_ref.4 [template = constants.%Incomplete] -// CHECK:STDOUT: %ptr.loc18: type = ptr_type %Incomplete [template = constants.%ptr.4] // CHECK:STDOUT: %e.var: ref %ptr.4 = var e // CHECK:STDOUT: %e: ref %ptr.4 = bind_name e, %e.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/import_base.carbon b/toolchain/check/testdata/class/import_base.carbon index 25c1c062f52c..ec5e98eb4aa4 100644 --- a/toolchain/check/testdata/class/import_base.carbon +++ b/toolchain/check/testdata/class/import_base.carbon @@ -79,23 +79,19 @@ fn Run() { // CHECK:STDOUT: %self.patt: %Base = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Base = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %self.param: %Base = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %self: %Base = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Unused.decl: %Unused.type = fn_decl @Unused [template = constants.%Unused] { // CHECK:STDOUT: %self.patt: %Base = binding_pattern self // CHECK:STDOUT: %self.param_patt: %Base = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %self.param: %Base = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] // CHECK:STDOUT: %self: %Base = bind_name self, %self.param // CHECK:STDOUT: } -// 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: %.loc8: %Base.elem = field_decl x, element0 [template] -// 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: %.loc9: %Base.elem = field_decl unused, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.unused [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -215,7 +211,6 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Child.ref: type = name_ref Child, imports.%import_ref.2 [template = constants.%Child] // CHECK:STDOUT: %a.var: ref %Child = var a // CHECK:STDOUT: %a: ref %Child = bind_name a, %a.var // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] diff --git a/toolchain/check/testdata/class/import_indirect.carbon b/toolchain/check/testdata/class/import_indirect.carbon index 8d1b4c744db4..543b8f626471 100644 --- a/toolchain/check/testdata/class/import_indirect.carbon +++ b/toolchain/check/testdata/class/import_indirect.carbon @@ -162,13 +162,10 @@ var ptr: E* = &val; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, imports.%import_ref.1 [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %D: type = bind_alias D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %b_val.var: ref %C = var b_val // CHECK:STDOUT: %b_val: ref %C = bind_name b_val, %b_val.var -// CHECK:STDOUT: %D.ref: type = name_ref D, %D [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %b_ptr.var: ref %ptr.2 = var b_ptr // CHECK:STDOUT: %b_ptr: ref %ptr.2 = bind_name b_ptr, %b_ptr.var // CHECK:STDOUT: } @@ -221,13 +218,10 @@ var ptr: E* = &val; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, imports.%import_ref.1 [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %E: type = bind_alias E, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c_val.var: ref %C = var c_val // CHECK:STDOUT: %c_val: ref %C = bind_name c_val, %c_val.var -// CHECK:STDOUT: %E.ref: type = name_ref E, %E [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %c_ptr.var: ref %ptr.2 = var c_ptr // CHECK:STDOUT: %c_ptr: ref %ptr.2 = bind_name c_ptr, %c_ptr.var // CHECK:STDOUT: } @@ -281,17 +275,14 @@ var ptr: E* = &val; // CHECK:STDOUT: .b_ptr = imports.%import_ref.4 // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .val = %val -// CHECK:STDOUT: .ptr = %ptr.loc8_5 +// CHECK:STDOUT: .ptr = %ptr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] -// CHECK:STDOUT: %ptr.loc8_11: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %ptr.var: ref %ptr.2 = var ptr -// CHECK:STDOUT: %ptr.loc8_5: ref %ptr.2 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %ptr: ref %ptr.2 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "a.carbon"] { @@ -343,17 +334,14 @@ var ptr: E* = &val; // CHECK:STDOUT: .C = imports.%import_ref.4 // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .val = %val -// CHECK:STDOUT: .ptr = %ptr.loc8_5 +// CHECK:STDOUT: .ptr = %ptr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.4 [template = constants.%C] // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %ptr.loc8_11: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %ptr.var: ref %ptr.2 = var ptr -// CHECK:STDOUT: %ptr.loc8_5: ref %ptr.2 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %ptr: ref %ptr.2 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "a.carbon"] { @@ -409,17 +397,14 @@ var ptr: E* = &val; // CHECK:STDOUT: .c_ptr = imports.%import_ref.6 // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .val = %val -// CHECK:STDOUT: .ptr = %ptr.loc8_5 +// CHECK:STDOUT: .ptr = %ptr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var -// CHECK:STDOUT: %E.ref: type = name_ref E, imports.%import_ref.4 [template = constants.%C] -// CHECK:STDOUT: %ptr.loc8_11: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %ptr.var: ref %ptr.2 = var ptr -// CHECK:STDOUT: %ptr.loc8_5: ref %ptr.2 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %ptr: ref %ptr.2 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "b.carbon"] { @@ -475,17 +460,14 @@ var ptr: E* = &val; // CHECK:STDOUT: .b_ptr = imports.%import_ref.6 // CHECK:STDOUT: .Core = imports.%Core // CHECK:STDOUT: .val = %val -// CHECK:STDOUT: .ptr = %ptr.loc8_5 +// CHECK:STDOUT: .ptr = %ptr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.4 [template = constants.%C] // CHECK:STDOUT: %val.var: ref %C = var val // CHECK:STDOUT: %val: ref %C = bind_name val, %val.var -// CHECK:STDOUT: %E.ref: type = name_ref E, imports.%import_ref.1 [template = constants.%C] -// CHECK:STDOUT: %ptr.loc8_11: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %ptr.var: ref %ptr.2 = var ptr -// CHECK:STDOUT: %ptr.loc8_5: ref %ptr.2 = bind_name ptr, %ptr.var +// CHECK:STDOUT: %ptr: ref %ptr.2 = bind_name ptr, %ptr.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C [from "b.carbon"] { diff --git a/toolchain/check/testdata/class/import_member_cycle.carbon b/toolchain/check/testdata/class/import_member_cycle.carbon index ddf0929ac804..091f67709c82 100644 --- a/toolchain/check/testdata/class/import_member_cycle.carbon +++ b/toolchain/check/testdata/class/import_member_cycle.carbon @@ -53,8 +53,6 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Cycle { -// CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, file.%Cycle.decl [template = constants.%Cycle] -// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template = constants.%ptr] // CHECK:STDOUT: %.loc5: %Cycle.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type] // CHECK:STDOUT: @@ -106,8 +104,6 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, imports.%import_ref.1 [template = constants.%Cycle] -// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template = constants.%ptr] // CHECK:STDOUT: %a.var: ref %ptr = var a // CHECK:STDOUT: %a: ref %ptr = bind_name a, %a.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/import_struct_cyle.carbon b/toolchain/check/testdata/class/import_struct_cyle.carbon index c4abd2475b5e..f095db044631 100644 --- a/toolchain/check/testdata/class/import_struct_cyle.carbon +++ b/toolchain/check/testdata/class/import_struct_cyle.carbon @@ -57,18 +57,12 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Cycle.decl.loc4: type = class_decl @Cycle [template = constants.%Cycle] {} {} -// CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, %Cycle.decl.loc4 [template = constants.%Cycle] -// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template = constants.%ptr] -// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %ptr} [template = constants.%struct_type.b] // CHECK:STDOUT: %a.var: ref %struct_type.b = var a // CHECK:STDOUT: %a: ref %struct_type.b = bind_name a, %a.var // CHECK:STDOUT: %Cycle.decl.loc8: type = class_decl @Cycle [template = constants.%Cycle] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Cycle { -// CHECK:STDOUT: %Cycle.ref: type = name_ref Cycle, file.%Cycle.decl.loc4 [template = constants.%Cycle] -// CHECK:STDOUT: %ptr: type = ptr_type %Cycle [template = constants.%ptr] -// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %ptr} [template = constants.%struct_type.b] // CHECK:STDOUT: %.loc10: %Cycle.elem = field_decl c, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c [template = constants.%complete_type] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 3e6157e419e1..cfc02546cd71 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -265,11 +265,7 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Shape { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %Shape.elem = field_decl x, element0 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6: %Shape.elem = field_decl y, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.y [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -289,7 +285,6 @@ class B { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // CHECK:STDOUT: %int_32.loc12_36: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc12_36: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] @@ -297,6 +292,7 @@ class B { // CHECK:STDOUT: %.loc12_44.1: %tuple.type.1 = tuple_literal (%i32.loc12_36, %i32.loc12_41) // CHECK:STDOUT: %.loc12_44.2: type = converted %.loc12_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self.param: %Circle = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Circle [template = constants.%Circle] // CHECK:STDOUT: %self: %Circle = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %tuple.type.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.2 = return_slot %return.param @@ -423,10 +419,10 @@ class B { // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %.loc15_26.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc15_26.2: type = converted %.loc15_26.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param @@ -506,8 +502,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// 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: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] @@ -632,8 +626,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Shape { -// 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: %.loc5: %Shape.elem = field_decl y, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -652,10 +644,10 @@ class B { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Square [template = constants.%Square] // 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: %self.param: %Square = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Square [template = constants.%Square] // CHECK:STDOUT: %self: %Square = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -977,8 +969,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc5: = bound_method %int_5.loc5, %impl.elem0.loc5 [template = constants.%Convert.bound] @@ -987,8 +977,6 @@ class B { // CHECK:STDOUT: %.loc5_49.1: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%int_5.2] // 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_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_5.loc6, %impl.elem0.loc6 [template = constants.%Convert.bound] @@ -1007,8 +995,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Internal { -// 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: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_5, %impl.elem0 [template = constants.%Convert.bound] @@ -1026,7 +1012,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @B { -// CHECK:STDOUT: %Internal.ref: type = name_ref Internal, file.%Internal.decl [template = constants.%Internal] // CHECK:STDOUT: %.loc14: %B.elem = field_decl internal, element0 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern @@ -1043,10 +1028,10 @@ class B { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] // 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: %self.param: %B = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -1117,8 +1102,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// 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: %.loc5: %A.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -1135,8 +1118,8 @@ class B { // CHECK:STDOUT: %self.patt: %B = binding_pattern self // CHECK:STDOUT: %self.param_patt: %B = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] @@ -1194,8 +1177,6 @@ class B { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @A { -// 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: %.loc5: %A.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -1212,8 +1193,8 @@ class B { // CHECK:STDOUT: %self.patt: %B = binding_pattern self // CHECK:STDOUT: %self.param_patt: %B = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] // CHECK:STDOUT: %self.param: %B = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%B [template = constants.%B] // CHECK:STDOUT: %self: %B = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] diff --git a/toolchain/check/testdata/class/init.carbon b/toolchain/check/testdata/class/init.carbon index 4864e383294a..37309376670d 100644 --- a/toolchain/check/testdata/class/init.carbon +++ b/toolchain/check/testdata/class/init.carbon @@ -64,14 +64,18 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// 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: %Class.ref.loc16_23: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %Class.ref.loc16_34: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_12: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %next.param: %ptr.1 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_28: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref.loc16_23: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %next: %ptr.1 = bind_name next, %next.param // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param2 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param @@ -84,14 +88,18 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// 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: %Class.ref.loc20_30: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %Class.ref.loc20_41: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_19: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %next.param: %ptr.1 = value_param runtime_param1 +// CHECK:STDOUT: %.loc20_35: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref.loc20_30: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %next: %ptr.1 = bind_name next, %next.param // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param2 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param @@ -99,11 +107,7 @@ fn MakeReorder(n: i32, next: Class*) -> Class { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// 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: %.loc12: %Class.elem.1 = field_decl n, element0 [template] -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %.loc13: %Class.elem.2 = field_decl next, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n.next [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/init_as.carbon b/toolchain/check/testdata/class/init_as.carbon index ae17bfe7c386..ab7446417790 100644 --- a/toolchain/check/testdata/class/init_as.carbon +++ b/toolchain/check/testdata/class/init_as.carbon @@ -73,11 +73,7 @@ fn F() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Class { -// 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: %.loc12: %Class.elem = field_decl a, element0 [template] -// 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: %.loc13: %Class.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/init_nested.carbon b/toolchain/check/testdata/class/init_nested.carbon index 921120aabeab..27268658e03a 100644 --- a/toolchain/check/testdata/class/init_nested.carbon +++ b/toolchain/check/testdata/class/init_nested.carbon @@ -81,11 +81,7 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { -// 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: %.loc12: %Inner.elem = field_decl a, element0 [template] -// 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: %.loc13: %Inner.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -97,9 +93,7 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Outer { -// CHECK:STDOUT: %Inner.ref.loc19: type = name_ref Inner, file.%Inner.decl [template = constants.%Inner] // CHECK:STDOUT: %.loc19: %Outer.elem = field_decl c, element0 [template] -// CHECK:STDOUT: %Inner.ref.loc20: type = name_ref Inner, file.%Inner.decl [template = constants.%Inner] // CHECK:STDOUT: %.loc20: %Outer.elem = field_decl d, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index da12f212d428..410af5e3a848 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -133,10 +133,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc20: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc20: %Class = bind_name self, %self.param.loc20 // CHECK:STDOUT: %return.param.loc20: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc20: ref %i32 = return_slot %return.param.loc20 @@ -147,10 +147,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // 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: %c.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -161,10 +161,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // 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: %c.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c: %Class = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -193,11 +193,13 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.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: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc43: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -208,11 +210,13 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.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: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc47: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -252,10 +256,10 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // 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: %self.param.loc12: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc12: %Class = bind_name self, %self.param.loc12 // CHECK:STDOUT: %return.param.loc12: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc12: ref %i32 = return_slot %return.param.loc12 @@ -263,23 +267,23 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc13: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc13_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.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: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_23: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] +// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.ref: %F.type = name_ref F, %F.decl [template = constants.%F] // CHECK:STDOUT: %A: %F.type = bind_alias A, %F.decl [template = constants.%F] -// 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: %.loc17: %Class.elem = field_decl k, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.1 [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -352,7 +356,6 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @CallWithAddr() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.var: ref %Class = var c // CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var // CHECK:STDOUT: %c.ref: ref %Class = name_ref c, %c diff --git a/toolchain/check/testdata/class/nested.carbon b/toolchain/check/testdata/class/nested.carbon index 2693c4c10a23..a865fc3547a4 100644 --- a/toolchain/check/testdata/class/nested.carbon +++ b/toolchain/check/testdata/class/nested.carbon @@ -93,9 +93,11 @@ fn F(a: Outer*) { // CHECK:STDOUT: %a.patt: %ptr.2 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %ptr.2 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Outer.ref.loc41: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %ptr.loc41: type = ptr_type %Outer [template = constants.%ptr.2] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc41: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] +// CHECK:STDOUT: %ptr: type = ptr_type %Outer [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -104,14 +106,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} // CHECK:STDOUT: %Inner.decl: type = class_decl @Inner [template = constants.%Inner] {} {} // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] {} {} -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Outer [template = constants.%Outer] -// CHECK:STDOUT: %ptr.loc36: type = ptr_type %Outer [template = constants.%ptr.2] // CHECK:STDOUT: %.loc36: %Outer.elem.1 = field_decl po, element0 [template] -// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %ptr.loc37: type = ptr_type %Outer [template = constants.%ptr.2] // CHECK:STDOUT: %.loc37: %Outer.elem.1 = field_decl qo, element1 [template] -// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, %Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %ptr.loc38: type = ptr_type %Inner [template = constants.%ptr.1] // CHECK:STDOUT: %.loc38: %Outer.elem.2 = field_decl pi, element2 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.po.qo.pi [template = constants.%complete_type.2] // CHECK:STDOUT: @@ -127,14 +123,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Inner [template = constants.%Inner] -// CHECK:STDOUT: %ptr.loc19: type = ptr_type %Inner [template = constants.%ptr.1] // CHECK:STDOUT: %.loc19: %Inner.elem.1 = field_decl pi, element0 [template] -// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %ptr.loc20: type = ptr_type %Outer [template = constants.%ptr.2] // CHECK:STDOUT: %.loc20: %Inner.elem.2 = field_decl po, element1 [template] -// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %ptr.loc21: type = ptr_type %Inner [template = constants.%ptr.1] // CHECK:STDOUT: %.loc21: %Inner.elem.1 = field_decl qi, element2 [template] // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.pi.po.qi [template = constants.%complete_type.1] @@ -150,10 +140,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %o.var: ref %Outer = var o // CHECK:STDOUT: %o: ref %Outer = bind_name o, %o.var -// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] // CHECK:STDOUT: %i.var: ref %Inner = var i // CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var // CHECK:STDOUT: return @@ -161,10 +149,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %o.var: ref %Outer = var o // CHECK:STDOUT: %o: ref %Outer = bind_name o, %o.var -// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] // CHECK:STDOUT: %i.var: ref %Inner = var i // CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var // CHECK:STDOUT: return @@ -172,10 +158,8 @@ fn F(a: Outer*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %o.var: ref %Outer = var o // CHECK:STDOUT: %o: ref %Outer = bind_name o, %o.var -// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] // CHECK:STDOUT: %i.var: ref %Inner = var i // CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var // CHECK:STDOUT: return @@ -183,9 +167,6 @@ fn F(a: Outer*) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%a.param_patt: %ptr.2) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Outer.ref.loc42: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] -// CHECK:STDOUT: %ptr.loc42: type = ptr_type %Inner [template = constants.%ptr.1] // CHECK:STDOUT: %a.ref.loc42: %ptr.2 = name_ref a, %a // CHECK:STDOUT: %.loc42_26: ref %Outer = deref %a.ref.loc42 // CHECK:STDOUT: %pi.ref.loc42: %Outer.elem.2 = name_ref pi, @Outer.%.loc38 [template = @Outer.%.loc38] diff --git a/toolchain/check/testdata/class/nested_name.carbon b/toolchain/check/testdata/class/nested_name.carbon index 3c30950e6d65..342fc4c135d4 100644 --- a/toolchain/check/testdata/class/nested_name.carbon +++ b/toolchain/check/testdata/class/nested_name.carbon @@ -63,11 +63,13 @@ fn G(o: Outer) { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] -// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] // 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: %oi.param: %Inner = value_param runtime_param0 +// CHECK:STDOUT: %.loc17: type = splice_block %Inner.ref [template = constants.%Inner] { +// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] +// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] +// CHECK:STDOUT: } // CHECK:STDOUT: %oi: %Inner = bind_name oi, %oi.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -76,8 +78,8 @@ fn G(o: Outer) { // CHECK:STDOUT: %o.patt: %Outer = binding_pattern o // CHECK:STDOUT: %o.param_patt: %Outer = value_param_pattern %o.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %o.param: %Outer = value_param runtime_param0 +// CHECK:STDOUT: %Outer.ref: type = name_ref Outer, file.%Outer.decl [template = constants.%Outer] // CHECK:STDOUT: %o: %Outer = bind_name o, %o.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -93,8 +95,6 @@ fn G(o: Outer) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Inner { -// 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: %.loc13: %Inner.elem = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -115,8 +115,6 @@ fn G(o: Outer) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%o.param_patt: %Outer) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %o.ref: %Outer = name_ref o, %o -// CHECK:STDOUT: %Inner.ref: type = name_ref Inner, @Outer.%Inner.decl [template = constants.%Inner] // CHECK:STDOUT: %i.var: ref %Inner = var i // CHECK:STDOUT: %i: ref %Inner = bind_name i, %i.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/no_prelude/export_name.carbon b/toolchain/check/testdata/class/no_prelude/export_name.carbon index 4996ab9a3a8a..07da9891059a 100644 --- a/toolchain/check/testdata/class/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/class/no_prelude/export_name.carbon @@ -110,7 +110,6 @@ var c: C = {}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon index 6cd023473a0d..fd54e2a739ff 100644 --- a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon @@ -82,7 +82,6 @@ fn F(T:! type) { // CHECK:STDOUT: %NotGenericButParams.val: %NotGenericButParams = struct_value () [template] // CHECK:STDOUT: %GenericAndParams.3: type = class_type @GenericAndParams.1, @GenericAndParams.1(%X) [template] // CHECK:STDOUT: %GenericAndParams.val.1: %GenericAndParams.3 = struct_value () [template] -// CHECK:STDOUT: %C.2: type = class_type @C, @C(%X) [template] // CHECK:STDOUT: %GenericAndParams.type.3: type = generic_class_type @GenericAndParams.2, @C(%X) [template] // CHECK:STDOUT: %GenericAndParams.generic.3: %GenericAndParams.type.3 = struct_value () [template] // CHECK:STDOUT: %GenericNoParams.val: %GenericNoParams.1 = struct_value () [template] @@ -120,31 +119,14 @@ fn F(T:! type) { // CHECK:STDOUT: %T.loc8_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_9.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %X.decl: type = class_decl @X [template = constants.%X] {} {} -// CHECK:STDOUT: %NotGenericNoParams.ref: type = name_ref NotGenericNoParams, %NotGenericNoParams.decl [template = constants.%NotGenericNoParams] // CHECK:STDOUT: %a.var: ref %NotGenericNoParams = var a // CHECK:STDOUT: %a: ref %NotGenericNoParams = bind_name a, %a.var -// CHECK:STDOUT: %NotGenericButParams.ref: %NotGenericButParams.type = name_ref NotGenericButParams, %NotGenericButParams.decl [template = constants.%NotGenericButParams.generic] -// CHECK:STDOUT: %NotGenericButParams: type = class_type @NotGenericButParams [template = constants.%NotGenericButParams] // CHECK:STDOUT: %b.var: ref %NotGenericButParams = var b // CHECK:STDOUT: %b: ref %NotGenericButParams = bind_name b, %b.var -// CHECK:STDOUT: %GenericAndParams.ref.loc17: %GenericAndParams.type.1 = name_ref GenericAndParams, %GenericAndParams.decl [template = constants.%GenericAndParams.generic.1] -// CHECK:STDOUT: %X.ref.loc17: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %GenericAndParams.loc17: type = class_type @GenericAndParams.1, @GenericAndParams.1(constants.%X) [template = constants.%GenericAndParams.3] // CHECK:STDOUT: %c.var: ref %GenericAndParams.3 = var c // CHECK:STDOUT: %c: ref %GenericAndParams.3 = bind_name c, %c.var -// CHECK:STDOUT: %C.ref.loc18: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %X.ref.loc18: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %C.loc18: type = class_type @C, @C(constants.%X) [template = constants.%C.2] -// CHECK:STDOUT: %GenericNoParams.ref: type = name_ref GenericNoParams, @C.%GenericNoParams.decl [template = constants.%GenericNoParams.1] // CHECK:STDOUT: %d.var: ref %GenericNoParams.1 = var d // CHECK:STDOUT: %d: ref %GenericNoParams.1 = bind_name d, %d.var -// CHECK:STDOUT: %C.ref.loc19: %C.type = name_ref C, %C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %X.ref.loc19_10: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %C.loc19: type = class_type @C, @C(constants.%X) [template = constants.%C.2] -// CHECK:STDOUT: %.loc19: %GenericAndParams.type.3 = specific_constant @C.%GenericAndParams.decl, @C(constants.%X) [template = constants.%GenericAndParams.generic.3] -// CHECK:STDOUT: %GenericAndParams.ref.loc19: %GenericAndParams.type.3 = name_ref GenericAndParams, %.loc19 [template = constants.%GenericAndParams.generic.3] -// CHECK:STDOUT: %X.ref.loc19_30: type = name_ref X, %X.decl [template = constants.%X] -// CHECK:STDOUT: %GenericAndParams.loc19: type = class_type @GenericAndParams.2, @GenericAndParams.2(constants.%X, constants.%X) [template = constants.%GenericAndParams.4] // CHECK:STDOUT: %e.var: ref %GenericAndParams.4 = var e // CHECK:STDOUT: %e: ref %GenericAndParams.4 = bind_name e, %e.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/import_access.carbon b/toolchain/check/testdata/class/no_prelude/import_access.carbon index 28bd83637d17..6b5ca0a8d2b7 100644 --- a/toolchain/check/testdata/class/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/class/no_prelude/import_access.carbon @@ -219,7 +219,6 @@ private class Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Def.ref: type = name_ref Def, imports.%import_ref.1 [template = constants.%Def] // CHECK:STDOUT: %c.var: ref %Def = var c // CHECK:STDOUT: %c: ref %Def = bind_name c, %c.var // CHECK:STDOUT: } @@ -250,7 +249,6 @@ private class Redecl {} // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %c.var: ref = var c // CHECK:STDOUT: %c: ref = bind_name c, %c.var // CHECK:STDOUT: } @@ -280,8 +278,6 @@ private class Redecl {} // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] -// CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %c.var: ref = var c // CHECK:STDOUT: %c: ref = bind_name c, %c.var // CHECK:STDOUT: } @@ -315,7 +311,6 @@ private class Redecl {} // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %ForwardWithDef.ref: type = name_ref ForwardWithDef, imports.%import_ref.1 [template = constants.%ForwardWithDef] // CHECK:STDOUT: %c.var: ref %ForwardWithDef = var c // CHECK:STDOUT: %c: ref %ForwardWithDef = bind_name c, %c.var // CHECK:STDOUT: } @@ -346,7 +341,6 @@ private class Redecl {} // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %c.var: ref = var c // CHECK:STDOUT: %c: ref = bind_name c, %c.var // CHECK:STDOUT: } @@ -376,8 +370,6 @@ private class Redecl {} // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] -// CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %c.var: ref = var c // CHECK:STDOUT: %c: ref = bind_name c, %c.var // CHECK:STDOUT: } @@ -415,9 +407,11 @@ private class Redecl {} // CHECK:STDOUT: %c.patt: %ptr = binding_pattern c // CHECK:STDOUT: %c.param_patt: %ptr = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Forward.ref: type = name_ref Forward, imports.%import_ref [template = constants.%Forward] -// CHECK:STDOUT: %ptr: type = ptr_type %Forward [template = constants.%ptr] // CHECK:STDOUT: %c.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %ptr [template = constants.%ptr] { +// CHECK:STDOUT: %Forward.ref: type = name_ref Forward, imports.%import_ref [template = constants.%Forward] +// CHECK:STDOUT: %ptr: type = ptr_type %Forward [template = constants.%ptr] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %ptr = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %Forward.decl: type = class_decl @Forward [template = constants.%Forward] {} {} @@ -452,9 +446,11 @@ private class Redecl {} // CHECK:STDOUT: %c.patt: = binding_pattern c // CHECK:STDOUT: %c.param_patt: = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %c.param: = value_param runtime_param0 +// CHECK:STDOUT: %.loc10: type = splice_block %ptr [template = ] { +// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -487,10 +483,12 @@ private class Redecl {} // CHECK:STDOUT: %c.patt: = binding_pattern c // CHECK:STDOUT: %c.param_patt: = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] -// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %c.param: = value_param runtime_param0 +// CHECK:STDOUT: %.loc9: type = splice_block %ptr [template = ] { +// CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] +// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon b/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon index 1a0f4cdfd994..2a4c655cb344 100644 --- a/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon +++ b/toolchain/check/testdata/class/no_prelude/indirect_import_member.carbon @@ -269,8 +269,6 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } @@ -317,8 +315,6 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } @@ -365,8 +361,6 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } @@ -417,8 +411,6 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } @@ -477,8 +469,6 @@ var x: () = D.C.F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon index 84aa7a56cc2c..d4d34a0a9298 100644 --- a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon @@ -209,32 +209,32 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc8: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc8: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc8: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc8: %C = bind_symbolic_name a, 0, %a.param.loc8 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc11: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc11, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param.loc10: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc10_11.1: %C = bind_symbolic_name a, 0, %a.param.loc10 [symbolic = %a.loc10_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc11: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc11, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param.loc11: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc11: %C = bind_symbolic_name a, 0, %a.param.loc11 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -310,16 +310,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6_17.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_17.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -377,16 +377,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc6_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_11.1, runtime_param [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc14_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc14_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc14_11.1, runtime_param [symbolic = %a.patt.loc14_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc14_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc14_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -454,16 +454,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6_11.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = class_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -524,16 +524,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc8_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc8_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8_11.1, runtime_param [symbolic = %a.patt.loc8_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc8_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc8_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -606,16 +606,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc4: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc4, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %a.loc4: %C = bind_symbolic_name a, 0, %a.param [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = class_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc5: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc5, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %a.loc5: %C = bind_symbolic_name a, 0, %a.param [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -696,16 +696,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %b.patt.loc15_11.1: %C = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc15_11.2 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt.loc15_11.1, runtime_param [symbolic = %b.patt.loc15_11.2 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %b.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %b.loc15_11.1: %C = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc15_11.2 (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -778,16 +778,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc15_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_11.1, runtime_param [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc15_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc15_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -860,16 +860,16 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc7_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_11.1, runtime_param [symbolic = %a.patt.loc7_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc15_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_11.1, runtime_param [symbolic = %a.patt.loc15_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc15_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc15_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -936,8 +936,8 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc6_11.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_11.1, runtime_param [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6_11.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -995,8 +995,8 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc6: %C = symbolic_binding_pattern a, 0 [symbolic = constants.%a.patt] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6, runtime_param [symbolic = constants.%a.patt] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc6: %C = bind_symbolic_name a, 0, %a.param [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1053,19 +1053,23 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %a.patt.loc6_11.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc6_11.1, runtime_param [symbolic = %a.patt.loc6_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] // CHECK:STDOUT: %a.param: %const = value_param runtime_param +// CHECK:STDOUT: %.loc6: type = splice_block %const [template = constants.%const] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_11.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc18_11.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc18_11.1, runtime_param [symbolic = %a.patt.loc18_11.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %const.loc18_22: type = const_type %C [template = constants.%const] -// CHECK:STDOUT: %const.loc18_15: type = const_type %const [template = constants.%const] // CHECK:STDOUT: %a.param: %const = value_param runtime_param +// CHECK:STDOUT: %.loc18: type = splice_block %const.loc18_15 [template = constants.%const] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %const.loc18_22: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %const.loc18_15: type = const_type %const [template = constants.%const] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc18_11.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc18_11.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1134,34 +1138,36 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc16: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc16_11: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %ptr: type = ptr_type %Base [template = constants.%ptr.1] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_26: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Base.ref: type = name_ref Base, file.%Base.decl [template = constants.%Base] +// CHECK:STDOUT: %ptr: type = ptr_type %Base [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %Base.elem = field_decl a, element0 [template] +// CHECK:STDOUT: %.loc5: %Base.elem = field_decl a, element0 [template] // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc7: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc7_8: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] -// CHECK:STDOUT: %ptr: type = ptr_type %Base [template = constants.%ptr.1] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_23: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Base [template = constants.%Base] +// CHECK:STDOUT: %ptr: type = ptr_type %Base [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%Base -// CHECK:STDOUT: .a = %.loc5_8 +// CHECK:STDOUT: .a = %.loc5 // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } @@ -1172,7 +1178,7 @@ fn Base.F[addr self: Base*]() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %self.ref: %ptr.1 = name_ref self, %self // CHECK:STDOUT: %.loc17_4: ref %Base = deref %self.ref -// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc5_8 [template = @Base.%.loc5_8] +// CHECK:STDOUT: %a.ref: %Base.elem = name_ref a, @Base.%.loc5 [template = @Base.%.loc5] // CHECK:STDOUT: %.loc17_10: ref %empty_tuple.type = class_element_access %.loc17_4, element0 // CHECK:STDOUT: %.loc17_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc17_16.2: init %empty_tuple.type = tuple_init () to %.loc17_10 [template = constants.%empty_tuple] diff --git a/toolchain/check/testdata/class/raw_self.carbon b/toolchain/check/testdata/class/raw_self.carbon index 9c884c627548..79ab8c843c56 100644 --- a/toolchain/check/testdata/class/raw_self.carbon +++ b/toolchain/check/testdata/class/raw_self.carbon @@ -58,17 +58,21 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt.loc17_17: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt.loc17_21: %ptr.1 = value_param_pattern %self.patt.loc17_17, runtime_param0 -// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt.loc17_21 +// CHECK:STDOUT: %.loc17_12: auto = addr_pattern %self.param_patt.loc17_21 // CHECK:STDOUT: %self.patt.loc17_30: %i32 = binding_pattern r#self // CHECK:STDOUT: %self.param_patt.loc17_36: %i32 = value_param_pattern %self.patt.loc17_30, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %ptr.loc17: type = ptr_type %Class [template = constants.%ptr.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: %self.param.loc17_21: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc17_27: type = splice_block %ptr.loc17 [template = constants.%ptr.1] { +// CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class [template = constants.%Class] +// CHECK:STDOUT: %ptr.loc17: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc17_17: %ptr.1 = bind_name self, %self.param.loc17_21 // CHECK:STDOUT: %self.param.loc17_36: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc17_38: type = splice_block %i32.loc17 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %self.loc17_30: %i32 = bind_name r#self, %self.param.loc17_36 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { @@ -79,9 +83,6 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %int_32.loc21_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc21_41: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_46: Core.IntLiteral = int_value 32 [template = constants.%int_32] @@ -89,8 +90,13 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %.loc21_49.1: %tuple.type.1 = tuple_literal (%i32.loc21_41, %i32.loc21_46) // CHECK:STDOUT: %.loc21_49.2: type = converted %.loc21_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self.param.loc21_16: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc21_12: %Class = bind_name self, %self.param.loc21_16 // CHECK:STDOUT: %self.param.loc21_30: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc21_32: type = splice_block %i32.loc21_32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc21_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc21_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc21_24: %i32 = bind_name r#self, %self.param.loc21_30 // CHECK:STDOUT: %return.param.loc21: ref %tuple.type.2 = out_param runtime_param2 // CHECK:STDOUT: %return.loc21: ref %tuple.type.2 = return_slot %return.param.loc21 @@ -101,17 +107,21 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %self.patt.loc17_17: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt.loc17_21: %ptr.1 = value_param_pattern %self.patt.loc17_17, runtime_param0 -// CHECK:STDOUT: %.loc17: auto = addr_pattern %self.param_patt.loc17_21 +// CHECK:STDOUT: %.loc17_12: auto = addr_pattern %self.param_patt.loc17_21 // CHECK:STDOUT: %self.patt.loc17_30: %i32 = binding_pattern r#self // CHECK:STDOUT: %self.param_patt.loc17_36: %i32 = value_param_pattern %self.patt.loc17_30, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %ptr.loc12: type = ptr_type %Class [template = constants.%ptr.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: %self.param.loc12_17: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_23: type = splice_block %ptr.loc12 [template = constants.%ptr.1] { +// CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] +// CHECK:STDOUT: %ptr.loc12: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc12_13: %ptr.1 = bind_name self, %self.param.loc12_17 // CHECK:STDOUT: %self.param.loc12_32: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc12_34: type = splice_block %i32.loc12 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %self.loc12_26: %i32 = bind_name r#self, %self.param.loc12_32 // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { @@ -122,9 +132,6 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %return.patt: %tuple.type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.2 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %int_32.loc13_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] @@ -132,14 +139,17 @@ fn Class.G[self: Self](r#self: i32) -> (i32, i32) { // CHECK:STDOUT: %.loc13_45.1: %tuple.type.1 = tuple_literal (%i32.loc13_37, %i32.loc13_42) // CHECK:STDOUT: %.loc13_45.2: type = converted %.loc13_45.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self.param.loc13_12: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc13_8: %Class = bind_name self, %self.param.loc13_12 // CHECK:STDOUT: %self.param.loc13_26: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_28: type = splice_block %i32.loc13_28 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc13_20: %i32 = bind_name r#self, %self.param.loc13_26 // CHECK:STDOUT: %return.param.loc13: ref %tuple.type.2 = out_param runtime_param2 // CHECK:STDOUT: %return.loc13: ref %tuple.type.2 = return_slot %return.param.loc13 // CHECK:STDOUT: } -// 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: %.loc14: %Class.elem = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/raw_self_type.carbon b/toolchain/check/testdata/class/raw_self_type.carbon index b24e0deef156..586d5f67f3c7 100644 --- a/toolchain/check/testdata/class/raw_self_type.carbon +++ b/toolchain/check/testdata/class/raw_self_type.carbon @@ -60,11 +60,11 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %y.patt: %Self = binding_pattern y // CHECK:STDOUT: %y.param_patt: %Self = value_param_pattern %y.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc24_25: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] -// CHECK:STDOUT: %Self.ref.loc24_34: type = name_ref r#Self, @MemberNamedSelf.%Self.decl [template = constants.%Self] // CHECK:STDOUT: %x.param.loc24: %MemberNamedSelf = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc24_25: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] // CHECK:STDOUT: %x.loc24: %MemberNamedSelf = bind_name x, %x.param.loc24 // CHECK:STDOUT: %y.param.loc24: %Self = value_param runtime_param1 +// CHECK:STDOUT: %Self.ref.loc24_34: type = name_ref r#Self, @MemberNamedSelf.%Self.decl [template = constants.%Self] // CHECK:STDOUT: %y.loc24: %Self = bind_name y, %y.param.loc24 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -87,11 +87,11 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: %y.patt: %Self = binding_pattern y // CHECK:STDOUT: %y.param_patt: %Self = value_param_pattern %y.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc21_11: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] -// CHECK:STDOUT: %Self.ref.loc21_20: type = name_ref r#Self, @MemberNamedSelf.%Self.decl [template = constants.%Self] // CHECK:STDOUT: %x.param.loc21: %MemberNamedSelf = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc21_11: type = name_ref Self, constants.%MemberNamedSelf [template = constants.%MemberNamedSelf] // CHECK:STDOUT: %x.loc21: %MemberNamedSelf = bind_name x, %x.param.loc21 // CHECK:STDOUT: %y.param.loc21: %Self = value_param runtime_param1 +// CHECK:STDOUT: %Self.ref.loc21_20: type = name_ref r#Self, @MemberNamedSelf.%Self.decl [template = constants.%Self] // CHECK:STDOUT: %y.loc21: %Self = bind_name y, %y.param.loc21 // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] @@ -113,16 +113,12 @@ fn MemberNamedSelf.F(x: Self, y: r#Self) {} // CHECK:STDOUT: // CHECK:STDOUT: fn @F.1() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %ptr.loc13: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %Self.var: ref %ptr.1 = var r#Self // CHECK:STDOUT: %Self: ref %ptr.1 = bind_name r#Self, %Self.var -// CHECK:STDOUT: %Self.ref.loc14_12: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %ptr.loc14: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %p.var: ref %ptr.1 = var p // CHECK:STDOUT: %p: ref %ptr.1 = bind_name p, %p.var -// CHECK:STDOUT: %Self.ref.loc14_20: ref %ptr.1 = name_ref r#Self, %Self -// CHECK:STDOUT: %.loc14: %ptr.1 = bind_value %Self.ref.loc14_20 +// CHECK:STDOUT: %Self.ref: ref %ptr.1 = name_ref r#Self, %Self +// CHECK:STDOUT: %.loc14: %ptr.1 = bind_value %Self.ref // CHECK:STDOUT: assign %p.var, %.loc14 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/redeclaration.carbon b/toolchain/check/testdata/class/redeclaration.carbon index e1dfd868b288..beaa82775e7d 100644 --- a/toolchain/check/testdata/class/redeclaration.carbon +++ b/toolchain/check/testdata/class/redeclaration.carbon @@ -50,13 +50,15 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: %b.patt: bool = binding_pattern b // CHECK:STDOUT: %b.param_patt: bool = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc17_27.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] -// CHECK:STDOUT: %.loc17_27.2: type = converted %bool.make_type.loc17, %.loc17_27.1 [template = bool] // CHECK:STDOUT: %self.param.loc17: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc17: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc17: %Class = bind_name self, %self.param.loc17 // CHECK:STDOUT: %b.param.loc17: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc17_27.3: type = splice_block %.loc17_27.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc17: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc17_27.1: type = value_of_initializer %bool.make_type.loc17 [template = bool] +// CHECK:STDOUT: %.loc17_27.2: type = converted %bool.make_type.loc17, %.loc17_27.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b.loc17: bool = bind_name b, %b.param.loc17 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -68,13 +70,15 @@ fn Class.F[self: Self](b: bool) {} // CHECK:STDOUT: %b.patt: bool = binding_pattern b // CHECK:STDOUT: %b.param_patt: bool = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] -// CHECK:STDOUT: %.loc14_23.2: type = converted %bool.make_type.loc14, %.loc14_23.1 [template = bool] // CHECK:STDOUT: %self.param.loc14: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc14: %Class = bind_name self, %self.param.loc14 // CHECK:STDOUT: %b.param.loc14: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc14_23.3: type = splice_block %.loc14_23.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] +// CHECK:STDOUT: %.loc14_23.2: type = converted %bool.make_type.loc14, %.loc14_23.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b.loc14: bool = bind_name b, %b.param.loc14 // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] diff --git a/toolchain/check/testdata/class/reorder_qualified.carbon b/toolchain/check/testdata/class/reorder_qualified.carbon index 1e751bccc03c..0ea2f83557fb 100644 --- a/toolchain/check/testdata/class/reorder_qualified.carbon +++ b/toolchain/check/testdata/class/reorder_qualified.carbon @@ -130,8 +130,6 @@ class A { // CHECK:STDOUT: %B.decl: type = class_decl @B [template = constants.%B] {} {} // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %AF.decl: %AF.type = fn_decl @AF [template = constants.%AF] {} {} -// 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: %.loc46: %A.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.1 [template = constants.%complete_type.6] // CHECK:STDOUT: @@ -146,8 +144,6 @@ class A { // CHECK:STDOUT: class @B { // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: %BF.decl: %BF.type = fn_decl @BF [template = constants.%BF] {} {} -// 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: %.loc16: %B.elem = field_decl b, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -163,8 +159,6 @@ class A { // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %DF.decl: %DF.type = fn_decl @DF [template = constants.%DF] {} {} // CHECK:STDOUT: %CF.decl: %CF.type = fn_decl @CF [template = constants.%CF] {} {} -// 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: %.loc42: %C.elem = field_decl c, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.c.1 [template = constants.%complete_type.5] // CHECK:STDOUT: @@ -179,8 +173,6 @@ class A { // CHECK:STDOUT: class @D { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %DF.decl: %DF.type = fn_decl @DF [template = constants.%DF] {} {} -// 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: %.loc24: %D.elem = field_decl d, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.d.1 [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -198,7 +190,6 @@ class A { // CHECK:STDOUT: // CHECK:STDOUT: fn @DF() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %a.var: ref %A = var 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] @@ -213,7 +204,6 @@ class A { // CHECK:STDOUT: %.loc29_25.5: init %A = class_init (%.loc29_25.4), %a.var [template = constants.%A.val] // CHECK:STDOUT: %.loc29_26: init %A = converted %.loc29_25.1, %.loc29_25.5 [template = constants.%A.val] // CHECK:STDOUT: assign %a.var, %.loc29_26 -// CHECK:STDOUT: %B.ref: type = name_ref B, @A.%B.decl [template = constants.%B] // CHECK:STDOUT: %b.var: ref %B = var b // CHECK:STDOUT: %b: ref %B = bind_name b, %b.var // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] @@ -228,7 +218,6 @@ class A { // CHECK:STDOUT: %.loc30_25.5: init %B = class_init (%.loc30_25.4), %b.var [template = constants.%B.val] // CHECK:STDOUT: %.loc30_26: init %B = converted %.loc30_25.1, %.loc30_25.5 [template = constants.%B.val] // CHECK:STDOUT: assign %b.var, %.loc30_26 -// CHECK:STDOUT: %C.ref: type = name_ref C, @B.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] @@ -243,7 +232,6 @@ class A { // CHECK:STDOUT: %.loc31_25.5: init %C = class_init (%.loc31_25.4), %c.var [template = constants.%C.val] // CHECK:STDOUT: %.loc31_26: init %C = converted %.loc31_25.1, %.loc31_25.5 [template = constants.%C.val] // CHECK:STDOUT: assign %c.var, %.loc31_26 -// CHECK:STDOUT: %D.ref: type = name_ref D, @C.%D.decl [template = constants.%D] // CHECK:STDOUT: %d.var: ref %D = var d // CHECK:STDOUT: %d: ref %D = bind_name d, %d.var // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] diff --git a/toolchain/check/testdata/class/scope.carbon b/toolchain/check/testdata/class/scope.carbon index 37d7a955a74f..c3b19c62027c 100644 --- a/toolchain/check/testdata/class/scope.carbon +++ b/toolchain/check/testdata/class/scope.carbon @@ -150,15 +150,11 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// 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: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %F.ref.loc26: %F.type.2 = name_ref F, file.%F.decl [template = constants.%F.2] // CHECK:STDOUT: %F.call.loc26: init %i32 = call %F.ref.loc26() // CHECK:STDOUT: assign %a.var, %F.call.loc26 -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index eda1353e5c40..25d45957f141 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -78,10 +78,10 @@ class Class { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc11: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc11: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc11: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc11: %Class = bind_name self, %self.param.loc11 // CHECK:STDOUT: %return.param.loc11: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc11: ref %i32 = return_slot %return.param.loc11 @@ -89,15 +89,17 @@ class Class { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc15: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc15_12: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %ptr.loc15: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc15: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_27: type = splice_block %ptr.loc15 [template = constants.%ptr.1] { +// CHECK:STDOUT: %Self.ref.loc15: type = name_ref Self, constants.%Class [template = constants.%Class] +// CHECK:STDOUT: %ptr.loc15: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc15: %ptr.1 = bind_name self, %self.param.loc15 // CHECK:STDOUT: %return.param.loc15: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc15: ref %i32 = return_slot %return.param.loc15 @@ -111,10 +113,10 @@ class Class { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc5: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc5: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc5: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc5: %Class = bind_name self, %self.param.loc5 // CHECK:STDOUT: %return.param.loc5: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc5: ref %i32 = return_slot %return.param.loc5 @@ -122,21 +124,21 @@ class Class { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc15: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc15_12: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %ptr.loc6: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc6: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %ptr.loc6 [template = constants.%ptr.1] { +// CHECK:STDOUT: %Self.ref.loc6: type = name_ref Self, constants.%Class [template = constants.%Class] +// CHECK:STDOUT: %ptr.loc6: type = ptr_type %Class [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc6: %ptr.1 = bind_name self, %self.param.loc6 // CHECK:STDOUT: %return.param.loc6: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc6: ref %i32 = return_slot %return.param.loc6 // CHECK:STDOUT: } -// 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: %.loc8: %Class.elem = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -201,10 +203,10 @@ class Class { // CHECK:STDOUT: %return.patt: = return_slot_pattern // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.ref: %Class = name_ref self, %self // CHECK:STDOUT: %.loc11: type = converted %self.ref, [template = ] // CHECK:STDOUT: %self.param: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self: %Class = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref = out_param runtime_param1 // CHECK:STDOUT: %return: ref = return_slot %return.param diff --git a/toolchain/check/testdata/class/self_conversion.carbon b/toolchain/check/testdata/class/self_conversion.carbon index 93b5fa090ecd..cf4a2b920291 100644 --- a/toolchain/check/testdata/class/self_conversion.carbon +++ b/toolchain/check/testdata/class/self_conversion.carbon @@ -89,10 +89,10 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Base.ref.loc22: type = name_ref Base, file.%Base.decl [template = constants.%Base] // 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: %self.param.loc22: %Base = value_param runtime_param0 +// CHECK:STDOUT: %Base.ref.loc22: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %self.loc22: %Base = bind_name self, %self.param.loc22 // CHECK:STDOUT: %return.param.loc22: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc22: ref %i32 = return_slot %return.param.loc22 @@ -100,11 +100,13 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc26: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc26_25: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Base.ref.loc26: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %ptr.loc26: type = ptr_type %Base [template = constants.%ptr.2] // CHECK:STDOUT: %self.param.loc26: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc26_40: type = splice_block %ptr.loc26 [template = constants.%ptr.2] { +// CHECK:STDOUT: %Base.ref.loc26: type = name_ref Base, file.%Base.decl [template = constants.%Base] +// CHECK:STDOUT: %ptr.loc26: type = ptr_type %Base [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc26: %ptr.2 = bind_name self, %self.param.loc26 // CHECK:STDOUT: } // CHECK:STDOUT: %Call.decl: %Call.type = fn_decl @Call [template = constants.%Call] { @@ -113,11 +115,13 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] -// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] // 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: %p.param: %ptr.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.3] { +// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [template = constants.%Derived] +// CHECK:STDOUT: %ptr: type = ptr_type %Derived [template = constants.%ptr.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -125,8 +129,6 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// 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: %.loc12: %Base.elem = field_decl a, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -145,10 +147,10 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Base.ref.loc18: type = name_ref Base, file.%Base.decl [template = constants.%Base] // 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: %self.param.loc18: %Base = value_param runtime_param0 +// CHECK:STDOUT: %Base.ref.loc18: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %self.loc18: %Base = bind_name self, %self.param.loc18 // CHECK:STDOUT: %return.param.loc18: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc18: ref %i32 = return_slot %return.param.loc18 @@ -156,11 +158,13 @@ fn Call(p: Derived*) -> i32 { // CHECK:STDOUT: %AddrSelfBase.decl: %AddrSelfBase.type = fn_decl @AddrSelfBase [template = constants.%AddrSelfBase] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc26: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc26_25: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %Base.ref.loc19: type = name_ref Base, file.%Base.decl [template = constants.%Base] -// CHECK:STDOUT: %ptr.loc19: type = ptr_type %Base [template = constants.%ptr.2] // CHECK:STDOUT: %self.param.loc19: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19: type = splice_block %ptr.loc19 [template = constants.%ptr.2] { +// CHECK:STDOUT: %Base.ref.loc19: type = name_ref Base, file.%Base.decl [template = constants.%Base] +// CHECK:STDOUT: %ptr.loc19: type = ptr_type %Base [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc19: %ptr.2 = bind_name self, %self.param.loc19 // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.base.1 [template = constants.%complete_type.4] diff --git a/toolchain/check/testdata/class/self_type.carbon b/toolchain/check/testdata/class/self_type.carbon index 31ff802a5992..fc7227e9b72e 100644 --- a/toolchain/check/testdata/class/self_type.carbon +++ b/toolchain/check/testdata/class/self_type.carbon @@ -59,10 +59,10 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param.loc21: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc21: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc21: %Class = bind_name self, %self.param.loc21 // CHECK:STDOUT: %return.param.loc21: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc21: ref %i32 = return_slot %return.param.loc21 @@ -76,10 +76,10 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // 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: %self.param.loc12: %Class = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc12: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %self.loc12: %Class = bind_name self, %self.param.loc12 // CHECK:STDOUT: %return.param.loc12: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc12: ref %i32 = return_slot %return.param.loc12 @@ -88,12 +88,10 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: %return.patt: %Class = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %Class = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%Class [template = constants.%Class] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %return.param: ref %Class = out_param runtime_param0 // CHECK:STDOUT: %return: ref %Class = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%Class [template = constants.%Class] -// CHECK:STDOUT: %ptr: type = ptr_type %Class [template = constants.%ptr.1] // CHECK:STDOUT: %.loc18: %Class.elem = field_decl p, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.p [template = constants.%complete_type.2] // CHECK:STDOUT: @@ -123,7 +121,6 @@ fn Class.F[self: Self]() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Make() -> %return.param_patt: %Class { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, constants.%Class [template = constants.%Class] // CHECK:STDOUT: %s: ref %Class = bind_name s, %return // CHECK:STDOUT: %s.ref.loc15_5: ref %Class = name_ref s, %s // CHECK:STDOUT: %s.ref.loc15_16: ref %Class = name_ref s, %s diff --git a/toolchain/check/testdata/class/static_method.carbon b/toolchain/check/testdata/class/static_method.carbon index 1f533238d107..d74b9726f36f 100644 --- a/toolchain/check/testdata/class/static_method.carbon +++ b/toolchain/check/testdata/class/static_method.carbon @@ -82,7 +82,6 @@ fn Run() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Class.ref: type = name_ref Class, file.%Class.decl [template = constants.%Class] // CHECK:STDOUT: %c.var: ref %Class = var c // CHECK:STDOUT: %c: ref %Class = bind_name c, %c.var // CHECK:STDOUT: %c.ref: ref %Class = name_ref c, %c diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index f29cab40ed0e..2e36a324be45 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -78,41 +78,47 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt.loc4_9.1: %i32 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc4_9.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt.loc4_9.1, runtime_param [symbolic = %a.patt.loc4_9.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a.loc4_9.1: %i32 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc4_9.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl.loc5: %D.type = class_decl @D [template = constants.%D.generic] { // CHECK:STDOUT: %b.patt.loc6: %C.2 = symbolic_binding_pattern b, 0 [symbolic = constants.%b.patt] // CHECK:STDOUT: %b.param_patt: %C.2 = value_param_pattern %b.patt.loc6, runtime_param [symbolic = constants.%b.patt] // CHECK:STDOUT: } { -// 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.5, element0 [template = constants.%Convert.10] -// 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] -// CHECK:STDOUT: %.loc5_20.1: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%int_1000.2] -// CHECK:STDOUT: %.loc5_20.2: %i32 = converted %int_1000.loc5, %.loc5_20.1 [template = constants.%int_1000.2] -// CHECK:STDOUT: %C.loc5: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] // CHECK:STDOUT: %b.param.loc5: %C.2 = value_param runtime_param +// CHECK:STDOUT: %.loc5_20.3: 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.5, element0 [template = constants.%Convert.10] +// 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] +// CHECK:STDOUT: %.loc5_20.1: %i32 = value_of_initializer %int.convert_checked.loc5 [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc5_20.2: %i32 = converted %int_1000.loc5, %.loc5_20.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %C.loc5: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %b.loc5_9.1: %C.2 = bind_symbolic_name b, 0, %b.param.loc5 [symbolic = %b.loc5_9.2 (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl.loc6: %D.type = class_decl @D [template = constants.%D.generic] { // CHECK:STDOUT: %b.patt.loc6: %C.2 = symbolic_binding_pattern b, 0 [symbolic = constants.%b.patt] // CHECK:STDOUT: %b.param_patt: %C.2 = value_param_pattern %b.patt.loc6, runtime_param [symbolic = constants.%b.patt] // CHECK:STDOUT: } { -// 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.5, element0 [template = constants.%Convert.10] -// 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] -// CHECK:STDOUT: %.loc6_20.1: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%int_1000.2] -// CHECK:STDOUT: %.loc6_20.2: %i32 = converted %int_1000.loc6, %.loc6_20.1 [template = constants.%int_1000.2] -// CHECK:STDOUT: %C.loc6: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] // CHECK:STDOUT: %b.param.loc6: %C.2 = value_param runtime_param +// CHECK:STDOUT: %.loc6_20.3: 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.5, element0 [template = constants.%Convert.10] +// 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] +// CHECK:STDOUT: %.loc6_20.1: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc6_20.2: %i32 = converted %int_1000.loc6, %.loc6_20.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %C.loc6: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %b.loc6: %C.2 = bind_symbolic_name b, 0, %b.param.loc6 [symbolic = constants.%b] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -212,41 +218,47 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: %a.patt.loc4_9.1: %i32 = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc4_9.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt.loc4_9.1, runtime_param [symbolic = %a.patt.loc4_9.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a.loc4_9.1: %i32 = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc4_9.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = class_decl @D [template = constants.%D.generic] { // CHECK:STDOUT: %b.patt.loc5_9.1: %C.2 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc5_9.2 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %C.2 = value_param_pattern %b.patt.loc5_9.1, runtime_param [symbolic = %b.patt.loc5_9.2 (constants.%b.patt)] // CHECK:STDOUT: } { -// 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.5, element0 [template = constants.%Convert.10] -// 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] -// CHECK:STDOUT: %.loc5_19.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1000.2] -// CHECK:STDOUT: %.loc5_19.2: %i32 = converted %int_1000, %.loc5_19.1 [template = constants.%int_1000.2] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] // CHECK:STDOUT: %b.param: %C.2 = value_param runtime_param +// CHECK:STDOUT: %.loc5_19.3: 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.5, element0 [template = constants.%Convert.10] +// 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] +// CHECK:STDOUT: %.loc5_19.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc5_19.2: %i32 = converted %int_1000, %.loc5_19.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %b.loc5_9.1: %C.2 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc5_9.2 (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = class_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %b.patt.loc12_9.1: %C.2 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc12_9.2 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %C.2 = value_param_pattern %b.patt.loc12_9.1, runtime_param [symbolic = %b.patt.loc12_9.2 (constants.%b.patt)] // CHECK:STDOUT: } { -// 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.5, element0 [template = constants.%Convert.10] -// 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] -// CHECK:STDOUT: %.loc12_20.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1000.2] -// CHECK:STDOUT: %.loc12_20.2: %i32 = converted %int_1000, %.loc12_20.1 [template = constants.%int_1000.2] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] // CHECK:STDOUT: %b.param: %C.2 = value_param runtime_param +// CHECK:STDOUT: %.loc12_20.3: 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.5, element0 [template = constants.%Convert.10] +// 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] +// CHECK:STDOUT: %.loc12_20.1: %i32 = value_of_initializer %int.convert_checked [template = constants.%int_1000.2] +// CHECK:STDOUT: %.loc12_20.2: %i32 = converted %int_1000, %.loc12_20.1 [template = constants.%int_1000.2] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%int_1000.2) [template = constants.%C.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %b.loc12_9.1: %C.2 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc12_9.2 (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/todo_access_modifiers.carbon b/toolchain/check/testdata/class/todo_access_modifiers.carbon index 5ca3193059b6..ff55c85f8c30 100644 --- a/toolchain/check/testdata/class/todo_access_modifiers.carbon +++ b/toolchain/check/testdata/class/todo_access_modifiers.carbon @@ -54,11 +54,7 @@ class Access { // CHECK:STDOUT: class @Access { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {} {} -// 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: %.loc17: %Access.elem = field_decl k, element0 [template] -// 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: %.loc19: %Access.elem = field_decl l, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.k.l [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index 2e9bca9f2075..ef3ca23227d6 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -266,7 +266,6 @@ class Derived { // CHECK:STDOUT: .Base = %import_ref.1 // CHECK:STDOUT: import Modifiers//default // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Modifiers//default, Base, loaded [template = constants.%Base] // CHECK:STDOUT: %import_ref.2: = import_ref Modifiers//default, loc6_1, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Modifiers//default, inst16 [no loc], unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Modifiers//default, loc5_17, unloaded @@ -292,8 +291,6 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Modifiers.ref: = name_ref Modifiers, imports.%Modifiers [template = imports.%Modifiers] -// CHECK:STDOUT: %Base.ref: type = name_ref Base, imports.%import_ref.1 [template = constants.%Base] // CHECK:STDOUT: %v.var: ref %Base = var v // CHECK:STDOUT: %v: ref %Base = bind_name v, %v.var // CHECK:STDOUT: %.loc7_28.1: %empty_struct_type = struct_literal () @@ -550,11 +547,7 @@ class Derived { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Base { -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc5: %Base.elem = field_decl m1, element1 [template] -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc6: %Base.elem = field_decl m2, element2 [template] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] {} {} // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.vptr.m1.m2 [template = constants.%complete_type.3] @@ -571,8 +564,6 @@ class Derived { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: -// 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: %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] @@ -582,7 +573,6 @@ class Derived { // CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %Convert.specific_fn.loc12(%int_3.loc12) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc12: init %i32 = converted %int_3.loc12, %int.convert_checked.loc12 [template = constants.%int_3.2] // CHECK:STDOUT: assign %i.var, %.loc12 -// CHECK:STDOUT: %Base.ref.loc14: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %b1.var: ref %Base = var b1 // CHECK:STDOUT: %b1: ref %Base = bind_name b1, %b1.var // CHECK:STDOUT: %i.ref.loc14_25: ref %i32 = name_ref i, %i @@ -600,7 +590,6 @@ class Derived { // CHECK:STDOUT: %.loc14_35.9: init %Base = class_init (%.loc14_35.4, %.loc14_35.6, %.loc14_35.8), %b1.var // CHECK:STDOUT: %.loc14_36: init %Base = converted %.loc14_35.1, %.loc14_35.9 // CHECK:STDOUT: assign %b1.var, %.loc14_36 -// CHECK:STDOUT: %Base.ref.loc15: type = name_ref Base, file.%Base.decl [template = constants.%Base] // CHECK:STDOUT: %b2.var: ref %Base = var b2 // CHECK:STDOUT: %b2: ref %Base = bind_name b2, %b2.var // CHECK:STDOUT: %int_3.loc15: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] diff --git a/toolchain/check/testdata/const/basic.carbon b/toolchain/check/testdata/const/basic.carbon index 7d9ac7c06746..61b7489f559e 100644 --- a/toolchain/check/testdata/const/basic.carbon +++ b/toolchain/check/testdata/const/basic.carbon @@ -53,17 +53,19 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %const.loc11_9: type = const_type %i32 [template = constants.%const.1] -// CHECK:STDOUT: %ptr.loc11_18: type = ptr_type %const.1 [template = constants.%ptr.1] -// CHECK:STDOUT: %ptr.loc11_19: type = ptr_type %ptr.1 [template = constants.%ptr.2] // CHECK:STDOUT: %int_32.loc11_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc11_25: type = const_type %i32 [template = constants.%const.1] // CHECK:STDOUT: %ptr.loc11_34: type = ptr_type %const.1 [template = constants.%ptr.1] // CHECK:STDOUT: %ptr.loc11_35: type = ptr_type %ptr.1 [template = constants.%ptr.2] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %ptr.loc11_19 [template = constants.%ptr.2] { +// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %const.loc11_9: type = const_type %i32 [template = constants.%const.1] +// CHECK:STDOUT: %ptr.loc11_18: type = ptr_type %const.1 [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.loc11_19: type = ptr_type %ptr.1 [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param @@ -74,15 +76,17 @@ fn B(p: const (i32*)) -> const (i32*) { // CHECK:STDOUT: %return.patt: %const.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %const.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc15_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc15_19: type = ptr_type %i32 [template = constants.%ptr.3] -// CHECK:STDOUT: %const.loc15_9: type = const_type %ptr.3 [template = constants.%const.2] // CHECK:STDOUT: %int_32.loc15_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc15_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc15_36: type = ptr_type %i32 [template = constants.%ptr.3] // CHECK:STDOUT: %const.loc15_26: type = const_type %ptr.3 [template = constants.%const.2] // CHECK:STDOUT: %p.param: %const.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc15: type = splice_block %const.loc15_9 [template = constants.%const.2] { +// CHECK:STDOUT: %int_32.loc15_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc15_19: type = ptr_type %i32 [template = constants.%ptr.3] +// CHECK:STDOUT: %const.loc15_9: type = const_type %ptr.3 [template = constants.%const.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %const.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %const.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %const.2 = return_slot %return.param diff --git a/toolchain/check/testdata/const/collapse.carbon b/toolchain/check/testdata/const/collapse.carbon index 78a508b4f57c..8dc710744198 100644 --- a/toolchain/check/testdata/const/collapse.carbon +++ b/toolchain/check/testdata/const/collapse.carbon @@ -48,11 +48,6 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %const.loc15_9: type = const_type %i32 [template = constants.%const] -// CHECK:STDOUT: %ptr.loc15_18: type = ptr_type %const [template = constants.%ptr.1] -// CHECK:STDOUT: %ptr.loc15_19: type = ptr_type %ptr.1 [template = constants.%ptr.2] // CHECK:STDOUT: %int_32.loc15_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc15_38: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc15_32: type = const_type %i32 [template = constants.%const] @@ -60,6 +55,13 @@ fn F(p: const i32**) -> const (const i32)** { // CHECK:STDOUT: %ptr.loc15_42: type = ptr_type %const [template = constants.%ptr.1] // CHECK:STDOUT: %ptr.loc15_43: type = ptr_type %ptr.1 [template = constants.%ptr.2] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc15: type = splice_block %ptr.loc15_19 [template = constants.%ptr.2] { +// CHECK:STDOUT: %int_32.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %const.loc15_9: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %ptr.loc15_18: type = ptr_type %const [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.loc15_19: type = ptr_type %ptr.1 [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param diff --git a/toolchain/check/testdata/const/fail_collapse.carbon b/toolchain/check/testdata/const/fail_collapse.carbon index 9a2ca3f3f0e8..45eaddef75c1 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -57,17 +57,19 @@ fn G(p: const (const i32)**) -> i32** { // CHECK:STDOUT: %return.patt: %ptr.4 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.4 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %const.loc15_16: type = const_type %i32 [template = constants.%const] -// CHECK:STDOUT: %const.loc15_9: type = const_type %const [template = constants.%const] -// CHECK:STDOUT: %ptr.loc15_26: type = ptr_type %const [template = constants.%ptr.1] -// CHECK:STDOUT: %ptr.loc15_27: type = ptr_type %ptr.1 [template = constants.%ptr.2] // CHECK:STDOUT: %int_32.loc15_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc15_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc15_36: type = ptr_type %i32 [template = constants.%ptr.3] // CHECK:STDOUT: %ptr.loc15_37: type = ptr_type %ptr.3 [template = constants.%ptr.4] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc15: type = splice_block %ptr.loc15_27 [template = constants.%ptr.2] { +// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %const.loc15_16: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %const.loc15_9: type = const_type %const [template = constants.%const] +// CHECK:STDOUT: %ptr.loc15_26: type = ptr_type %const [template = constants.%ptr.1] +// CHECK:STDOUT: %ptr.loc15_27: type = ptr_type %ptr.1 [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.4 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.4 = return_slot %return.param diff --git a/toolchain/check/testdata/const/import.carbon b/toolchain/check/testdata/const/import.carbon index 6542ef866492..d6081fd8ab91 100644 --- a/toolchain/check/testdata/const/import.carbon +++ b/toolchain/check/testdata/const/import.carbon @@ -63,15 +63,8 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: %return.param: ref %const = out_param runtime_param0 // CHECK:STDOUT: %return: ref %const = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %const.loc6: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %a_ref.var: ref %const = var a_ref // CHECK:STDOUT: %a_ref: ref %const = bind_name a_ref, %a_ref.var -// 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: %const.loc7: type = const_type %i32 [template = constants.%const] -// CHECK:STDOUT: %ptr: type = ptr_type %const [template = constants.%ptr] // CHECK:STDOUT: %a_ptr_ref.var: ref %ptr = var a_ptr_ref // CHECK:STDOUT: %a_ptr_ref: ref %ptr = bind_name a_ptr_ref, %a_ptr_ref.var // CHECK:STDOUT: } @@ -121,16 +114,8 @@ var a_ptr: const i32* = a_ptr_ref; // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %const.loc6: type = const_type %i32 [template = constants.%const] -// CHECK:STDOUT: %ptr.loc6: type = ptr_type %const [template = constants.%ptr] // CHECK:STDOUT: %a.var: ref %ptr = var a // CHECK:STDOUT: %a: ref %ptr = bind_name a, %a.var -// 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: %const.loc7: type = const_type %i32 [template = constants.%const] -// CHECK:STDOUT: %ptr.loc7: type = ptr_type %const [template = constants.%ptr] // CHECK:STDOUT: %a_ptr.var: ref %ptr = var a_ptr // CHECK:STDOUT: %a_ptr: ref %ptr = bind_name a_ptr, %a_ptr.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index 7d54e8d6624a..d9b8fd354ac2 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -159,13 +159,15 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_20: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type.loc6_24.1: type = array_type %int_3, %T [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] // CHECK:STDOUT: %T.ref.loc6_30: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %a.param: @F.%array_type.loc6_24.2 (%array_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_24: type = splice_block %array_type.loc6_24.1 [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] { +// CHECK:STDOUT: %T.ref.loc6_20: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %array_type.loc6_24.1: type = array_type %int_3, %T [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%array_type.loc6_24.2 (%array_type.1) = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param @@ -174,7 +176,7 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } @@ -218,9 +220,6 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return.param_patt: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc9: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template = constants.%array_type.2] // CHECK:STDOUT: %a.var: ref %array_type.2 = var a // CHECK:STDOUT: %a: ref %array_type.2 = bind_name a, %a.var // CHECK:STDOUT: %.loc9_21.1: %empty_struct_type = struct_literal () @@ -324,22 +323,26 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc10_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.2)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] -// 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)] -// CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_22.2: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %array_type: type = array_type %.loc10_22.2, %C [template = ] // CHECK:STDOUT: %int_32.loc10_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc10_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc10_10: type = splice_block %i32.loc10_10 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc10_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc10_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc10_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.2)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 +// 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.5, element0 [template = constants.%Convert.9] +// 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)] +// CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc10_22.2: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type: type = array_type %.loc10_22.2, %C [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -348,7 +351,7 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc12: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } @@ -380,9 +383,6 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return.param_patt: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: %.loc13_21.1: %empty_struct_type = struct_literal () @@ -478,23 +478,27 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: @F.%T.loc10_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc10_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %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.5, element0 [template = constants.%Convert.9] -// 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)] -// CHECK:STDOUT: %.loc10_32.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_32.2: Core.IntLiteral = converted %N.ref, %.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %array_type: type = array_type %.loc10_32.2, %T [template = ] // CHECK:STDOUT: %T.ref.loc10_39: type = name_ref T, %T.loc10_6.1 [symbolic = %T.loc10_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_6.2 (constants.%T)] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc10_20: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc10_16.1: %i32 = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc10_16.2 (constants.%N.2)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 +// 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.5, element0 [template = constants.%Convert.9] +// 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)] +// CHECK:STDOUT: %.loc10_32.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc10_32.2: Core.IntLiteral = converted %N.ref, %.loc10_32.1 [symbolic = %int.convert_checked.loc10_32.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type: type = array_type %.loc10_32.2, %T [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc10_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc10_6.2 (%T) = return_slot %return.param @@ -503,7 +507,7 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc12: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } @@ -531,9 +535,6 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return.param_patt: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc13: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: %.loc13_21.1: %empty_struct_type = struct_literal () @@ -633,13 +634,15 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_20: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %array_type.loc6_24.1: type = array_type %int_2, %T [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] // CHECK:STDOUT: %T.ref.loc6_30: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %a.param: @F.%array_type.loc6_24.2 (%array_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_24: type = splice_block %array_type.loc6_24.1 [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] { +// CHECK:STDOUT: %T.ref.loc6_20: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %array_type.loc6_24.1: type = array_type %int_2, %T [symbolic = %array_type.loc6_24.2 (constants.%array_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: @F.%array_type.loc6_24.2 (%array_type.1) = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param @@ -648,7 +651,7 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } @@ -692,9 +695,6 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return.param_patt: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc10: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %C [template = constants.%array_type.2] // CHECK:STDOUT: %a.var: ref %array_type.2 = var a // CHECK:STDOUT: %a: ref %array_type.2 = bind_name a, %a.var // CHECK:STDOUT: %.loc10_21.1: %empty_struct_type = struct_literal () @@ -801,22 +801,26 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc10_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %N.ref.loc10_22: %i32 = name_ref N, %N.loc10_6.1 [symbolic = %N.loc10_6.2 (constants.%N.2)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] -// 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)] -// CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc10_22.2: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %array_type: type = array_type %.loc10_22.2, %C [template = ] // CHECK:STDOUT: %int_32.loc10_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc10_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc10_10: type = splice_block %i32.loc10_10 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc10_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc10_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc10_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_6.2 (constants.%N.2)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 +// 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.5, element0 [template = constants.%Convert.9] +// 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)] +// CHECK:STDOUT: %.loc10_22.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc10_22.2: Core.IntLiteral = converted %N.ref.loc10_22, %.loc10_22.1 [symbolic = %int.convert_checked.loc10_22.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type: type = array_type %.loc10_22.2, %C [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -865,9 +869,6 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return.param_patt: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %D [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: %.loc13_21.1: %empty_struct_type = struct_literal () diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 922bfd13ba06..d8a71a4c888f 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -119,13 +119,15 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: @F.%T.loc7_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc7_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %T.ref.loc7_21: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %C.loc7_22.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_22.2 (constants.%C.1)] // CHECK:STDOUT: %T.ref.loc7_28: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%C.loc7_22.2 (%C.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_22: type = splice_block %C.loc7_22.1 [symbolic = %C.loc7_22.2 (constants.%C.1)] { +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %T.ref.loc7_21: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] +// CHECK:STDOUT: %C.loc7_22.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_22.2 (constants.%C.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: @F.%C.loc7_22.2 (%C.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc7_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc7_6.2 (%T) = return_slot %return.param @@ -136,11 +138,13 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %D.ref.loc9_11: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%D) [template = constants.%C.2] // CHECK:STDOUT: %D.ref.loc9_18: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %p.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_12: 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: %D.ref.loc9_11: type = name_ref D, file.%D.decl [template = constants.%D] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%D) [template = constants.%C.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %C.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -197,8 +201,8 @@ fn G() -> i32 { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: %C.2 = name_ref p, %p // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%D) [template = constants.%F.specific_fn.2] -// CHECK:STDOUT: %.loc9: ref %D = splice_block %return {} -// CHECK:STDOUT: %F.call: init %D = call %F.specific_fn(%p.ref) to %.loc9 +// CHECK:STDOUT: %.loc9_15: ref %D = splice_block %return {} +// CHECK:STDOUT: %F.call: init %D = call %F.specific_fn(%p.ref) to %.loc9_15 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -295,13 +299,15 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I.generic] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %I.loc7_22.1: type = class_type @I, @I(constants.%T) [symbolic = %I.loc7_22.2 (constants.%I.1)] // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%I.loc7_22.2 (%I.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_22: type = splice_block %I.loc7_22.1 [symbolic = %I.loc7_22.2 (constants.%I.1)] { +// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I.generic] +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] +// CHECK:STDOUT: %I.loc7_22.1: type = class_type @I, @I(constants.%T) [symbolic = %I.loc7_22.2 (constants.%I.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: @F.%I.loc7_22.2 (%I.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -312,11 +318,13 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I.generic] -// CHECK:STDOUT: %C.ref.loc9_11: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %I: type = class_type @I, @I(constants.%C) [template = constants.%I.2] // CHECK:STDOUT: %C.ref.loc9_18: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %p.param: %I.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_12: type = splice_block %I [template = constants.%I.2] { +// CHECK:STDOUT: %I.ref: %I.type = name_ref I, file.%I.decl [template = constants.%I.generic] +// CHECK:STDOUT: %C.ref.loc9_11: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %I: type = class_type @I, @I(constants.%C) [template = constants.%I.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %I.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -360,8 +368,8 @@ fn G() -> i32 { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: @F.%I.loc7_22.2 (%I.1) = name_ref p, %p // CHECK:STDOUT: %F.specific_fn.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %F.specific_fn.loc7_39.2 (constants.%F.specific_fn.1)] -// CHECK:STDOUT: %.loc7: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn.loc7_39.1(%p.ref) to %.loc7 +// CHECK:STDOUT: %.loc7_25: ref %C = splice_block %return {} +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn.loc7_39.1(%p.ref) to %.loc7_25 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -371,8 +379,8 @@ fn G() -> i32 { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: %I.2 = name_ref p, %p // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [template = constants.%F.specific_fn.2] -// CHECK:STDOUT: %.loc9: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc9 +// CHECK:STDOUT: %.loc9_15: ref %C = splice_block %return {} +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc9_15 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -488,13 +496,6 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: @F.%tuple.type (%tuple.type.2) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%tuple.type (%tuple.type.2) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.generic] -// CHECK:STDOUT: %T.ref.loc13_35: type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] -// CHECK:STDOUT: %Outer.loc13_36.1: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc13_36.2 (constants.%Outer.1)] -// CHECK:STDOUT: %.loc13_37: @F.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.1)] -// CHECK:STDOUT: %Inner.ref: @F.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc13_37 [symbolic = %Inner.generic (constants.%Inner.generic.1)] -// CHECK:STDOUT: %U.ref.loc13_44: type = name_ref U, %U.loc13_16.1 [symbolic = %U.loc13_16.2 (constants.%U)] -// CHECK:STDOUT: %Inner.loc13_45.1: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_45.2 (constants.%Inner.1)] // CHECK:STDOUT: %T.ref.loc13_52: type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] // CHECK:STDOUT: %U.ref.loc13_55: type = name_ref U, %U.loc13_16.1 [symbolic = %U.loc13_16.2 (constants.%U)] // CHECK:STDOUT: %.loc13_56.1: %tuple.type.1 = tuple_literal (%T.ref.loc13_52, %U.ref.loc13_55) @@ -504,6 +505,15 @@ fn G() -> i32 { // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc13_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc13_16.2 (constants.%U)] // CHECK:STDOUT: %p.param: @F.%Inner.loc13_45.2 (%Inner.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_45: type = splice_block %Inner.loc13_45.1 [symbolic = %Inner.loc13_45.2 (constants.%Inner.1)] { +// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.generic] +// CHECK:STDOUT: %T.ref.loc13_35: type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] +// CHECK:STDOUT: %Outer.loc13_36.1: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc13_36.2 (constants.%Outer.1)] +// CHECK:STDOUT: %.loc13_37: @F.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.generic (constants.%Inner.generic.1)] +// CHECK:STDOUT: %Inner.ref: @F.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc13_37 [symbolic = %Inner.generic (constants.%Inner.generic.1)] +// CHECK:STDOUT: %U.ref.loc13_44: type = name_ref U, %U.loc13_16.1 [symbolic = %U.loc13_16.2 (constants.%U)] +// CHECK:STDOUT: %Inner.loc13_45.1: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_45.2 (constants.%Inner.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: @F.%Inner.loc13_45.2 (%Inner.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%tuple.type (%tuple.type.2) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%tuple.type (%tuple.type.2) = return_slot %return.param @@ -514,18 +524,20 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %tuple.type.3 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %tuple.type.3 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.generic] -// CHECK:STDOUT: %C.ref.loc15_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %Outer: type = class_type @Outer, @Outer(constants.%C) [template = constants.%Outer.2] -// CHECK:STDOUT: %.loc15_17: %Inner.type.2 = specific_constant @Outer.%Inner.decl, @Outer(constants.%C) [template = constants.%Inner.generic.2] -// CHECK:STDOUT: %Inner.ref: %Inner.type.2 = name_ref Inner, %.loc15_17 [template = constants.%Inner.generic.2] -// CHECK:STDOUT: %D.ref.loc15_24: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%C, constants.%D) [template = constants.%Inner.2] // CHECK:STDOUT: %C.ref.loc15_32: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %D.ref.loc15_35: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %.loc15_36.1: %tuple.type.1 = tuple_literal (%C.ref.loc15_32, %D.ref.loc15_35) // CHECK:STDOUT: %.loc15_36.2: type = converted %.loc15_36.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %p.param: %Inner.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_25: type = splice_block %Inner [template = constants.%Inner.2] { +// CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.generic] +// CHECK:STDOUT: %C.ref.loc15_15: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %Outer: type = class_type @Outer, @Outer(constants.%C) [template = constants.%Outer.2] +// CHECK:STDOUT: %.loc15_17: %Inner.type.2 = specific_constant @Outer.%Inner.decl, @Outer(constants.%C) [template = constants.%Inner.generic.2] +// CHECK:STDOUT: %Inner.ref: %Inner.type.2 = name_ref Inner, %.loc15_17 [template = constants.%Inner.generic.2] +// CHECK:STDOUT: %D.ref.loc15_24: type = name_ref D, file.%D.decl [template = constants.%D] +// CHECK:STDOUT: %Inner: type = class_type @Inner, @Inner(constants.%C, constants.%D) [template = constants.%Inner.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %Inner.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %tuple.type.3 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %tuple.type.3 = return_slot %return.param @@ -770,9 +782,11 @@ fn G() -> i32 { // CHECK:STDOUT: %N.patt.loc4_19.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.2)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc4_19.1, runtime_param [symbolic = %N.patt.loc4_19.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { -// 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: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc4: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc4_19.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_19.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { @@ -783,16 +797,20 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.generic] -// CHECK:STDOUT: %N.ref.loc6_30: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.2)] -// CHECK:STDOUT: %WithNontype.loc6_31.1: type = class_type @WithNontype, @WithNontype(constants.%N.2) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.1)] // CHECK:STDOUT: %int_32.loc6_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc6_10: type = splice_block %i32.loc6_10 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc6_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_6.2 (constants.%N.2)] // CHECK:STDOUT: %x.param: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_31: type = splice_block %WithNontype.loc6_31.1 [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.1)] { +// CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.generic] +// CHECK:STDOUT: %N.ref.loc6_30: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.2)] +// CHECK:STDOUT: %WithNontype.loc6_31.1: type = class_type @WithNontype, @WithNontype(constants.%N.2) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.%WithNontype.loc6_31.2 (%WithNontype.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index e6fefe00175b..1d4a1598e016 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -84,23 +84,27 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Core.ref.loc4_10: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %IntLiteral.ref.loc4_14: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type.loc4_26: init type = call %IntLiteral.ref.loc4_14() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_26.1: type = value_of_initializer %int_literal.make_type.loc4_26 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_26.2: type = converted %int_literal.make_type.loc4_26, %.loc4_26.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %Core.ref.loc4_32: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int.generic] -// CHECK:STDOUT: %N.ref.loc4: Core.IntLiteral = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] -// CHECK:STDOUT: %Int.loc4_42.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc4_42.2 (constants.%Int)] // CHECK:STDOUT: %Core.ref.loc4_48: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref.loc4_52: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type.loc4_64: init type = call %IntLiteral.ref.loc4_52() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc4_64.1: type = value_of_initializer %int_literal.make_type.loc4_64 [template = Core.IntLiteral] // CHECK:STDOUT: %.loc4_64.2: type = converted %int_literal.make_type.loc4_64, %.loc4_64.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param +// CHECK:STDOUT: %.loc4_26.3: type = splice_block %.loc4_26.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %Core.ref.loc4_10: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref.loc4_14: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type.loc4_26: init type = call %IntLiteral.ref.loc4_14() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc4_26.1: type = value_of_initializer %int_literal.make_type.loc4_26 [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc4_26.2: type = converted %int_literal.make_type.loc4_26, %.loc4_26.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc4_6.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_6.2 (constants.%N)] // CHECK:STDOUT: %n.param: @F.%Int.loc4_42.2 (%Int) = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_42: type = splice_block %Int.loc4_42.1 [symbolic = %Int.loc4_42.2 (constants.%Int)] { +// CHECK:STDOUT: %Core.ref.loc4_32: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int.generic] +// CHECK:STDOUT: %N.ref.loc4: Core.IntLiteral = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] +// CHECK:STDOUT: %Int.loc4_42.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc4_42.2 (constants.%Int)] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: @F.%Int.loc4_42.2 (%Int) = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -111,14 +115,16 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_33.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_33.2: type = converted %int_literal.make_type, %.loc8_33.1 [template = Core.IntLiteral] // CHECK:STDOUT: %a.param: %i64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_9: type = splice_block %i64 [template = constants.%i64] { +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [template = constants.%i64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -208,25 +214,29 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Core.ref.loc8_10: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %IntLiteral.ref.loc8_14: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type.loc8_26: init type = call %IntLiteral.ref.loc8_14() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_26.1: type = value_of_initializer %int_literal.make_type.loc8_26 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_26.2: type = converted %int_literal.make_type.loc8_26, %.loc8_26.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %Core.ref.loc8_32: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.2 [template = constants.%Float] -// CHECK:STDOUT: %N.ref.loc8: Core.IntLiteral = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)] -// CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%N.ref.loc8) -// CHECK:STDOUT: %.loc8_44.1: type = value_of_initializer %float.make_type -// CHECK:STDOUT: %.loc8_44.2: type = converted %float.make_type, %.loc8_44.1 // CHECK:STDOUT: %Core.ref.loc8_50: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref.loc8_54: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type.loc8_66: init type = call %IntLiteral.ref.loc8_54() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_66.1: type = value_of_initializer %int_literal.make_type.loc8_66 [template = Core.IntLiteral] // CHECK:STDOUT: %.loc8_66.2: type = converted %int_literal.make_type.loc8_66, %.loc8_66.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param +// CHECK:STDOUT: %.loc8_26.3: type = splice_block %.loc8_26.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %Core.ref.loc8_10: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref.loc8_14: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type.loc8_26: init type = call %IntLiteral.ref.loc8_14() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc8_26.1: type = value_of_initializer %int_literal.make_type.loc8_26 [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc8_26.2: type = converted %int_literal.make_type.loc8_26, %.loc8_26.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc8_6.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc8_6.2 (constants.%N)] // CHECK:STDOUT: %n.param: = value_param runtime_param0 +// CHECK:STDOUT: %.1: = splice_block [template = ] { +// CHECK:STDOUT: %Core.ref.loc8_32: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.2 [template = constants.%Float] +// CHECK:STDOUT: %N.ref.loc8: Core.IntLiteral = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)] +// CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%N.ref.loc8) +// CHECK:STDOUT: %.loc8_44.1: type = value_of_initializer %float.make_type +// CHECK:STDOUT: %.loc8_44.2: type = converted %float.make_type, %.loc8_44.1 +// CHECK:STDOUT: } // CHECK:STDOUT: %n: = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -237,16 +247,18 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc12_9.2: type = converted %float.make_type, %.loc12_9.1 [template = f64] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc12_33.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc12_33.2: type = converted %int_literal.make_type, %.loc12_33.1 [template = Core.IntLiteral] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_9.3: type = splice_block %.loc12_9.2 [template = f64] { +// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc12_9.2: type = converted %float.make_type, %.loc12_9.1 [template = f64] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: f64 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index 18c5f9933aa7..e266424c7ae2 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -105,16 +105,18 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.patt: @F.%U.loc7_16.2 (%U) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%U.loc7_16.2 (%U) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %U.ref.loc7_36: type = name_ref U, %U.loc7_16.1 [symbolic = %U.loc7_16.2 (constants.%U)] -// CHECK:STDOUT: %.loc7_37.1: %tuple.type.1 = tuple_literal (%T.ref, %U.ref.loc7_36) -// CHECK:STDOUT: %.loc7_37.2: type = converted %.loc7_37.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %U.ref.loc7_43: type = name_ref U, %U.loc7_16.1 [symbolic = %U.loc7_16.2 (constants.%U)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc7_16.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc7_16.2 (constants.%U)] // CHECK:STDOUT: %pair.param: @F.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_37.3: type = splice_block %.loc7_37.2 [symbolic = %tuple.type (constants.%tuple.type.2)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] +// CHECK:STDOUT: %U.ref.loc7_36: type = name_ref U, %U.loc7_16.1 [symbolic = %U.loc7_16.2 (constants.%U)] +// CHECK:STDOUT: %.loc7_37.1: %tuple.type.1 = tuple_literal (%T.ref, %U.ref.loc7_36) +// CHECK:STDOUT: %.loc7_37.2: type = converted %.loc7_37.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %pair: @F.%tuple.type (%tuple.type.2) = bind_name pair, %pair.param // CHECK:STDOUT: %return.param: ref @F.%U.loc7_16.2 (%U) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%U.loc7_16.2 (%U) = return_slot %return.param @@ -125,12 +127,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %D.ref.loc9_16: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc9_17.1: %tuple.type.1 = tuple_literal (%C.ref, %D.ref.loc9_16) -// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_17.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %D.ref.loc9_23: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %pair.param: %tuple.type.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_17.3: type = splice_block %.loc9_17.2 [template = constants.%tuple.type.3] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %D.ref.loc9_16: type = name_ref D, file.%D.decl [template = constants.%D] +// CHECK:STDOUT: %.loc9_17.1: %tuple.type.1 = tuple_literal (%C.ref, %D.ref.loc9_16) +// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_17.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %pair: %tuple.type.3 = bind_name pair, %pair.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -279,13 +283,15 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %Pair.patt.loc4_15.1: %tuple.type.2 = symbolic_binding_pattern Pair, 0 [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] // CHECK:STDOUT: %Pair.param_patt: %tuple.type.2 = value_param_pattern %Pair.patt.loc4_15.1, runtime_param [symbolic = %Pair.patt.loc4_15.2 (constants.%Pair.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_31.1: %tuple.type.1 = tuple_literal (%i32.loc4_23, %i32.loc4_28) -// CHECK:STDOUT: %.loc4_31.2: type = converted %.loc4_31.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %Pair.param: %tuple.type.2 = value_param runtime_param +// CHECK:STDOUT: %.loc4_31.3: type = splice_block %.loc4_31.2 [template = constants.%tuple.type.2] { +// CHECK:STDOUT: %int_32.loc4_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc4_31.1: %tuple.type.1 = tuple_literal (%i32.loc4_23, %i32.loc4_28) +// CHECK:STDOUT: %.loc4_31.2: type = converted %.loc4_31.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %Pair.loc4_15.1: %tuple.type.2 = bind_symbolic_name Pair, 0, %Pair.param [symbolic = %Pair.loc4_15.2 (constants.%Pair)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { @@ -298,24 +304,30 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc6_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.generic] -// CHECK:STDOUT: %A.ref: %i32 = name_ref A, %A.loc6_6.1 [symbolic = %A.loc6_6.2 (constants.%A)] -// CHECK:STDOUT: %B.ref.loc6_39: %i32 = name_ref B, %B.loc6_15.1 [symbolic = %B.loc6_15.2 (constants.%B)] -// CHECK:STDOUT: %.loc6_40: %tuple.type.2 = tuple_literal (%A.ref, %B.ref.loc6_39) -// CHECK:STDOUT: %tuple.loc6_40.1: %tuple.type.2 = tuple_value (%A.ref, %B.ref.loc6_39) [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] -// CHECK:STDOUT: %.loc6_41: %tuple.type.2 = converted %.loc6_40, %tuple.loc6_40.1 [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] -// CHECK:STDOUT: %HasPair.loc6_41.1: type = class_type @HasPair, @HasPair(constants.%tuple.1) [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.2)] // CHECK:STDOUT: %int_32.loc6_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_47: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %A.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc6_10: type = splice_block %i32.loc6_10 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %A.loc6_6.1: %i32 = bind_symbolic_name A, 0, %A.param [symbolic = %A.loc6_6.2 (constants.%A)] // CHECK:STDOUT: %B.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc6_19: type = splice_block %i32.loc6_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %B.loc6_15.1: %i32 = bind_symbolic_name B, 1, %B.param [symbolic = %B.loc6_15.2 (constants.%B)] // CHECK:STDOUT: %h.param: @F.%HasPair.loc6_41.2 (%HasPair.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_41.2: type = splice_block %HasPair.loc6_41.1 [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.2)] { +// CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.generic] +// CHECK:STDOUT: %A.ref: %i32 = name_ref A, %A.loc6_6.1 [symbolic = %A.loc6_6.2 (constants.%A)] +// CHECK:STDOUT: %B.ref.loc6_39: %i32 = name_ref B, %B.loc6_15.1 [symbolic = %B.loc6_15.2 (constants.%B)] +// CHECK:STDOUT: %.loc6_40: %tuple.type.2 = tuple_literal (%A.ref, %B.ref.loc6_39) +// CHECK:STDOUT: %tuple.loc6_40.1: %tuple.type.2 = tuple_value (%A.ref, %B.ref.loc6_39) [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] +// CHECK:STDOUT: %.loc6_41.1: %tuple.type.2 = converted %.loc6_40, %tuple.loc6_40.1 [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] +// CHECK:STDOUT: %HasPair.loc6_41.1: type = class_type @HasPair, @HasPair(constants.%tuple.1) [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %h: @F.%HasPair.loc6_41.2 (%HasPair.2) = bind_name h, %h.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -326,28 +338,30 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.generic] -// 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.5, element0 [template = constants.%Convert.10] -// 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.5, element0 [template = constants.%Convert.10] -// 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] -// CHECK:STDOUT: %.loc8_22.4: %i32 = value_of_initializer %int.convert_checked.loc8_22.2 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc8_22.5: %i32 = converted %int_2, %.loc8_22.4 [template = constants.%int_2.2] -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc8_22.3, %.loc8_22.5) [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc8_23: %tuple.type.2 = converted %.loc8_22.1, %tuple [template = constants.%tuple.2] -// CHECK:STDOUT: %HasPair: type = class_type @HasPair, @HasPair(constants.%tuple.2) [template = constants.%HasPair.3] // 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: %h.param: %HasPair.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_23.2: type = splice_block %HasPair [template = constants.%HasPair.3] { +// CHECK:STDOUT: %HasPair.ref: %HasPair.type = name_ref HasPair, file.%HasPair.decl [template = constants.%HasPair.generic] +// 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.5, element0 [template = constants.%Convert.10] +// 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.5, element0 [template = constants.%Convert.10] +// 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] +// CHECK:STDOUT: %.loc8_22.4: %i32 = value_of_initializer %int.convert_checked.loc8_22.2 [template = constants.%int_2.2] +// CHECK:STDOUT: %.loc8_22.5: %i32 = converted %int_2, %.loc8_22.4 [template = constants.%int_2.2] +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc8_22.3, %.loc8_22.5) [template = constants.%tuple.2] +// CHECK:STDOUT: %.loc8_23.1: %tuple.type.2 = converted %.loc8_22.1, %tuple [template = constants.%tuple.2] +// CHECK:STDOUT: %HasPair: type = class_type @HasPair, @HasPair(constants.%tuple.2) [template = constants.%HasPair.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %h: %HasPair.3 = bind_name h, %h.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -484,14 +498,16 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.patt: @F.%T.loc7_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc7_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc7_23: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %T.ref.loc7_26: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc7_27.1: %tuple.type.1 = tuple_literal (%T.ref.loc7_23, %T.ref.loc7_26) -// CHECK:STDOUT: %.loc7_27.2: type = converted %.loc7_27.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %T.ref.loc7_33: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %pair.param: @F.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_27.3: type = splice_block %.loc7_27.2 [symbolic = %tuple.type (constants.%tuple.type.2)] { +// CHECK:STDOUT: %T.ref.loc7_23: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] +// CHECK:STDOUT: %T.ref.loc7_26: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] +// CHECK:STDOUT: %.loc7_27.1: %tuple.type.1 = tuple_literal (%T.ref.loc7_23, %T.ref.loc7_26) +// CHECK:STDOUT: %.loc7_27.2: type = converted %.loc7_27.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %pair: @F.%tuple.type (%tuple.type.2) = bind_name pair, %pair.param // CHECK:STDOUT: %return.param: ref @F.%T.loc7_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc7_6.2 (%T) = return_slot %return.param @@ -502,12 +518,14 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %D.ref.loc9_16: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %.loc9_17.1: %tuple.type.1 = tuple_literal (%C.ref, %D.ref.loc9_16) -// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_17.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %D.ref.loc9_23: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %pair.param: %tuple.type.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_17.3: type = splice_block %.loc9_17.2 [template = constants.%tuple.type.3] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %D.ref.loc9_16: type = name_ref D, file.%D.decl [template = constants.%D] +// CHECK:STDOUT: %.loc9_17.1: %tuple.type.1 = tuple_literal (%C.ref, %D.ref.loc9_16) +// CHECK:STDOUT: %.loc9_17.2: type = converted %.loc9_17.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %pair: %tuple.type.3 = bind_name pair, %pair.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index 7031f55c2a54..8a2d8bad3cbb 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -107,12 +107,14 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.1 [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] { +// CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: @F.%ptr.loc6_20.2 (%ptr.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param @@ -123,10 +125,12 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_9: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc8_16: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_10: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc8_9: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -168,8 +172,8 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [template = constants.%F.specific_fn.2] -// CHECK:STDOUT: %.loc8: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc8 +// CHECK:STDOUT: %.loc8_13: ref %C = splice_block %return {} +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc8_13 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -244,13 +248,15 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %const.loc6_19.1: type = const_type %T [symbolic = %const.loc6_19.2 (constants.%const.1)] -// CHECK:STDOUT: %ptr.loc6_26.1: type = ptr_type %const.1 [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc6_26.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_26: type = splice_block %ptr.loc6_26.1 [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] { +// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %const.loc6_19.1: type = const_type %T [symbolic = %const.loc6_19.2 (constants.%const.1)] +// CHECK:STDOUT: %ptr.loc6_26.1: type = ptr_type %const.1 [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: @F.%ptr.loc6_26.2 (%ptr.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param @@ -261,11 +267,13 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const.2] -// CHECK:STDOUT: %ptr: type = ptr_type %const.2 [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_16: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const.2] +// CHECK:STDOUT: %ptr: type = ptr_type %const.2 [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -308,8 +316,8 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%C) [template = constants.%F.specific_fn.2] -// CHECK:STDOUT: %.loc8: ref %C = splice_block %return {} -// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc8 +// CHECK:STDOUT: %.loc8_19: ref %C = splice_block %return {} +// CHECK:STDOUT: %F.call: init %C = call %F.specific_fn(%p.ref) to %.loc8_19 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -385,12 +393,14 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc6_26: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc6_20.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_20: type = splice_block %ptr.loc6_20.1 [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] { +// CHECK:STDOUT: %T.ref.loc6_19: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %ptr.loc6_20.1: type = ptr_type %T [symbolic = %ptr.loc6_20.2 (constants.%ptr.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: @F.%ptr.loc6_20.2 (%ptr.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param @@ -401,12 +411,14 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.patt: %const = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %const = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %const.loc8_9: type = const_type %C [template = constants.%const] -// CHECK:STDOUT: %ptr: type = ptr_type %const [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %const.loc8_22: type = const_type %C [template = constants.%const] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_16: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc8_15: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %const.loc8_9: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %ptr: type = ptr_type %const [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %const = out_param runtime_param1 // CHECK:STDOUT: %return: ref %const = return_slot %return.param @@ -448,8 +460,8 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %p.ref: %ptr.2 = name_ref p, %p // CHECK:STDOUT: %F.specific_fn: = specific_function %F.ref, @F(constants.%const) [template = constants.%F.specific_fn.2] -// CHECK:STDOUT: %.loc8: ref %const = splice_block %return {} -// CHECK:STDOUT: %F.call: init %const = call %F.specific_fn(%p.ref) to %.loc8 +// CHECK:STDOUT: %.loc8_19: ref %const = splice_block %return {} +// CHECK:STDOUT: %F.call: init %const = call %F.specific_fn(%p.ref) to %.loc8_19 // CHECK:STDOUT: return %F.call to %return // CHECK:STDOUT: } // CHECK:STDOUT: @@ -522,13 +534,15 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.patt: @F.%T.loc6_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc6_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] -// CHECK:STDOUT: %const.loc6_19.1: type = const_type %T [symbolic = %const.loc6_19.2 (constants.%const.1)] -// CHECK:STDOUT: %ptr.loc6_26.1: type = ptr_type %const.1 [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc6_32: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc6_26.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_26: type = splice_block %ptr.loc6_26.1 [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] { +// CHECK:STDOUT: %T.ref.loc6_25: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] +// CHECK:STDOUT: %const.loc6_19.1: type = const_type %T [symbolic = %const.loc6_19.2 (constants.%const.1)] +// CHECK:STDOUT: %ptr.loc6_26.1: type = ptr_type %const.1 [symbolic = %ptr.loc6_26.2 (constants.%ptr.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: @F.%ptr.loc6_26.2 (%ptr.1) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%T.loc6_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc6_6.2 (%T) = return_slot %return.param @@ -539,11 +553,13 @@ fn G(p: C*) -> const C { // CHECK:STDOUT: %return.patt: %const.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %const.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_9: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] // CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %const: type = const_type %C [template = constants.%const.2] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc8_9: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %const.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %const.2 = return_slot %return.param diff --git a/toolchain/check/testdata/eval/aggregate.carbon b/toolchain/check/testdata/eval/aggregate.carbon index c9aa14b37a8f..4c61640caf15 100644 --- a/toolchain/check/testdata/eval/aggregate.carbon +++ b/toolchain/check/testdata/eval/aggregate.carbon @@ -80,33 +80,12 @@ var struct_access: [i32; 1] = (0,) as [i32; {.a = 3, .b = 1}.b]; // CHECK:STDOUT: .struct_access = %struct_access // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_26.1: %tuple.type.1 = tuple_literal (%i32.loc11_18, %i32.loc11_23) -// CHECK:STDOUT: %.loc11_26.2: type = converted %.loc11_26.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %tuple_copy.var: ref %tuple.type.2 = var tuple_copy // CHECK:STDOUT: %tuple_copy: ref %tuple.type.2 = bind_name tuple_copy, %tuple_copy.var -// CHECK:STDOUT: %int_32.loc13_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_41: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_41: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template = constants.%struct_type.a.b.c] // CHECK:STDOUT: %struct_copy.var: ref %struct_type.a.b.c = var struct_copy // CHECK:STDOUT: %struct_copy: ref %struct_type.a.b.c = bind_name struct_copy, %struct_copy.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %array_type.loc15: type = array_type %int_1.loc15, %i32 [template = constants.%array_type] // CHECK:STDOUT: %tuple_index.var: ref %array_type = var tuple_index // CHECK:STDOUT: %tuple_index: ref %array_type = bind_name tuple_index, %tuple_index.var -// 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: %int_1.loc17: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %array_type.loc17: type = array_type %int_1.loc17, %i32 [template = constants.%array_type] // CHECK:STDOUT: %struct_access.var: ref %array_type = var struct_access // CHECK:STDOUT: %struct_access: ref %array_type = bind_name struct_access, %struct_access.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon index 5c171d007fba..5a275ea40f85 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -69,10 +69,6 @@ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDOUT: .array_index = %array_index // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type.1] // CHECK:STDOUT: %array_index.var: ref %array_type.1 = var array_index // CHECK:STDOUT: %array_index: ref %array_type.1 = bind_name array_index, %array_index.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/eval/fail_symbolic.carbon b/toolchain/check/testdata/eval/fail_symbolic.carbon index 00f64b707eef..651a420ab0b0 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -25,10 +25,8 @@ 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.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.5: = interface_witness (%Convert.9) [template] // CHECK:STDOUT: %Convert.bound: = bound_method %N.2, %Convert.9 [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] @@ -53,9 +51,11 @@ fn G(N:! i32) { // CHECK:STDOUT: %N.patt.loc12_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.2)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc12_6.1, runtime_param [symbolic = %N.patt.loc12_6.2 (constants.%N.patt.2)] // CHECK:STDOUT: } { -// 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: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc12: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %N.loc12_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc12_6.2 (constants.%N.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -65,22 +65,12 @@ 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.loc16_16.2: = bound_method %N.loc12_6.2, constants.%Convert.9 [symbolic = %Convert.bound.loc16_16.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc16_16.2: = specific_function %Convert.bound.loc16_16.2, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc16_16.2 (constants.%Convert.specific_fn)] -// CHECK:STDOUT: %int.convert_checked.loc16_16.2: init Core.IntLiteral = call %Convert.specific_fn.loc16_16.2(%N.loc12_6.2) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %Convert.bound: = bound_method %N.loc12_6.2, constants.%Convert.9 [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: // CHECK:STDOUT: fn(%N.param_patt: %i32) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_6.1 [symbolic = %N.loc12_6.2 (constants.%N.2)] -// CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.9] -// CHECK:STDOUT: %Convert.bound.loc16_16.1: = bound_method %N.ref, %impl.elem0 [symbolic = %Convert.bound.loc16_16.2 (constants.%Convert.bound)] -// CHECK:STDOUT: %Convert.specific_fn.loc16_16.1: = specific_function %Convert.bound.loc16_16.1, @Convert.3(constants.%int_32) [symbolic = %Convert.specific_fn.loc16_16.2 (constants.%Convert.specific_fn)] -// CHECK:STDOUT: %int.convert_checked.loc16_16.1: init Core.IntLiteral = call %Convert.specific_fn.loc16_16.1(%N.ref) [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc16_16.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_16.1 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc16_16.2: Core.IntLiteral = converted %N.ref, %.loc16_16.1 [symbolic = %int.convert_checked.loc16_16.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %array_type: type = array_type %.loc16_16.2, %i32 [template = ] // CHECK:STDOUT: %k.var: ref = var k // CHECK:STDOUT: %k: ref = bind_name k, %k.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/eval/symbolic.carbon b/toolchain/check/testdata/eval/symbolic.carbon index 6d79a08c24fa..1e08d7c5e6f7 100644 --- a/toolchain/check/testdata/eval/symbolic.carbon +++ b/toolchain/check/testdata/eval/symbolic.carbon @@ -24,7 +24,6 @@ fn F(T:! type) { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %ptr.1: type = ptr_type %T [symbolic] // CHECK:STDOUT: %const: type = const_type %T [symbolic] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%ptr.1, %const) [symbolic] // CHECK:STDOUT: %require_complete.1: = require_complete_type %tuple.type.2 [symbolic] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic] @@ -61,34 +60,23 @@ fn F(T:! type) { // CHECK:STDOUT: %T.patt.loc12_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ptr.loc13_12.2: type = ptr_type @F.%T.loc12_6.2 (%T) [symbolic = %ptr.loc13_12.2 (constants.%ptr.1)] -// CHECK:STDOUT: %const.loc13_15.2: type = const_type @F.%T.loc12_6.2 (%T) [symbolic = %const.loc13_15.2 (constants.%const)] -// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%ptr.loc13_12.2 (%ptr.1), @F.%const.loc13_15.2 (%const)) [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: %ptr: type = ptr_type @F.%T.loc12_6.2 (%T) [symbolic = %ptr (constants.%ptr.1)] +// CHECK:STDOUT: %const: type = const_type @F.%T.loc12_6.2 (%T) [symbolic = %const (constants.%const)] +// CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%ptr (%ptr.1), @F.%const (%const)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %require_complete.loc13: = require_complete_type @F.%tuple.type (%tuple.type.2) [symbolic = %require_complete.loc13 (constants.%require_complete.1)] -// CHECK:STDOUT: %struct_type.a.loc14_16.2: type = struct_type {.a: @F.%T.loc12_6.2 (%T)} [symbolic = %struct_type.a.loc14_16.2 (constants.%struct_type.a)] -// CHECK:STDOUT: %require_complete.loc14: = require_complete_type @F.%struct_type.a.loc14_16.2 (%struct_type.a) [symbolic = %require_complete.loc14 (constants.%require_complete.2)] -// CHECK:STDOUT: %array_type.loc15_15.2: type = array_type constants.%int_5, @F.%T.loc12_6.2 (%T) [symbolic = %array_type.loc15_15.2 (constants.%array_type)] -// CHECK:STDOUT: %require_complete.loc15: = require_complete_type @F.%array_type.loc15_15.2 (%array_type) [symbolic = %require_complete.loc15 (constants.%require_complete.3)] +// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: @F.%T.loc12_6.2 (%T)} [symbolic = %struct_type.a (constants.%struct_type.a)] +// CHECK:STDOUT: %require_complete.loc14: = require_complete_type @F.%struct_type.a (%struct_type.a) [symbolic = %require_complete.loc14 (constants.%require_complete.2)] +// CHECK:STDOUT: %array_type: type = array_type constants.%int_5, @F.%T.loc12_6.2 (%T) [symbolic = %array_type (constants.%array_type)] +// CHECK:STDOUT: %require_complete.loc15: = require_complete_type @F.%array_type (%array_type) [symbolic = %require_complete.loc15 (constants.%require_complete.3)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc13_11: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc13_12.1: type = ptr_type %T [symbolic = %ptr.loc13_12.2 (constants.%ptr.1)] -// CHECK:STDOUT: %T.ref.loc13_21: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %const.loc13_15.1: type = const_type %T [symbolic = %const.loc13_15.2 (constants.%const)] -// CHECK:STDOUT: %.loc13_22.1: %tuple.type.1 = tuple_literal (%ptr.loc13_12.1, %const.loc13_15.1) -// CHECK:STDOUT: %.loc13_22.2: type = converted %.loc13_22.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %u.var: ref @F.%tuple.type (%tuple.type.2) = var u // CHECK:STDOUT: %u: ref @F.%tuple.type (%tuple.type.2) = bind_name u, %u.var -// CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %struct_type.a.loc14_16.1: type = struct_type {.a: %T} [symbolic = %struct_type.a.loc14_16.2 (constants.%struct_type.a)] -// CHECK:STDOUT: %v.var: ref @F.%struct_type.a.loc14_16.2 (%struct_type.a) = var v -// CHECK:STDOUT: %v: ref @F.%struct_type.a.loc14_16.2 (%struct_type.a) = bind_name v, %v.var -// CHECK:STDOUT: %T.ref.loc15: type = name_ref T, %T.loc12_6.1 [symbolic = %T.loc12_6.2 (constants.%T)] -// CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] -// CHECK:STDOUT: %array_type.loc15_15.1: type = array_type %int_5, %T [symbolic = %array_type.loc15_15.2 (constants.%array_type)] -// CHECK:STDOUT: %w.var: ref @F.%array_type.loc15_15.2 (%array_type) = var w -// CHECK:STDOUT: %w: ref @F.%array_type.loc15_15.2 (%array_type) = bind_name w, %w.var +// CHECK:STDOUT: %v.var: ref @F.%struct_type.a (%struct_type.a) = var v +// CHECK:STDOUT: %v: ref @F.%struct_type.a (%struct_type.a) = bind_name v, %v.var +// CHECK:STDOUT: %w.var: ref @F.%array_type (%array_type) = var w +// CHECK:STDOUT: %w: ref @F.%array_type (%array_type) = bind_name w, %w.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon index 5a2f2d6b7323..a2a2fb7ac5a8 100644 --- a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon @@ -93,17 +93,11 @@ fn H() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return.param_patt: %tuple.type.2 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_19.1: %tuple.type.1 = tuple_literal (%i32.loc14_11, %i32.loc14_16) -// CHECK:STDOUT: %.loc14_19.2: type = converted %.loc14_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %v.var: ref %tuple.type.2 = var v // CHECK:STDOUT: %v: ref %tuple.type.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc14_7: ref %tuple.type.2 = splice_block %v.var {} -// CHECK:STDOUT: %F.call.loc14: init %tuple.type.2 = call %F.ref.loc14() to %.loc14_7 +// CHECK:STDOUT: %.loc14: ref %tuple.type.2 = splice_block %v.var {} +// CHECK:STDOUT: %F.call.loc14: init %tuple.type.2 = call %F.ref.loc14() to %.loc14 // CHECK:STDOUT: assign %v.var, %F.call.loc14 // CHECK:STDOUT: %v.ref: ref %tuple.type.2 = name_ref v, %v // CHECK:STDOUT: %F.ref.loc15: %F.type = name_ref F, file.%F.decl [template = constants.%F] diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index 85b951881c5d..d30611da114c 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -19,25 +19,6 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Add.type.1: type = fn_type @Add.1 [template] // CHECK:STDOUT: %Add: %Add.type.1 = struct_value () [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: %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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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.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] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.11: %Convert.type.11 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.11) [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.3(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: } @@ -66,46 +47,23 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %Add.ref: %Add.type.1 = name_ref Add, %Add.decl [template = constants.%Add] -// 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.loc13_20: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc13_20: = bound_method %int_1, %impl.elem0.loc13_20 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc13_20: = specific_function %Convert.bound.loc13_20, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc13_20: init %i32 = call %Convert.specific_fn.loc13_20(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc13_20.1: %i32 = value_of_initializer %int.convert_checked.loc13_20 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc13_20.2: %i32 = converted %int_1, %.loc13_20.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc13_23: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc13_23: = bound_method %int_2, %impl.elem0.loc13_23 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc13_23: = specific_function %Convert.bound.loc13_23, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc13_23: init %i32 = call %Convert.specific_fn.loc13_23(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc13_23.1: %i32 = value_of_initializer %int.convert_checked.loc13_23 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc13_23.2: %i32 = converted %int_2, %.loc13_23.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc13_20.2, %.loc13_23.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc13_24: %Convert.type.5 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.11] -// CHECK:STDOUT: %Convert.bound.loc13_24: = bound_method %int.sadd, %impl.elem0.loc13_24 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc13_24: = specific_function %Convert.bound.loc13_24, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc13_24.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc13_24.2: %i32 = converted %int.sadd, %.loc13_24.1 [template = constants.%int_3.1] -// CHECK:STDOUT: %int.convert_checked.loc13_24: init Core.IntLiteral = call %Convert.specific_fn.loc13_24(%.loc13_24.2) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc13_24.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc13_24.4: Core.IntLiteral = converted %int.sadd, %.loc13_24.3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type: type = array_type %.loc13_24.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/definition.carbon b/toolchain/check/testdata/function/builtin/definition.carbon index 7e23baf037f0..a84a47f03e56 100644 --- a/toolchain/check/testdata/function/builtin/definition.carbon +++ b/toolchain/check/testdata/function/builtin/definition.carbon @@ -41,15 +41,19 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index 6cdd3ec65d33..5494614ef356 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -74,15 +74,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc11: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_9: type = splice_block %i32.loc11_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc11: %i32 = bind_name n, %n.param.loc11 // CHECK:STDOUT: %m.param.loc11: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_17: type = splice_block %i32.loc11_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %m.loc11: %i32 = bind_name m, %m.param.loc11 // CHECK:STDOUT: %return.param.loc11: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return.loc11: ref %i32 = return_slot %return.param.loc11 @@ -95,15 +99,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc19_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc19_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc19_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc19: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19_9: type = splice_block %i32.loc19_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc19: %i32 = bind_name n, %n.param.loc19 // CHECK:STDOUT: %m.param.loc19: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc19_17: type = splice_block %i32.loc19_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc19_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc19_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %m.loc19: %i32 = bind_name m, %m.param.loc19 // CHECK:STDOUT: %return.param.loc19: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return.loc19: ref %i32 = return_slot %return.param.loc19 @@ -116,15 +124,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc21_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc21_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc21_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc21: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21_9: type = splice_block %i32.loc21_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc21_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc21_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc21: %i32 = bind_name n, %n.param.loc21 // CHECK:STDOUT: %m.param.loc21: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc21_17: type = splice_block %i32.loc21_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc21_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc21_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %m.loc21: %i32 = bind_name m, %m.param.loc21 // CHECK:STDOUT: %return.param.loc21: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return.loc21: ref %i32 = return_slot %return.param.loc21 @@ -137,15 +149,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc29_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc29_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc29_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc29_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc29_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc29_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc29: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc29_9: type = splice_block %i32.loc29_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc29_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc29_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc29: %i32 = bind_name n, %n.param.loc29 // CHECK:STDOUT: %m.param.loc29: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc29_17: type = splice_block %i32.loc29_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc29_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc29_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %m.loc29: %i32 = bind_name m, %m.param.loc29 // CHECK:STDOUT: %return.param.loc29: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return.loc29: ref %i32 = return_slot %return.param.loc29 @@ -158,15 +174,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc31_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc31_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc31_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc31_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc31_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc31_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc31: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc31_9: type = splice_block %i32.loc31_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc31_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc31_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc31: %i32 = bind_name n, %n.param.loc31 // CHECK:STDOUT: %m.param.loc31: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc31_17: type = splice_block %i32.loc31_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc31_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc31_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %m.loc31: %i32 = bind_name m, %m.param.loc31 // CHECK:STDOUT: %return.param.loc31: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return.loc31: ref %i32 = return_slot %return.param.loc31 @@ -179,15 +199,19 @@ fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc38_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc38_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc38_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc38_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc38_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc38_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc38: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc38_9: type = splice_block %i32.loc38_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc38_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc38_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc38: %i32 = bind_name n, %n.param.loc38 // CHECK:STDOUT: %m.param.loc38: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc38_17: type = splice_block %i32.loc38_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc38_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc38_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %m.loc38: %i32 = bind_name m, %m.param.loc38 // CHECK:STDOUT: %return.param.loc38: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return.loc38: ref %i32 = return_slot %return.param.loc38 diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index 0e484d50fbbe..177b99b7eb60 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -34,30 +34,6 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template] // CHECK:STDOUT: %I.facet: %I.type = facet_value %i32, %i32 [template] // CHECK:STDOUT: %interface.1: = interface_witness (%F.2) [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.6: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [template] -// CHECK:STDOUT: %Convert.type.10: type = fn_type @Convert.5, @impl.4(%int_32) [template] -// CHECK:STDOUT: %Convert.10: %Convert.type.10 = struct_value () [template] -// CHECK:STDOUT: %interface.6: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [template] -// CHECK:STDOUT: %Convert.specific_fn.1: = specific_function %Convert.bound.1, @Convert.5(%int_32) [template] -// CHECK:STDOUT: %int_1.2: %i32 = int_value 1 [template] -// CHECK:STDOUT: %F.bound: = bound_method %int_1.2, %F.2 [template] -// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %Convert.type.11: type = fn_type @Convert.2, @ImplicitAs(%i32) [template] -// CHECK:STDOUT: %Convert.type.12: type = fn_type @Convert.3, @impl.2(%int_32) [template] -// CHECK:STDOUT: %Convert.12: %Convert.type.12 = struct_value () [template] -// CHECK:STDOUT: %interface.7: = interface_witness (%Convert.12) [template] -// CHECK:STDOUT: %Convert.bound.2: = bound_method %int_2.1, %Convert.12 [template] -// CHECK:STDOUT: %Convert.specific_fn.2: = specific_function %Convert.bound.2, @Convert.3(%int_32) [template] -// CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] -// CHECK:STDOUT: %int_3.1: %i32 = int_value 3 [template] -// CHECK:STDOUT: %Convert.type.13: type = fn_type @Convert.4, @impl.3(%int_32) [template] -// CHECK:STDOUT: %Convert.13: %Convert.type.13 = struct_value () [template] -// CHECK:STDOUT: %interface.8: = interface_witness (%Convert.13) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.13 [template] -// CHECK:STDOUT: %Convert.specific_fn.3: = specific_function %Convert.bound.3, @Convert.4(%int_32) [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32 [template] // CHECK:STDOUT: } @@ -85,38 +61,6 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_32.loc19_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %impl.elem0.loc19_19: %Convert.type.2 = interface_witness_access constants.%interface.6, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc19_19: = bound_method %int_1, %impl.elem0.loc19_19 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc19_19: = specific_function %Convert.bound.loc19_19, @Convert.5(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc19_19: init %i32 = call %Convert.specific_fn.loc19_19(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc19_19.1: %i32 = value_of_initializer %int.convert_checked.loc19_19 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc19_19.2: %i32 = converted %int_1, %.loc19_19.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%I.type] -// CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @I.%assoc0 [template = constants.%assoc0.1] -// CHECK:STDOUT: %impl.elem0.loc19_26: %F.type.1 = interface_witness_access constants.%interface.1, element0 [template = constants.%F.2] -// CHECK:STDOUT: %F.bound: = bound_method %.loc19_19.2, %impl.elem0.loc19_26 [template = constants.%F.bound] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %impl.elem0.loc19_33: %Convert.type.11 = interface_witness_access constants.%interface.7, element0 [template = constants.%Convert.12] -// CHECK:STDOUT: %Convert.bound.loc19_33: = bound_method %int_2, %impl.elem0.loc19_33 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc19_33: = specific_function %Convert.bound.loc19_33, @Convert.3(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc19_33: init %i32 = call %Convert.specific_fn.loc19_33(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc19_33.1: %i32 = value_of_initializer %int.convert_checked.loc19_33 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc19_33.2: %i32 = converted %int_2, %.loc19_33.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.sadd: init %i32 = call %F.bound(%.loc19_19.2, %.loc19_33.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %impl.elem0.loc19_34: %Convert.type.6 = interface_witness_access constants.%interface.8, element0 [template = constants.%Convert.13] -// CHECK:STDOUT: %Convert.bound.loc19_34: = bound_method %int.sadd, %impl.elem0.loc19_34 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %Convert.specific_fn.loc19_34: = specific_function %Convert.bound.loc19_34, @Convert.4(constants.%int_32) [template = constants.%Convert.specific_fn.3] -// CHECK:STDOUT: %.loc19_34.1: %i32 = value_of_initializer %int.sadd [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc19_34.2: %i32 = converted %int.sadd, %.loc19_34.1 [template = constants.%int_3.1] -// CHECK:STDOUT: %int.convert_checked.loc19_34: init Core.IntLiteral = call %Convert.specific_fn.loc19_34(%.loc19_34.2) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc19_34.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_34 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc19_34.4: Core.IntLiteral = converted %int.sadd, %.loc19_34.3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type: type = array_type %.loc19_34.4, %i32 [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } @@ -131,18 +75,22 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %return.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc12_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %.loc12_14: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %Self.ref.loc12_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %Self.as_type.loc12_27: type = facet_access_type %Self.ref.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %.loc12_27: type = converted %Self.ref.loc12_27, %Self.as_type.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %Self.ref.loc12_36: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %Self.as_type.loc12_36: type = facet_access_type %Self.ref.loc12_36 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %.loc12_36: type = converted %Self.ref.loc12_36, %Self.as_type.loc12_36 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_14.2: type = splice_block %.loc12_14.1 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] { +// CHECK:STDOUT: %Self.ref.loc12_14: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_14.1: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name self, %self.param // CHECK:STDOUT: %other.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param1 +// CHECK:STDOUT: %.loc12_27.2: type = splice_block %.loc12_27.1 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] { +// CHECK:STDOUT: %Self.ref.loc12_27: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc12_27: type = facet_access_type %Self.ref.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_27.1: type = converted %Self.ref.loc12_27, %Self.as_type.loc12_27 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %other: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot %return.param @@ -164,15 +112,19 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc16_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc16_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc16_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc16_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_14: type = splice_block %i32.loc16_14 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc16_26: type = splice_block %i32.loc16_26 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc16_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %other: %i32 = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/function/builtin/no_prelude/adapted_type.carbon b/toolchain/check/testdata/function/builtin/no_prelude/adapted_type.carbon index a48d4495fe86..e8c2f8ea9520 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/adapted_type.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/adapted_type.carbon @@ -92,8 +92,8 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %MyIntLiteral.ref: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral] // CHECK:STDOUT: %N.param: %MyIntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %MyIntLiteral.ref: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral] // CHECK:STDOUT: %N: %MyIntLiteral = bind_name N, %N.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -105,9 +105,9 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: %return.patt: %MyInt32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %MyInt32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %MyIntLiteral.ref.loc18: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral] // CHECK:STDOUT: %MyInt32.ref.loc18: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32] // CHECK:STDOUT: %a.param.loc18: %MyIntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %MyIntLiteral.ref.loc18: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral] // CHECK:STDOUT: %a.loc18: %MyIntLiteral = bind_name a, %a.param.loc18 // CHECK:STDOUT: %return.param.loc18: ref %MyInt32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc18: ref %MyInt32 = return_slot %return.param.loc18 @@ -120,17 +120,16 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: %return.patt: %MyInt32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %MyInt32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %MyInt32.ref.loc20_13: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32] -// CHECK:STDOUT: %MyInt32.ref.loc20_25: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32] // CHECK:STDOUT: %MyInt32.ref.loc20_37: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32] // CHECK:STDOUT: %a.param: %MyInt32 = value_param runtime_param0 +// CHECK:STDOUT: %MyInt32.ref.loc20_13: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32] // CHECK:STDOUT: %a: %MyInt32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %MyInt32 = value_param runtime_param1 +// CHECK:STDOUT: %MyInt32.ref.loc20_25: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32] // CHECK:STDOUT: %b: %MyInt32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %MyInt32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %MyInt32 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %MyInt32.ref: type = name_ref MyInt32, %MyInt32.decl [template = constants.%MyInt32] // CHECK:STDOUT: %v.var: ref %MyInt32 = var v // CHECK:STDOUT: %v: ref %MyInt32 = bind_name v, %v.var // CHECK:STDOUT: } @@ -164,9 +163,9 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: %return.patt: %MyInt32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %MyInt32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %MyIntLiteral.ref.loc15: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral] // CHECK:STDOUT: %MyInt32.ref.loc15: type = name_ref MyInt32, file.%MyInt32.decl [template = constants.%MyInt32] // CHECK:STDOUT: %a.param.loc15: %MyIntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %MyIntLiteral.ref.loc15: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral] // CHECK:STDOUT: %a.loc15: %MyIntLiteral = bind_name a, %a.param.loc15 // CHECK:STDOUT: %return.param.loc15: ref %MyInt32 = out_param runtime_param1 // CHECK:STDOUT: %return.loc15: ref %MyInt32 = return_slot %return.param.loc15 @@ -235,8 +234,8 @@ fn Int(N: MyIntLiteral) -> type = "int.make_type_signed"; // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %MyIntLiteral.ref: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral] // CHECK:STDOUT: %N.param: %MyIntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %MyIntLiteral.ref: type = name_ref MyIntLiteral, file.%MyIntLiteral.decl [template = constants.%MyIntLiteral] // CHECK:STDOUT: %N: %MyIntLiteral = bind_name N, %N.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param diff --git a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon index 90ad12a5290d..f7e06e8a6712 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/call_from_operator.carbon @@ -139,11 +139,13 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc5_22.2: type = converted %int_literal.make_type, %.loc5_22.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_22.3: type = splice_block %.loc5_22.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc5_22.2: type = converted %int_literal.make_type, %.loc5_22.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -218,18 +220,22 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc8_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %Self.as_type.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %.loc8_15: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %Self.ref.loc8_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %.loc8_28: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %Self.ref.loc8_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %Self.as_type.loc8_37: type = facet_access_type %Self.ref.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %.loc8_37: type = converted %Self.ref.loc8_37, %Self.as_type.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_15.2: type = splice_block %.loc8_15.1 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] { +// CHECK:STDOUT: %Self.ref.loc8_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc8_15.1: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = bind_name self, %self.param // CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = value_param runtime_param1 +// CHECK:STDOUT: %.loc8_28.2: type = splice_block %.loc8_28.1 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] { +// CHECK:STDOUT: %Self.ref.loc8_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc8_28.1: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc8_15.1 (%Self.as_type.1) = return_slot %return.param @@ -262,12 +268,14 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: @Convert.1.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Convert.1.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_20.1: @Convert.1.%As.type (%As.type.2) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.2) = name_ref Self, %.loc12_20.1 [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %Self.as_type.loc12_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)] -// CHECK:STDOUT: %.loc12_20.2: type = converted %Self.ref, %Self.as_type.loc12_20.2 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)] // CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc11_14.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_20.3: type = splice_block %.loc12_20.2 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)] { +// CHECK:STDOUT: %.loc12_20.1: @Convert.1.%As.type (%As.type.2) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.ref: @Convert.1.%As.type (%As.type.2) = name_ref Self, %.loc12_20.1 [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.as_type.loc12_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %.loc12_20.2: type = converted %Self.ref, %Self.as_type.loc12_20.2 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @Convert.1.%Self.as_type.loc12_20.1 (%Self.as_type.2) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Convert.1.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.1.%T (%T) = return_slot %return.param @@ -301,12 +309,14 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: @Convert.2.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Convert.2.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_20.1: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc16_20.1 [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %Self.as_type.loc16_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)] -// CHECK:STDOUT: %.loc16_20.2: type = converted %Self.ref, %Self.as_type.loc16_20.2 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)] // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc15_22.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3) = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_20.3: type = splice_block %.loc16_20.2 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)] { +// CHECK:STDOUT: %.loc16_20.1: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %Self.ref: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc16_20.1 [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %Self.as_type.loc16_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)] +// CHECK:STDOUT: %.loc16_20.2: type = converted %Self.ref, %Self.as_type.loc16_20.2 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.3)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @Convert.2.%Self.as_type.loc16_20.1 (%Self.as_type.3) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Convert.2.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.2.%T (%T) = return_slot %return.param @@ -329,12 +339,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin] -// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin] // CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin] // CHECK:STDOUT: %self.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin] // CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param // CHECK:STDOUT: %other.param: %i32.builtin = value_param runtime_param1 +// CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @impl.1.%.loc19_6.2 [template = constants.%i32.builtin] // CHECK:STDOUT: %other: %i32.builtin = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -353,12 +363,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%.loc23_17.2 [template = Core.IntLiteral] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc24_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc24_31.2: type = converted %int.make_type_signed, %.loc24_31.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%.loc23_17.2 [template = Core.IntLiteral] // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -377,12 +387,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%.loc27_17.2 [template = Core.IntLiteral] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc28_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc28_31.2: type = converted %int.make_type_signed, %.loc28_31.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%.loc27_17.2 [template = Core.IntLiteral] // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -401,12 +411,12 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%.loc31_6.2 [template = constants.%i32.builtin] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc32_42.2: type = converted %int_literal.make_type, %.loc32_42.1 [template = Core.IntLiteral] // CHECK:STDOUT: %self.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%.loc31_6.2 [template = constants.%i32.builtin] // CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -602,11 +612,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Convert.type.6: type = fn_type @Convert.3 [template] // CHECK:STDOUT: %Convert.6: %Convert.type.6 = struct_value () [template] // CHECK:STDOUT: %interface.1: = interface_witness (%Convert.6) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.6 [template] -// CHECK:STDOUT: %int_1.2: %i32.builtin = 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.6 [template] -// CHECK:STDOUT: %int_2.2: %i32.builtin = int_value 2 [template] // CHECK:STDOUT: %Op.type.1: type = fn_type @Op.1 [template] // CHECK:STDOUT: %Self.as_type.3: type = facet_access_type %Self.2 [symbolic] // CHECK:STDOUT: %Op.assoc_type: type = assoc_entity_type %Add.type, %Op.type.1 [template] @@ -614,13 +620,11 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template] // CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template] // CHECK:STDOUT: %interface.2: = interface_witness (%Op.2) [template] -// CHECK:STDOUT: %Op.bound.1: = bound_method %int_1.2, %Op.2 [template] // CHECK:STDOUT: %int_3.1: %i32.builtin = int_value 3 [template] // CHECK:STDOUT: %assoc0.8: %Convert.assoc_type.3 = assoc_entity element0, imports.%import_ref.32 [symbolic] // CHECK:STDOUT: %Convert.type.7: type = fn_type @Convert.4 [template] // CHECK:STDOUT: %Convert.7: %Convert.type.7 = struct_value () [template] // CHECK:STDOUT: %interface.3: = interface_witness (%Convert.7) [template] -// CHECK:STDOUT: %Convert.bound.3: = bound_method %int_3.1, %Convert.7 [template] // CHECK:STDOUT: %int_3.2: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: %array_type: type = array_type %int_3.2, %i32.builtin [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] @@ -647,11 +651,11 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: .ImplicitAs = %import_ref.31 // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst82 [no loc], unloaded +// CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst85 [no loc], unloaded // CHECK:STDOUT: %import_ref.4: @As.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.5 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Core//default, loc12_32, unloaded -// CHECK:STDOUT: %import_ref.8 = import_ref Core//default, inst38 [no loc], unloaded +// CHECK:STDOUT: %import_ref.8 = import_ref Core//default, inst39 [no loc], unloaded // CHECK:STDOUT: %import_ref.9: %Op.assoc_type = import_ref Core//default, loc8_41, loaded [template = constants.%assoc0.7] // CHECK:STDOUT: %import_ref.10 = import_ref Core//default, Op, unloaded // CHECK:STDOUT: %import_ref.11: type = import_ref Core//default, loc19_6, loaded [template = constants.%i32.builtin] @@ -660,7 +664,7 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %import_ref.14: type = import_ref Core//default, loc23_17, loaded [template = Core.IntLiteral] // CHECK:STDOUT: %import_ref.15: type = import_ref Core//default, loc23_28, loaded [template = constants.%As.type.3] // CHECK:STDOUT: %import_ref.16: = import_ref Core//default, loc23_30, loaded [template = constants.%interface.1] -// CHECK:STDOUT: %import_ref.17 = import_ref Core//default, inst124 [no loc], unloaded +// CHECK:STDOUT: %import_ref.17 = import_ref Core//default, inst128 [no loc], unloaded // CHECK:STDOUT: %import_ref.18: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.3) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.8)] // CHECK:STDOUT: %import_ref.19 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %import_ref.20: type = import_ref Core//default, loc27_17, loaded [template = Core.IntLiteral] @@ -678,41 +682,6 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc4_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_11: init type = call constants.%Int(%int_32.loc4_11) [template = constants.%i32.builtin] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int_32.loc4_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_22: init type = call constants.%Int(%int_32.loc4_22) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %int.make_type_signed.loc4_22 [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc4_22.2: type = converted %int.make_type_signed.loc4_22, %.loc4_22.1 [template = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_19: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %Convert.bound.loc4_19: = bound_method %int_1, %impl.elem0.loc4_19 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init %i32.builtin = call %Convert.bound.loc4_19(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_19.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_19.2: %i32.builtin = converted %int_1, %.loc4_19.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int_32.loc4_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%int_32.loc4_35) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc4_35.1: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc4_35.2: type = converted %int.make_type_signed.loc4_35, %.loc4_35.1 [template = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_32: %Convert.type.2 = interface_witness_access constants.%interface.1, element0 [template = constants.%Convert.6] -// CHECK:STDOUT: %Convert.bound.loc4_32: = bound_method %int_2, %impl.elem0.loc4_32 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %int.convert_checked.loc4_32: init %i32.builtin = call %Convert.bound.loc4_32(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_32.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_32.2: %i32.builtin = converted %int_2, %.loc4_32.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %impl.elem0.loc4_27.1: %Op.type.1 = interface_witness_access constants.%interface.2, element0 [template = constants.%Op.2] -// CHECK:STDOUT: %Op.bound: = bound_method %.loc4_19.2, %impl.elem0.loc4_27.1 [template = constants.%Op.bound.1] -// CHECK:STDOUT: %int.sadd: init %i32.builtin = call %Op.bound(%.loc4_19.2, %.loc4_32.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed.loc4_11 [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed.loc4_11, %.loc4_11.1 [template = constants.%i32.builtin] -// CHECK:STDOUT: %impl.elem0.loc4_27.2: %Convert.type.5 = interface_witness_access constants.%interface.3, element0 [template = constants.%Convert.7] -// CHECK:STDOUT: %Convert.bound.loc4_27: = bound_method %int.sadd, %impl.elem0.loc4_27.2 [template = constants.%Convert.bound.3] -// CHECK:STDOUT: %.loc4_27.1: %i32.builtin = value_of_initializer %int.sadd [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_27.2: %i32.builtin = converted %int.sadd, %.loc4_27.1 [template = constants.%int_3.1] -// CHECK:STDOUT: %int.convert_checked.loc4_27: init Core.IntLiteral = call %Convert.bound.loc4_27(%.loc4_27.2) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_27.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_27 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_27.4: Core.IntLiteral = converted %int.sadd, %.loc4_27.3 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type: type = array_type %.loc4_27.4, %i32.builtin [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon index 323b98e6ff1f..b6d3c726cfbe 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon @@ -65,11 +65,13 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc6_22.2: type = converted %int_literal.make_type, %.loc6_22.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_22.3: type = splice_block %.loc6_22.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc6_22.2: type = converted %int_literal.make_type, %.loc6_22.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -80,15 +82,17 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_24.2: type = converted %int_literal.make_type, %.loc8_24.1 [template = Core.IntLiteral] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc8_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc8_30.2: type = converted %int.make_type_signed, %.loc8_30.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %a.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_24.3: type = splice_block %.loc8_24.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc8_24.2: type = converted %int_literal.make_type, %.loc8_24.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -99,15 +103,17 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc9_39.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc9_39.2: type = converted %int_literal.make_type, %.loc9_39.1 [template = Core.IntLiteral] // CHECK:STDOUT: %a.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_20.3: type = splice_block %.loc9_20.2 [template = constants.%i32.builtin] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc9_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc9_20.2: type = converted %int.make_type_signed, %.loc9_20.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32.builtin = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -120,21 +126,25 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_signed.loc11_15, %.loc11_15.1 [template = constants.%i32.builtin] -// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_23, %.loc11_23.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %int_32.loc11_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %int.make_type_signed.loc11_31: init type = call constants.%Int(%int_32.loc11_31) [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc11_31.1: type = value_of_initializer %int.make_type_signed.loc11_31 [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc11_31.2: type = converted %int.make_type_signed.loc11_31, %.loc11_31.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %a.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_15.3: type = splice_block %.loc11_15.2 [template = constants.%i32.builtin] { +// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call constants.%Int(%int_32.loc11_15) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_15.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_signed.loc11_15, %.loc11_15.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32.builtin = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32.builtin = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_23.3: type = splice_block %.loc11_23.2 [template = constants.%i32.builtin] { +// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc11_23: init type = call constants.%Int(%int_32.loc11_23) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11_23 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11_23, %.loc11_23.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32.builtin = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -155,13 +165,7 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %Int.type: type = fn_type @Int [template] -// CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [template] -// CHECK:STDOUT: %AsIntLiteral.type: type = fn_type @AsIntLiteral [template] -// CHECK:STDOUT: %AsIntLiteral: %AsIntLiteral.type = struct_value () [template] -// CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template] -// CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template] // CHECK:STDOUT: %AsI32.type: type = fn_type @AsI32 [template] // CHECK:STDOUT: %AsI32: %AsI32.type = struct_value () [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -184,8 +188,6 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: .AsI32 = %import_ref.4 // CHECK:STDOUT: import Core//core // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: %AsIntLiteral.type = import_ref Core//core, AsIntLiteral, loaded [template = constants.%AsIntLiteral] -// CHECK:STDOUT: %import_ref.3: %TestAdd.type = import_ref Core//core, TestAdd, loaded [template = constants.%TestAdd] // CHECK:STDOUT: %import_ref.4: %AsI32.type = import_ref Core//core, AsI32, loaded [template = constants.%AsI32] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -195,33 +197,6 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: .arr = %arr // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] -// CHECK:STDOUT: %Core.ref.loc4_16: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %AsIntLiteral.ref: %AsIntLiteral.type = name_ref AsIntLiteral, imports.%import_ref.2 [template = constants.%AsIntLiteral] -// CHECK:STDOUT: %Core.ref.loc4_34: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %TestAdd.ref: %TestAdd.type = name_ref TestAdd, imports.%import_ref.3 [template = constants.%TestAdd] -// CHECK:STDOUT: %Core.ref.loc4_47: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %AsI32.ref.loc4_51: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %int.convert_checked.loc4_59: init %i32.builtin = call %AsI32.ref.loc4_51(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %Core.ref.loc4_62: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %AsI32.ref.loc4_66: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int.convert_checked.loc4_74: init %i32.builtin = call %AsI32.ref.loc4_66(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_59.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_59 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_59.2: %i32.builtin = converted %int.convert_checked.loc4_59, %.loc4_59.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc4_74.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_74 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc4_74.2: %i32.builtin = converted %int.convert_checked.loc4_74, %.loc4_74.1 [template = constants.%int_2.2] -// CHECK:STDOUT: %int.sadd: init %i32.builtin = call %TestAdd.ref(%.loc4_59.2, %.loc4_74.2) [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_75.1: %i32.builtin = value_of_initializer %int.sadd [template = constants.%int_3.1] -// CHECK:STDOUT: %.loc4_75.2: %i32.builtin = converted %int.sadd, %.loc4_75.1 [template = constants.%int_3.1] -// CHECK:STDOUT: %int.convert_checked.loc4_76: init Core.IntLiteral = call %AsIntLiteral.ref(%.loc4_75.2) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_signed, %.loc4_11.1 [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc4_76.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_76 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc4_76.2: Core.IntLiteral = converted %int.convert_checked.loc4_76, %.loc4_76.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %array_type: type = array_type %.loc4_76.2, %i32.builtin [template = constants.%array_type] // CHECK:STDOUT: %arr.var: ref %array_type = var arr // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/call/fail_not_callable.carbon b/toolchain/check/testdata/function/call/fail_not_callable.carbon index bf4252f75752..90ce1887a29d 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -44,8 +44,6 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// 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: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %str: String = string_literal "hello" [template = constants.%str] diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index abfbc572e780..1267560ca9fa 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -103,9 +103,11 @@ fn Main() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Run2.decl: %Run2.type = fn_decl @Run2 [template = constants.%Run2] { @@ -114,13 +116,17 @@ fn Main() { // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc13_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_12: type = splice_block %i32.loc13_12 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_20: type = splice_block %i32.loc13_20 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} diff --git a/toolchain/check/testdata/function/call/fail_param_type.carbon b/toolchain/check/testdata/function/call/fail_param_type.carbon index d83e4bc2810e..0946fef0b062 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -56,9 +56,11 @@ fn F() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index 84f125a43aa5..262bd26f50d5 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -74,8 +74,6 @@ fn Run() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Run() { // CHECK:STDOUT: !entry: -// 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: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo] diff --git a/toolchain/check/testdata/function/call/i32.carbon b/toolchain/check/testdata/function/call/i32.carbon index f86058a34f7d..728319a63958 100644 --- a/toolchain/check/testdata/function/call/i32.carbon +++ b/toolchain/check/testdata/function/call/i32.carbon @@ -57,11 +57,13 @@ fn Main() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_12 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -77,8 +79,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// 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: %b.var: ref %i32 = var b // 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] diff --git a/toolchain/check/testdata/function/call/more_param_ir.carbon b/toolchain/check/testdata/function/call/more_param_ir.carbon index b506d7dd3fc9..b74cfefdfec0 100644 --- a/toolchain/check/testdata/function/call/more_param_ir.carbon +++ b/toolchain/check/testdata/function/call/more_param_ir.carbon @@ -26,7 +26,6 @@ fn Main() { // CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template] // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -67,13 +66,17 @@ fn Main() { // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} @@ -86,10 +89,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// 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: %.loc14_15.1: %tuple.type.1 = tuple_literal (%i32) -// CHECK:STDOUT: %.loc14_15.2: type = converted %.loc14_15.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // 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] diff --git a/toolchain/check/testdata/function/call/no_prelude/alias.carbon b/toolchain/check/testdata/function/call/no_prelude/alias.carbon index a4c6d5cf89b1..6e61c2bbf26c 100644 --- a/toolchain/check/testdata/function/call/no_prelude/alias.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/alias.carbon @@ -57,8 +57,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc16_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc16_11.2: type = converted %.loc16_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var // CHECK:STDOUT: %B.ref: %A.type = name_ref B, file.%B [template = constants.%A] diff --git a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon index 7a9315d27fb5..410317f8f687 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_struct.carbon @@ -38,11 +38,13 @@ fn Main() { // CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_13.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %.loc11_20.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %a.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_13.3: type = splice_block %.loc11_13.2 [template = constants.%empty_struct_type] { +// CHECK:STDOUT: %.loc11_13.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %empty_struct_type = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param diff --git a/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon b/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon index 531e91e3b8e8..07cac638281c 100644 --- a/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/empty_tuple.carbon @@ -38,11 +38,13 @@ fn Main() { // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_13.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc11_20.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_13.3: type = splice_block %.loc11_13.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc11_13.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %empty_tuple.type = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param diff --git a/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon b/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon index 589fa3171a00..064919ec0ff5 100644 --- a/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon @@ -37,9 +37,11 @@ fn Run() { // CHECK:STDOUT: %self.patt: %empty_tuple.type = binding_pattern self // CHECK:STDOUT: %self.param_patt: %empty_tuple.type = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14_13.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_13.3: type = splice_block %.loc14_13.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc14_13.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc14_13.2: type = converted %.loc14_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} {} diff --git a/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon b/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon index 620bc55ded00..9cce73b8d801 100644 --- a/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon @@ -32,10 +32,7 @@ fn Run() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .Run = %Run.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} { -// CHECK:STDOUT: %.loc14_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_10.2: type = converted %.loc14_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: } +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: %Run.decl: %Run.type = fn_decl @Run [template = constants.%Run] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon b/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon index 185d75371285..d101f7d91efb 100644 --- a/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/return_implicit.carbon @@ -41,8 +41,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var // CHECK:STDOUT: %MakeImplicitEmptyTuple.ref: %MakeImplicitEmptyTuple.type = name_ref MakeImplicitEmptyTuple, file.%MakeImplicitEmptyTuple.decl [template = constants.%MakeImplicitEmptyTuple] diff --git a/toolchain/check/testdata/function/call/params_one.carbon b/toolchain/check/testdata/function/call/params_one.carbon index 6fd70f091a0e..579c5ea9ab94 100644 --- a/toolchain/check/testdata/function/call/params_one.carbon +++ b/toolchain/check/testdata/function/call/params_one.carbon @@ -54,9 +54,11 @@ fn Main() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} diff --git a/toolchain/check/testdata/function/call/params_one_comma.carbon b/toolchain/check/testdata/function/call/params_one_comma.carbon index 688f10f5e0b7..824200f8ac76 100644 --- a/toolchain/check/testdata/function/call/params_one_comma.carbon +++ b/toolchain/check/testdata/function/call/params_one_comma.carbon @@ -55,9 +55,11 @@ fn Main() { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} diff --git a/toolchain/check/testdata/function/call/params_two.carbon b/toolchain/check/testdata/function/call/params_two.carbon index 5f0c2b2ed196..be496138e71f 100644 --- a/toolchain/check/testdata/function/call/params_two.carbon +++ b/toolchain/check/testdata/function/call/params_two.carbon @@ -60,13 +60,17 @@ fn Main() { // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} diff --git a/toolchain/check/testdata/function/call/params_two_comma.carbon b/toolchain/check/testdata/function/call/params_two_comma.carbon index 0f5fa8a49465..d7e1cf0d1955 100644 --- a/toolchain/check/testdata/function/call/params_two_comma.carbon +++ b/toolchain/check/testdata/function/call/params_two_comma.carbon @@ -61,13 +61,17 @@ fn Main() { // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} diff --git a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon index 66ef9c451f9e..bfeff816da50 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon @@ -42,15 +42,19 @@ fn F(n: i32, a: [i32; n]*); // CHECK:STDOUT: %a.patt: = binding_pattern a // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n -// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_9: type = splice_block %i32.loc14_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %a.param: = value_param runtime_param1 +// CHECK:STDOUT: %.loc14_25: type = splice_block %ptr [template = ] { +// CHECK:STDOUT: %int_32.loc14_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc14_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon index cf6745263b40..f0a59ce442a2 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon @@ -45,13 +45,17 @@ fn F(n: i32, n: i32); // CHECK:STDOUT: %n.patt.loc17_14: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt.loc17_15: %i32 = value_param_pattern %n.patt.loc17_14, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc17_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.param.loc17_7: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc17_9: type = splice_block %i32.loc17_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc17_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc17_6: %i32 = bind_name n, %n.param.loc17_7 // CHECK:STDOUT: %n.param.loc17_15: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc17_17: type = splice_block %i32.loc17_17 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc17_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc17_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n.loc17_14: %i32 = bind_name n, %n.param.loc17_15 // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index 9791eb8c8d7a..89a96dce322e 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -300,11 +300,13 @@ import library "extern_api"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %i32.loc5_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -315,14 +317,16 @@ import library "extern_api"; // CHECK:STDOUT: %return.patt: %struct_type.c = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10) -// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc6_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_14.3: type = splice_block %.loc6_14.2 [template = constants.%tuple.type.2] { +// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10) +// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 // CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param @@ -389,11 +393,13 @@ import library "extern_api"; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_52: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_52: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %i32.loc5_44 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -404,14 +410,16 @@ import library "extern_api"; // CHECK:STDOUT: %return.patt: %struct_type.c = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_45: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_45: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_49.1: %tuple.type.1 = tuple_literal (%i32.loc6_45) -// CHECK:STDOUT: %.loc6_49.2: type = converted %.loc6_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc6_60: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_60: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_49.3: type = splice_block %.loc6_49.2 [template = constants.%tuple.type.2] { +// CHECK:STDOUT: %int_32.loc6_45: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_45: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_49.1: %tuple.type.1 = tuple_literal (%i32.loc6_45) +// CHECK:STDOUT: %.loc6_49.2: type = converted %.loc6_49.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 // CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param @@ -497,25 +505,14 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// 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: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var -// CHECK:STDOUT: %.loc9_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e // CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } @@ -630,49 +627,42 @@ import library "extern_api"; // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} { -// CHECK:STDOUT: %int_32.loc23_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc23_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc23_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23: type = splice_block %i32.loc23_16 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc23_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc23_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} { -// CHECK:STDOUT: %int_32.loc32_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc32_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc32_21.1: %tuple.type.1 = tuple_literal (%i32.loc32_17) -// CHECK:STDOUT: %.loc32_21.2: type = converted %.loc32_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc32_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc32_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc32_21.3: type = splice_block %.loc32_21.2 [template = constants.%tuple.type.2] { +// CHECK:STDOUT: %int_32.loc32_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc32_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc32_21.1: %tuple.type.1 = tuple_literal (%i32.loc32_17) +// CHECK:STDOUT: %.loc32_21.2: type = converted %.loc32_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 // CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {} -// CHECK:STDOUT: %.loc52_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %int_32.loc54: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc54: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var -// CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %.loc56_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc56_9.2: type = converted %.loc56_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e // CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } @@ -787,49 +777,42 @@ import library "extern_api"; // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} { -// CHECK:STDOUT: %int_32.loc7_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc7_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc7_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc7: type = splice_block %i32.loc7_16 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc7_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} { -// CHECK:STDOUT: %int_32.loc8_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc8_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_21.1: %tuple.type.1 = tuple_literal (%i32.loc8_17) -// CHECK:STDOUT: %.loc8_21.2: type = converted %.loc8_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc8_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc8_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_21.3: type = splice_block %.loc8_21.2 [template = constants.%tuple.type.2] { +// CHECK:STDOUT: %int_32.loc8_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc8_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc8_21.1: %tuple.type.1 = tuple_literal (%i32.loc8_17) +// CHECK:STDOUT: %.loc8_21.2: type = converted %.loc8_21.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 // CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [template = constants.%D] {} {} // CHECK:STDOUT: %E.decl: %E.type = fn_decl @E [template = constants.%E] {} {} -// CHECK:STDOUT: %.loc12_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// 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: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var -// CHECK:STDOUT: %.loc15_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_9.2: type = converted %.loc15_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %.loc16_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc16_9.2: type = converted %.loc16_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e // CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } @@ -946,25 +929,14 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc52_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc52_9.2: type = converted %.loc52_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %int_32.loc54: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc54: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var -// CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %.loc56_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc56_9.2: type = converted %.loc56_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e // CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } @@ -1081,25 +1053,14 @@ import library "extern_api"; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc51_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc51_9.2: type = converted %.loc51_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc52: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc52: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %int_32.loc53: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var -// CHECK:STDOUT: %.loc54_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc54_9.2: type = converted %.loc54_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %.loc55_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc55_9.2: type = converted %.loc55_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e // CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon b/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon index 80164df05ad5..a1244d9924e1 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/export_name.carbon @@ -93,8 +93,6 @@ var f: () = F(); // CHECK:STDOUT: .f = %f // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon index cfe90921d5f4..26f127440cd6 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon @@ -114,8 +114,6 @@ extern library "basic" fn F(); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } @@ -189,8 +187,8 @@ extern library "basic" fn F(); // CHECK:STDOUT: %self.patt: %C = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon index 3b8909438495..84408490e075 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon @@ -89,18 +89,22 @@ fn E() {} // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.param.loc21: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc21_10.3: type = splice_block %.loc21_10.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x.loc21: %empty_tuple.type = bind_name x, %x.param.loc21 // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl.loc29: %B.type = fn_decl @B [template = constants.%B] { // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc29_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.param.loc29: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc29_10.3: type = splice_block %.loc29_10.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc29_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc29_10.2: type = converted %.loc29_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x.loc29: %empty_tuple.type = bind_name x, %x.param.loc29 // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: %C.type = fn_decl @C [template = constants.%C] {} {} @@ -108,9 +112,11 @@ fn E() {} // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc39_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc39_10.3: type = splice_block %.loc39_10.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc39_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc39_10.2: type = converted %.loc39_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl.loc41: %D.type = fn_decl @D [template = constants.%D] {} {} @@ -135,8 +141,5 @@ fn E() {} // CHECK:STDOUT: fn @E() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return -// CHECK:STDOUT: -// CHECK:STDOUT: !.loc58: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon index 9629f465b0be..6dc933b664e0 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon @@ -112,8 +112,6 @@ fn A { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc8_10.2: type = converted %.loc8_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: %empty_tuple.type = bind_symbolic_name x, %x.var [symbolic = constants.%x] // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {} diff --git a/toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon b/toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon index 2fa916936f27..86b6cd9d32a2 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/name_poisoning.carbon @@ -289,16 +289,16 @@ class N.C {} // CHECK:STDOUT: %x.patt: %C.2 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C.2 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2] // CHECK:STDOUT: %x.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2] // CHECK:STDOUT: %x: %C.2 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %F2.decl: %F2.type = fn_decl @F2 [template = constants.%F2] { // CHECK:STDOUT: %x.patt: %C.2 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C.2 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2] // CHECK:STDOUT: %x.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc8 [template = constants.%C.2] // CHECK:STDOUT: %x: %C.2 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -353,8 +353,8 @@ class N.C {} // CHECK:STDOUT: %x.patt: %C = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -393,8 +393,8 @@ class N.C {} // CHECK:STDOUT: %x.patt: %C = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {} @@ -442,8 +442,8 @@ class N.C {} // CHECK:STDOUT: %x.patt: %I.type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %I.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %x.param: %I.type = value_param runtime_param0 +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %x: %I.type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: type = interface_decl @.1 [template = constants.%.type] {} {} @@ -490,8 +490,8 @@ class N.C {} // CHECK:STDOUT: %x.patt: %C = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc17: = namespace [template] {} @@ -544,12 +544,11 @@ class N.C {} // CHECK:STDOUT: %x.patt: %C1 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C1 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C1.ref: type = name_ref C1, file.%C1.decl [template = constants.%C1] // CHECK:STDOUT: %x.param: %C1 = value_param runtime_param0 +// CHECK:STDOUT: %C1.ref: type = name_ref C1, file.%C1.decl [template = constants.%C1] // CHECK:STDOUT: %x: %C1 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %C2.decl: type = class_decl @C2 [template = constants.%C2] {} {} -// CHECK:STDOUT: %C2.ref: type = name_ref C2, %C2.decl [template = constants.%C2] // CHECK:STDOUT: %.loc18: %D.elem = field_decl C1, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.C1 [template = constants.%complete_type.2] // CHECK:STDOUT: @@ -595,8 +594,8 @@ class N.C {} // CHECK:STDOUT: %x.patt: %C = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] {} {} @@ -695,8 +694,8 @@ class N.C {} // CHECK:STDOUT: %x.patt: %C = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {} @@ -704,8 +703,8 @@ class N.C {} // CHECK:STDOUT: %x.patt: %C = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -831,8 +830,8 @@ class N.C {} // CHECK:STDOUT: %x.patt: %C = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {} {} diff --git a/toolchain/check/testdata/function/declaration/param_same_name.carbon b/toolchain/check/testdata/function/declaration/param_same_name.carbon index af2abab9c144..8221b616b8af 100644 --- a/toolchain/check/testdata/function/declaration/param_same_name.carbon +++ b/toolchain/check/testdata/function/declaration/param_same_name.carbon @@ -42,18 +42,22 @@ fn G(a: i32); // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index 5350eb2e06a0..b445c590c7bd 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -152,11 +152,13 @@ fn D() {} // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %i32.loc5_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -167,14 +169,16 @@ fn D() {} // CHECK:STDOUT: %return.patt: %struct_type.c = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %struct_type.c = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10) -// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %int_32.loc6_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_14.3: type = splice_block %.loc6_14.2 [template = constants.%tuple.type.2] { +// CHECK:STDOUT: %int_32.loc6_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc6_14.1: %tuple.type.1 = tuple_literal (%i32.loc6_10) +// CHECK:STDOUT: %.loc6_14.2: type = converted %.loc6_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %tuple.type.2 = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %struct_type.c = out_param runtime_param1 // CHECK:STDOUT: %return: ref %struct_type.c = return_slot %return.param @@ -283,17 +287,10 @@ fn D() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// 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: %struct_type.c: type = struct_type {.c: %i32} [template = constants.%struct_type.c] // CHECK:STDOUT: %c.var: ref %struct_type.c = var c // CHECK:STDOUT: %c: ref %struct_type.c = bind_name c, %c.var // CHECK:STDOUT: } @@ -368,11 +365,13 @@ fn D() {} // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [template = constants.%A] {} {} // CHECK:STDOUT: %B.decl: %B.type = fn_decl @B [template = constants.%B] {} { -// CHECK:STDOUT: %int_32.loc23_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc23_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc23_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23: type = splice_block %i32.loc23_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc23_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc23_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/function/definition/import_access.carbon b/toolchain/check/testdata/function/definition/import_access.carbon index b6785c12a6f8..f81adbd19041 100644 --- a/toolchain/check/testdata/function/definition/import_access.carbon +++ b/toolchain/check/testdata/function/definition/import_access.carbon @@ -242,8 +242,6 @@ private fn Redecl() {} // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } @@ -278,8 +276,6 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } @@ -315,8 +311,6 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } @@ -354,8 +348,6 @@ private fn Redecl() {} // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } @@ -390,8 +382,6 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } @@ -427,8 +417,6 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } @@ -466,8 +454,6 @@ private fn Redecl() {} // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: %Forward.decl: %Forward.type = fn_decl @Forward [template = constants.%Forward] {} {} @@ -506,8 +492,6 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } @@ -543,8 +527,6 @@ private fn Redecl() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc9_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %f.var: ref %empty_tuple.type = var f // CHECK:STDOUT: %f: ref %empty_tuple.type = bind_name f, %f.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/no_prelude/basics.carbon b/toolchain/check/testdata/function/definition/no_prelude/basics.carbon index 5b07b297b632..2a337ac0a2a3 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/basics.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/basics.carbon @@ -39,8 +39,8 @@ fn F(n: C) {} // CHECK:STDOUT: %n.patt: %C = binding_pattern n // CHECK:STDOUT: %n.param_patt: %C = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %n.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %n: %C = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon index 23a1eff6441e..3369feb4a63b 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon @@ -111,18 +111,22 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc19_10.3: type = splice_block %.loc19_10.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc19_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc19_10.2: type = converted %.loc19_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc21_10.3: type = splice_block %.loc21_10.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc21_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc21_10.2: type = converted %.loc21_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc29: %.type.2 = fn_decl @.2 [template = constants.%.2] {} {} @@ -130,9 +134,11 @@ fn K() -> {} { return {}; } // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc31_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc31_10.3: type = splice_block %.loc31_10.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc31_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc31_10.2: type = converted %.loc31_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc36: %.type.3 = fn_decl @.3 [template = constants.%.3] { diff --git a/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon b/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon index 071cc8689801..7b515e844e9e 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon @@ -35,8 +35,5 @@ fn F() {} // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return -// CHECK:STDOUT: -// CHECK:STDOUT: !.loc18: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon index 03f753995e81..5c1d9fccf9d4 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon @@ -194,32 +194,32 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_name a, %a.param.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc8: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc8: %C = bind_name a, %a.param.loc8 // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param.loc10: %C = value_param runtime_param0 +// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc10: %C = bind_name a, %a.param.loc10 // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param.loc11: %C = value_param runtime_param0 +// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc11: %C = bind_name a, %a.param.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -262,16 +262,16 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6: %C = bind_name a, %a.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_name a, %a.param.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -311,16 +311,16 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -360,16 +360,16 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6: %C = bind_name a, %a.param.loc6 // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type = fn_decl @Foo [template = constants.%Foo] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_name a, %a.param.loc7 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -413,16 +413,16 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -471,16 +471,16 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [template = constants.%Bar] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -526,16 +526,16 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %b.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -580,16 +580,16 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -636,16 +636,16 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt.loc7_8.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_8.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_8.1, runtime_param [symbolic = %a.patt.loc7_8.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_8.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_8.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %a.patt.loc15_8.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_8.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_8.1, runtime_param [symbolic = %a.patt.loc15_8.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc15_8.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc15_8.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -761,8 +761,8 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -807,8 +807,8 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -847,19 +847,23 @@ fn Foo(a: const (const C)) {} // CHECK:STDOUT: %a.patt: %const = binding_pattern a // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] // CHECK:STDOUT: %a.param: %const = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %const [template = constants.%const] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %const = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type = fn_decl @.1 [template = constants.%.1] { // CHECK:STDOUT: %a.patt: %const = binding_pattern a // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %const.loc17_18: type = const_type %C [template = constants.%const] -// CHECK:STDOUT: %const.loc17_11: type = const_type %const [template = constants.%const] // CHECK:STDOUT: %a.param: %const = value_param runtime_param0 +// CHECK:STDOUT: %.loc17: type = splice_block %const.loc17_11 [template = constants.%const] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %const.loc17_18: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %const.loc17_11: type = const_type %const [template = constants.%const] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %const = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_one.carbon b/toolchain/check/testdata/function/definition/params_one.carbon index f2ad74d26383..b5c9d2a3bd33 100644 --- a/toolchain/check/testdata/function/definition/params_one.carbon +++ b/toolchain/check/testdata/function/definition/params_one.carbon @@ -37,9 +37,11 @@ fn Foo(a: i32) {} // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_one_comma.carbon b/toolchain/check/testdata/function/definition/params_one_comma.carbon index c1ba454b53ea..40b8b4fe1667 100644 --- a/toolchain/check/testdata/function/definition/params_one_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_one_comma.carbon @@ -37,9 +37,11 @@ fn Foo(a: i32,) {} // CHECK:STDOUT: %a.patt: %i32 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_two.carbon b/toolchain/check/testdata/function/definition/params_two.carbon index 932197a02f20..887e63449abb 100644 --- a/toolchain/check/testdata/function/definition/params_two.carbon +++ b/toolchain/check/testdata/function/definition/params_two.carbon @@ -39,13 +39,17 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/definition/params_two_comma.carbon b/toolchain/check/testdata/function/definition/params_two_comma.carbon index 1ccccf8ca6e8..c89215cd3866 100644 --- a/toolchain/check/testdata/function/definition/params_two_comma.carbon +++ b/toolchain/check/testdata/function/definition/params_two_comma.carbon @@ -39,13 +39,17 @@ fn Foo(a: i32, b: i32,) {} // CHECK:STDOUT: %b.patt: %i32 = binding_pattern b // CHECK:STDOUT: %b.param_patt: %i32 = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11: type = splice_block %i32.loc11_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_19: type = splice_block %i32.loc11_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 45a24a1376e6..7ef56292af90 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -539,12 +539,12 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %return.patt: @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc6_40: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc6_46: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc6_47.1: type = ptr_type %T [symbolic = %ptr.loc6_47.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_27.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_27.2 (constants.%T)] // CHECK:STDOUT: %x.param: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc6_40: type = name_ref T, %T.loc6_27.1 [symbolic = %T.loc6_27.2 (constants.%T)] // CHECK:STDOUT: %x: @ExplicitAndAlsoDeduced.%T.loc6_27.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @ExplicitAndAlsoDeduced.%ptr.loc6_47.2 (%ptr.1) = return_slot %return.param @@ -677,12 +677,12 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %return.patt: @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc4_45.1: type = ptr_type %T [symbolic = %ptr.loc4_45.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %x.param: @ImplicitGenericParam.%T.loc4_25.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %x: @ImplicitGenericParam.%T.loc4_25.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @ImplicitGenericParam.%ptr.loc4_45.2 (%ptr.1) = return_slot %return.param @@ -693,12 +693,14 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc6_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc6_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc6_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %i32.loc6_32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc6_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc6_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param @@ -815,14 +817,16 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %x.patt: @TupleParam.%tuple.type (%tuple.type.2) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @TupleParam.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)] -// 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: %.loc4_35.1: %tuple.type.1 = tuple_literal (%T.ref, %i32) -// CHECK:STDOUT: %.loc4_35.2: type = converted %.loc4_35.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_15.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_15.2 (constants.%T)] // CHECK:STDOUT: %x.param: @TupleParam.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_35.3: type = splice_block %.loc4_35.2 [symbolic = %tuple.type (constants.%tuple.type.2)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_15.1 [symbolic = %T.loc4_15.2 (constants.%T)] +// 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: %.loc4_35.1: %tuple.type.1 = tuple_literal (%T.ref, %i32) +// CHECK:STDOUT: %.loc4_35.2: type = converted %.loc4_35.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @TupleParam.%tuple.type (%tuple.type.2) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallTupleParam.decl: %CallTupleParam.type = fn_decl @CallTupleParam [template = constants.%CallTupleParam] {} {} @@ -928,13 +932,15 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %x.patt: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)] -// 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: %struct_type.a.b.loc4_44.1: type = struct_type {.a: %T, .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_16.2 (constants.%T)] // CHECK:STDOUT: %x.param: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.a.b.loc4_44.1 [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)] +// 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: %struct_type.a.b.loc4_44.1: type = struct_type {.a: %T, .b: %i32} [symbolic = %struct_type.a.b.loc4_44.2 (constants.%struct_type.a.b.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @StructParam.%struct_type.a.b.loc4_44.2 (%struct_type.a.b.1) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallStructParam.decl: %CallStructParam.type = fn_decl @CallStructParam [template = constants.%CallStructParam] {} {} @@ -1027,15 +1033,17 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %x.patt: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_19.1 [symbolic = %T.loc4_19.2 (constants.%T)] -// CHECK:STDOUT: %int_32.loc4_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc4_53: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4_53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.c.d.e.loc4_56.1: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_19.2 (constants.%T)] // CHECK:STDOUT: %x.param: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.c.d.e.loc4_56.1 [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_19.1 [symbolic = %T.loc4_19.2 (constants.%T)] +// CHECK:STDOUT: %int_32.loc4_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc4_53: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc4_53: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %struct_type.c.d.e.loc4_56.1: type = struct_type {.c: %T, .d: %i32, .e: %i32} [symbolic = %struct_type.c.d.e.loc4_56.2 (constants.%struct_type.c.d.e)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @BigStructParam.%struct_type.c.d.e.loc4_56.2 (%struct_type.c.d.e) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallBigStructParam.decl: %CallBigStructParam.type = fn_decl @CallBigStructParam [template = constants.%CallBigStructParam] {} {} @@ -1110,13 +1118,15 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %x.patt: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_21.1 [symbolic = %T.loc4_21.2 (constants.%T)] -// 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: %struct_type.f.g.loc4_49.1: type = struct_type {.f: %T, .g: %i32} [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_21.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_21.2 (constants.%T)] // CHECK:STDOUT: %x.param: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.f.g.loc4_49.1 [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_21.1 [symbolic = %T.loc4_21.2 (constants.%T)] +// 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: %struct_type.f.g.loc4_49.1: type = struct_type {.f: %T, .g: %i32} [symbolic = %struct_type.f.g.loc4_49.2 (constants.%struct_type.f.g)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @SmallStructParam.%struct_type.f.g.loc4_49.2 (%struct_type.f.g) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallSmallStructParam.decl: %CallSmallStructParam.type = fn_decl @CallSmallStructParam [template = constants.%CallSmallStructParam] {} {} @@ -1191,13 +1201,15 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %x.patt: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// 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: %struct_type.i.different.loc4_61.1: type = struct_type {.i: %T, .different: %i32} [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %x.param: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.i.different.loc4_61.1 [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] +// 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: %struct_type.i.different.loc4_61.1: type = struct_type {.i: %T, .different: %i32} [symbolic = %struct_type.i.different.loc4_61.2 (constants.%struct_type.i.different)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @WrongNameStructParam.%struct_type.i.different.loc4_61.2 (%struct_type.i.different) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallWrongNameStructParam.decl: %CallWrongNameStructParam.type = fn_decl @CallWrongNameStructParam [template = constants.%CallWrongNameStructParam] {} {} @@ -1271,13 +1283,15 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %x.patt: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_26.1 [symbolic = %T.loc4_26.2 (constants.%T)] -// 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: %struct_type.first.second.loc4_63.1: type = struct_type {.first: %T, .second: %i32} [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_26.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_26.2 (constants.%T)] // CHECK:STDOUT: %x.param: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = value_param runtime_param0 +// CHECK:STDOUT: %.loc4: type = splice_block %struct_type.first.second.loc4_63.1 [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)] { +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_26.1 [symbolic = %T.loc4_26.2 (constants.%T)] +// 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: %struct_type.first.second.loc4_63.1: type = struct_type {.first: %T, .second: %i32} [symbolic = %struct_type.first.second.loc4_63.2 (constants.%struct_type.first.second)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @WrongOrderStructParam.%struct_type.first.second.loc4_63.2 (%struct_type.first.second) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallWrongOrderStructParam.decl: %CallWrongOrderStructParam.type = fn_decl @CallWrongOrderStructParam [template = constants.%CallWrongOrderStructParam] {} {} @@ -1350,13 +1364,13 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %return.patt: @ImplicitNotDeducible.%U.loc6_35.2 (%U) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @ImplicitNotDeducible.%U.loc6_35.2 (%U) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_25.1 [symbolic = %T.loc6_25.2 (constants.%T)] // CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc6_35.1 [symbolic = %U.loc6_35.2 (constants.%U)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_25.2 (constants.%T)] // CHECK:STDOUT: %U.param: type = value_param runtime_param // CHECK:STDOUT: %U.loc6_35.1: type = bind_symbolic_name U, 1, %U.param [symbolic = %U.loc6_35.2 (constants.%U)] // CHECK:STDOUT: %x.param: @ImplicitNotDeducible.%T.loc6_25.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_25.1 [symbolic = %T.loc6_25.2 (constants.%T)] // CHECK:STDOUT: %x: @ImplicitNotDeducible.%T.loc6_25.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @ImplicitNotDeducible.%U.loc6_35.2 (%U) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @ImplicitNotDeducible.%U.loc6_35.2 (%U) = return_slot %return.param @@ -1425,14 +1439,14 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %return.patt: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] -// CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_50: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %x.param: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc4_38: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %x: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %y.param: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = value_param runtime_param1 +// CHECK:STDOUT: %T.ref.loc4_44: type = name_ref T, %T.loc4_25.1 [symbolic = %T.loc4_25.2 (constants.%T)] // CHECK:STDOUT: %y: @ImplicitNotDeducible.%T.loc4_25.2 (%T) = bind_name y, %y.param // CHECK:STDOUT: %return.param: ref @ImplicitNotDeducible.%T.loc4_25.2 (%T) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @ImplicitNotDeducible.%T.loc4_25.2 (%T) = return_slot %return.param 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 a3440d58d503..360c8ee860eb 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 @@ -52,22 +52,26 @@ fn F(N:! i32, a: [i32; N]*); // CHECK:STDOUT: %a.patt: = binding_pattern a // CHECK:STDOUT: %a.param_patt: = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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.5, element0 [template = constants.%Convert.9] -// 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)] -// CHECK:STDOUT: %.loc14_24.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %.loc14_24.2: Core.IntLiteral = converted %N.ref, %.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] -// CHECK:STDOUT: %array_type: type = array_type %.loc14_24.2, %i32 [template = ] -// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param +// CHECK:STDOUT: %.loc14_10: type = splice_block %i32.loc14_10 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc14_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc14_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc14_6.2 (constants.%N.2)] // CHECK:STDOUT: %a.param: = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_26: type = splice_block %ptr [template = ] { +// 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.5, element0 [template = constants.%Convert.9] +// 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)] +// CHECK:STDOUT: %.loc14_24.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %.loc14_24.2: Core.IntLiteral = converted %N.ref, %.loc14_24.1 [symbolic = %int.convert_checked.loc14_24.2 (constants.%int.convert_checked)] +// CHECK:STDOUT: %array_type: type = array_type %.loc14_24.2, %i32 [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/no_prelude/call.carbon b/toolchain/check/testdata/function/generic/no_prelude/call.carbon index a3ba689dbe61..7d204813ad63 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/call.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/call.carbon @@ -92,11 +92,11 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.patt: @Function.%T.loc4_13.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Function.%T.loc4_13.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_32: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %x.param: @Function.%T.loc4_13.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %x: @Function.%T.loc4_13.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @Function.%T.loc4_13.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Function.%T.loc4_13.2 (%T) = return_slot %return.param @@ -109,11 +109,11 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.patt: @CallGeneric.%T.loc8_16.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @CallGeneric.%T.loc8_16.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc8_35: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %x.param: @CallGeneric.%T.loc8_16.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %x: @CallGeneric.%T.loc8_16.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @CallGeneric.%T.loc8_16.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @CallGeneric.%T.loc8_16.2 (%T) = return_slot %return.param @@ -126,13 +126,15 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc12_40: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_19.2 (constants.%T)] // CHECK:STDOUT: %x.param: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %ptr.loc12_33.1 [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] { +// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] +// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot %return.param @@ -144,9 +146,9 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -309,11 +311,11 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.patt: @Function.%T.loc4_13.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Function.%T.loc4_13.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_32: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %x.param: @Function.%T.loc4_13.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc4_26: type = name_ref T, %T.loc4_13.1 [symbolic = %T.loc4_13.2 (constants.%T)] // CHECK:STDOUT: %x: @Function.%T.loc4_13.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @Function.%T.loc4_13.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Function.%T.loc4_13.2 (%T) = return_slot %return.param @@ -326,11 +328,11 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.patt: @CallGeneric.%T.loc8_16.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @CallGeneric.%T.loc8_16.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc8_35: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %x.param: @CallGeneric.%T.loc8_16.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc8_29: type = name_ref T, %T.loc8_16.1 [symbolic = %T.loc8_16.2 (constants.%T)] // CHECK:STDOUT: %x: @CallGeneric.%T.loc8_16.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @CallGeneric.%T.loc8_16.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @CallGeneric.%T.loc8_16.2 (%T) = return_slot %return.param @@ -343,13 +345,15 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.ref.loc12_39: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc12_40: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc12_19.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_19.2 (constants.%T)] // CHECK:STDOUT: %x.param: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %ptr.loc12_33.1 [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] { +// CHECK:STDOUT: %T.ref.loc12_32: type = name_ref T, %T.loc12_19.1 [symbolic = %T.loc12_19.2 (constants.%T)] +// CHECK:STDOUT: %ptr.loc12_33.1: type = ptr_type %T [symbolic = %ptr.loc12_33.2 (constants.%ptr.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @CallGenericPtr.%ptr.loc12_33.2 (%ptr.1) = return_slot %return.param @@ -361,9 +365,9 @@ fn CallSpecific(x: C) -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param diff --git a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon index 129e728e8d72..9f283eed466b 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon @@ -54,19 +54,16 @@ fn F(T:! type, U:! type) { // CHECK:STDOUT: %U.patt.loc11_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc11_16.2 (constants.%U.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ptr.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr.loc12_11.2 (constants.%ptr)] -// CHECK:STDOUT: %require_complete.loc12: = require_complete_type @F.%ptr.loc12_11.2 (%ptr) [symbolic = %require_complete.loc12 (constants.%require_complete.1)] +// CHECK:STDOUT: %ptr: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr (constants.%ptr)] +// CHECK:STDOUT: %require_complete.loc12: = require_complete_type @F.%ptr (%ptr) [symbolic = %require_complete.loc12 (constants.%require_complete.1)] // CHECK:STDOUT: %require_complete.loc16: = require_complete_type @F.%U.loc11_16.2 (%U) [symbolic = %require_complete.loc16 (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %U.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc12_11.1: type = ptr_type %T [symbolic = %ptr.loc12_11.2 (constants.%ptr)] -// CHECK:STDOUT: %p.var: ref @F.%ptr.loc12_11.2 (%ptr) = var p -// CHECK:STDOUT: %p: ref @F.%ptr.loc12_11.2 (%ptr) = bind_name p, %p.var -// CHECK:STDOUT: %U.ref: type = name_ref U, %U.loc11_16.1 [symbolic = %U.loc11_16.2 (constants.%U)] -// CHECK:STDOUT: %p.ref: ref @F.%ptr.loc12_11.2 (%ptr) = name_ref p, %p -// CHECK:STDOUT: %.loc16_15: @F.%ptr.loc12_11.2 (%ptr) = bind_value %p.ref +// CHECK:STDOUT: %p.var: ref @F.%ptr (%ptr) = var p +// CHECK:STDOUT: %p: ref @F.%ptr (%ptr) = bind_name p, %p.var +// CHECK:STDOUT: %p.ref: ref @F.%ptr (%ptr) = name_ref p, %p +// CHECK:STDOUT: %.loc16_15: @F.%ptr (%ptr) = bind_value %p.ref // CHECK:STDOUT: %.loc16_14: ref @F.%T.loc11_6.2 (%T) = deref %.loc16_15 // CHECK:STDOUT: %.loc16_16: @F.%U.loc11_16.2 (%U) = converted %.loc16_14, [template = ] // CHECK:STDOUT: %n: @F.%U.loc11_16.2 (%U) = bind_name n, diff --git a/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon b/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon index 481c6f2ac1b9..c05bf347be35 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/indirect_generic_type.carbon @@ -37,14 +37,16 @@ fn F(T:! type, p: T**) -> T* { // CHECK:STDOUT: %return.patt: @F.%ptr.loc11_20.2 (%ptr.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%ptr.loc11_20.2 (%ptr.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc11_20.1: type = ptr_type %T [symbolic = %ptr.loc11_20.2 (constants.%ptr.1)] -// CHECK:STDOUT: %ptr.loc11_21.1: type = ptr_type %ptr.1 [symbolic = %ptr.loc11_21.2 (constants.%ptr.2)] // CHECK:STDOUT: %T.ref.loc11_27: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] // CHECK:STDOUT: %ptr.loc11_28: type = ptr_type %T [symbolic = %ptr.loc11_20.2 (constants.%ptr.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_6.2 (constants.%T)] // CHECK:STDOUT: %p.param: @F.%ptr.loc11_21.2 (%ptr.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %ptr.loc11_21.1 [symbolic = %ptr.loc11_21.2 (constants.%ptr.2)] { +// CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] +// CHECK:STDOUT: %ptr.loc11_20.1: type = ptr_type %T [symbolic = %ptr.loc11_20.2 (constants.%ptr.1)] +// CHECK:STDOUT: %ptr.loc11_21.1: type = ptr_type %ptr.1 [symbolic = %ptr.loc11_21.2 (constants.%ptr.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: @F.%ptr.loc11_21.2 (%ptr.2) = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref @F.%ptr.loc11_20.2 (%ptr.1) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%ptr.loc11_20.2 (%ptr.1) = return_slot %return.param diff --git a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon index 3e7ec0ecb1a8..a7f66e41c5b6 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param.carbon @@ -43,19 +43,16 @@ fn F(T:! type) { // CHECK:STDOUT: %T.patt.loc11_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %ptr.loc12_11.2: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr.loc12_11.2 (constants.%ptr)] -// CHECK:STDOUT: %require_complete.loc12: = require_complete_type @F.%ptr.loc12_11.2 (%ptr) [symbolic = %require_complete.loc12 (constants.%require_complete.1)] +// CHECK:STDOUT: %ptr: type = ptr_type @F.%T.loc11_6.2 (%T) [symbolic = %ptr (constants.%ptr)] +// CHECK:STDOUT: %require_complete.loc12: = require_complete_type @F.%ptr (%ptr) [symbolic = %require_complete.loc12 (constants.%require_complete.1)] // CHECK:STDOUT: %require_complete.loc13: = require_complete_type @F.%T.loc11_6.2 (%T) [symbolic = %require_complete.loc13 (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc12_11.1: type = ptr_type %T [symbolic = %ptr.loc12_11.2 (constants.%ptr)] -// CHECK:STDOUT: %p.var: ref @F.%ptr.loc12_11.2 (%ptr) = var p -// CHECK:STDOUT: %p: ref @F.%ptr.loc12_11.2 (%ptr) = bind_name p, %p.var -// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] -// CHECK:STDOUT: %p.ref: ref @F.%ptr.loc12_11.2 (%ptr) = name_ref p, %p -// CHECK:STDOUT: %.loc13_15: @F.%ptr.loc12_11.2 (%ptr) = bind_value %p.ref +// CHECK:STDOUT: %p.var: ref @F.%ptr (%ptr) = var p +// CHECK:STDOUT: %p: ref @F.%ptr (%ptr) = bind_name p, %p.var +// CHECK:STDOUT: %p.ref: ref @F.%ptr (%ptr) = name_ref p, %p +// CHECK:STDOUT: %.loc13_15: @F.%ptr (%ptr) = bind_value %p.ref // CHECK:STDOUT: %.loc13_14.1: ref @F.%T.loc11_6.2 (%T) = deref %.loc13_15 // CHECK:STDOUT: %.loc13_14.2: @F.%T.loc11_6.2 (%T) = bind_value %.loc13_14.1 // CHECK:STDOUT: %n: @F.%T.loc11_6.2 (%T) = bind_name n, %.loc13_14.2 diff --git a/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon b/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon index 3c7dadd197e3..2d71c084fe0f 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/type_param_scope.carbon @@ -35,11 +35,11 @@ fn F(T:! type, n: T) -> T { // CHECK:STDOUT: %return.patt: @F.%T.loc11_6.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%T.loc11_6.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc11_25: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_6.2 (constants.%T)] // CHECK:STDOUT: %n.param: @F.%T.loc11_6.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc11_19: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] // CHECK:STDOUT: %n: @F.%T.loc11_6.2 (%T) = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref @F.%T.loc11_6.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%T.loc11_6.2 (%T) = return_slot %return.param @@ -55,7 +55,6 @@ fn F(T:! type, n: T) -> T { // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %n.param_patt: @F.%T.loc11_6.2 (%T)) -> @F.%T.loc11_6.2 (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, %T.loc11_6.1 [symbolic = %T.loc11_6.2 (constants.%T)] // CHECK:STDOUT: %n.ref: @F.%T.loc11_6.2 (%T) = name_ref n, %n // CHECK:STDOUT: %m: @F.%T.loc11_6.2 (%T) = bind_name m, %n.ref // CHECK:STDOUT: %m.ref: @F.%T.loc11_6.2 (%T) = name_ref m, %m diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index aab5b05e7e2a..b9d1f10c3cc6 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -43,8 +43,6 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %ErrorIfNIsZero.type: type = fn_type @ErrorIfNIsZero [template] // CHECK:STDOUT: %ErrorIfNIsZero: %ErrorIfNIsZero.type = struct_value () [template] -// CHECK:STDOUT: %Int.type: type = generic_class_type @Int [template] -// CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [template] // CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N) [symbolic] // CHECK:STDOUT: %require_complete.2: = require_complete_type %Int [symbolic] // CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [template] @@ -63,7 +61,6 @@ fn CallNegative() { // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types/int_literal, IntLiteral, loaded [template = constants.%IntLiteral] -// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types/int, Int, loaded [template = constants.%Int.generic] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,12 +74,14 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt.loc4_19.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc4_19.1, runtime_param [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Core.ref.loc4: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_39.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_39.2: type = converted %int_literal.make_type, %.loc4_39.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param +// CHECK:STDOUT: %.loc4_39.3: type = splice_block %.loc4_39.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc4_39.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc4_39.2: type = converted %int_literal.make_type, %.loc4_39.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc4_19.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_19.2 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallNegative.decl: %CallNegative.type = fn_decl @CallNegative [template = constants.%CallNegative] {} {} @@ -93,17 +92,13 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt.loc4_19.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Int.loc15_20.2: type = class_type @Int, @Int(%N.loc4_19.2) [symbolic = %Int.loc15_20.2 (constants.%Int)] -// CHECK:STDOUT: %require_complete: = require_complete_type @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) [symbolic = %require_complete (constants.%require_complete.2)] +// CHECK:STDOUT: %Int: type = class_type @Int, @Int(%N.loc4_19.2) [symbolic = %Int (constants.%Int)] +// CHECK:STDOUT: %require_complete: = require_complete_type @ErrorIfNIsZero.%Int (%Int) [symbolic = %require_complete (constants.%require_complete.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%N.param_patt: Core.IntLiteral) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Core.ref.loc15: = name_ref Core, imports.%Core [template = imports.%Core] -// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int.generic] -// CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc4_19.1 [symbolic = %N.loc4_19.2 (constants.%N)] -// CHECK:STDOUT: %Int.loc15_20.1: type = class_type @Int, @Int(constants.%N) [symbolic = %Int.loc15_20.2 (constants.%Int)] -// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) = var v -// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%Int.loc15_20.2 (%Int) = bind_name v, %v.var +// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%Int (%Int) = var v +// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%Int (%Int) = bind_name v, %v.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -127,7 +122,7 @@ fn CallNegative() { // CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%int_0 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Int.loc15_20.2 => constants.%i0 +// CHECK:STDOUT: %Int => constants.%i0 // CHECK:STDOUT: %require_complete => constants.%complete_type.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 6c895df05c84..954e4534e77d 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -116,10 +116,6 @@ fn G() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// 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: %int_100: Core.IntLiteral = int_value 100 [template = constants.%int_100] -// CHECK:STDOUT: %array_type: type = array_type %int_100, %i32 [template = constants.%array_type] // CHECK:STDOUT: %.loc15: %C.elem = field_decl arr, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.arr.1 [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -152,21 +148,17 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc18_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %Wrap.ref.loc18: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic] -// CHECK:STDOUT: %int_32.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %Wrap.loc18: type = class_type @Wrap, @Wrap(constants.%i32) [template = constants.%Wrap.2] // CHECK:STDOUT: %.loc18: %Make.type.2 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%i32) [template = constants.%Make.2] // CHECK:STDOUT: %Make.ref.loc18: %Make.type.2 = name_ref Make, %.loc18 [template = constants.%Make.2] // CHECK:STDOUT: %Make.specific_fn.loc18: = specific_function %Make.ref.loc18, @Make(constants.%i32) [template = constants.%Make.specific_fn.2] // CHECK:STDOUT: %Make.call.loc18: init %i32 = call %Make.specific_fn.loc18() // CHECK:STDOUT: assign %a.var, %Make.call.loc18 -// CHECK:STDOUT: %.loc19_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc19_11.2: type = converted %.loc19_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var // CHECK:STDOUT: %Wrap.ref.loc19: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic] @@ -178,11 +170,10 @@ fn G() { // CHECK:STDOUT: %Make.specific_fn.loc19: = specific_function %Make.ref.loc19, @Make(constants.%empty_tuple.type) [template = constants.%Make.specific_fn.3] // CHECK:STDOUT: %Make.call.loc19: init %empty_tuple.type = call %Make.specific_fn.loc19() // CHECK:STDOUT: assign %b.var, %Make.call.loc19 -// CHECK:STDOUT: %C.ref.loc20_10: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %Wrap.ref.loc20: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.generic] -// CHECK:STDOUT: %C.ref.loc20_19: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %Wrap.loc20: type = class_type @Wrap, @Wrap(constants.%C) [template = constants.%Wrap.4] // CHECK:STDOUT: %.loc20_21: %Make.type.4 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%C) [template = constants.%Make.4] // CHECK:STDOUT: %Make.ref.loc20: %Make.type.4 = name_ref Make, %.loc20_21 [template = constants.%Make.4] diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index c12f28818454..5d17cc2abbf9 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -99,11 +99,11 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: @Defined.%T.loc4_12.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Defined.%T.loc4_12.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_12.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_12.2 (constants.%T)] // CHECK:STDOUT: %x.param: @Defined.%T.loc4_12.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] // CHECK:STDOUT: %x: @Defined.%T.loc4_12.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @Defined.%T.loc4_12.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Defined.%T.loc4_12.2 (%T) = return_slot %return.param @@ -214,11 +214,11 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: %T = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %T = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_31: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] // CHECK:STDOUT: %T.param.loc4: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_12.1: type = bind_symbolic_name T, 0, %T.param.loc4 [symbolic = %T.loc4_12.2 (constants.%T)] // CHECK:STDOUT: %x.param.loc4: @Defined.%T.loc4_12.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc4_25: type = name_ref T, %T.loc4_12.1 [symbolic = %T.loc4_12.2 (constants.%T)] // CHECK:STDOUT: %x.loc4: @Defined.%T.loc4_12.2 (%T) = bind_name x, %x.param.loc4 // CHECK:STDOUT: %return.param.loc4: ref @Defined.%T.loc4_12.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return.loc4: ref @Defined.%T.loc4_12.2 (%T) = return_slot %return.param.loc4 @@ -240,11 +240,11 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: %T = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %T = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %T.ref.loc10_31: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %T.param.loc10: type = value_param runtime_param // CHECK:STDOUT: %T.loc10: type = bind_symbolic_name T, 0, %T.param.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %x.param.loc10: %T = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc10_25: type = name_ref T, %T.loc10 [symbolic = constants.%T] // CHECK:STDOUT: %x.loc10: %T = bind_name x, %x.param.loc10 // CHECK:STDOUT: %return.param.loc10: ref %T = out_param runtime_param1 // CHECK:STDOUT: %return.loc10: ref %T = return_slot %return.param.loc10 @@ -343,11 +343,11 @@ fn CallUndefined() -> i32 { // CHECK:STDOUT: %return.patt: @Undefined.%T.loc4_14.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Undefined.%T.loc4_14.2 (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref.loc4_27: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T)] // CHECK:STDOUT: %T.ref.loc4_33: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_14.2 (constants.%T)] // CHECK:STDOUT: %x.param: @Undefined.%T.loc4_14.2 (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref.loc4_27: type = name_ref T, %T.loc4_14.1 [symbolic = %T.loc4_14.2 (constants.%T)] // CHECK:STDOUT: %x: @Undefined.%T.loc4_14.2 (%T) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @Undefined.%T.loc4_14.2 (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Undefined.%T.loc4_14.2 (%T) = return_slot %return.param diff --git a/toolchain/check/testdata/generic/complete_type.carbon b/toolchain/check/testdata/generic/complete_type.carbon index ffd036967518..fe8e18f099fb 100644 --- a/toolchain/check/testdata/generic/complete_type.carbon +++ b/toolchain/check/testdata/generic/complete_type.carbon @@ -125,10 +125,12 @@ fn G() { F(B); } // CHECK:STDOUT: %x.patt: %A.2 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %A.2 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] -// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl.loc4 [template = constants.%B] -// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%B) [template = constants.%A.2] // CHECK:STDOUT: %x.param: %A.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc27: type = splice_block %A [template = constants.%A.2] { +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] +// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl.loc4 [template = constants.%B] +// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%B) [template = constants.%A.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %A.2 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl.loc29: type = class_decl @B [template = constants.%B] {} {} @@ -154,7 +156,6 @@ fn G() { F(B); } // CHECK:STDOUT: %complete_type.loc14_1.2: = complete_type_witness @A.%struct_type.v (%struct_type.v.1) [symbolic = %complete_type.loc14_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_9.1 [symbolic = %T.loc6_9.2 (constants.%T)] // CHECK:STDOUT: %.loc13: @A.%A.elem (%A.elem.1) = field_decl v, element0 [template] // CHECK:STDOUT: %complete_type.loc14_1.1: = complete_type_witness %struct_type.v.1 [symbolic = %complete_type.loc14_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: @@ -250,7 +251,6 @@ fn G() { F(B); } // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %v.var: ref @F.%T.loc6_6.2 (%T) = var v // CHECK:STDOUT: %v: ref @F.%T.loc6_6.2 (%T) = bind_name v, %v.var // CHECK:STDOUT: return @@ -331,7 +331,6 @@ fn G() { F(B); } // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_6.1 [symbolic = %T.loc6_6.2 (constants.%T)] // CHECK:STDOUT: %v.var: ref @F.%T.loc6_6.2 (%T) = var v // CHECK:STDOUT: %v: ref @F.%T.loc6_6.2 (%T) = bind_name v, %v.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/global/class_obj.carbon b/toolchain/check/testdata/global/class_obj.carbon index b1c7d97179e0..22d1d60a3bdb 100644 --- a/toolchain/check/testdata/global/class_obj.carbon +++ b/toolchain/check/testdata/global/class_obj.carbon @@ -35,7 +35,6 @@ var a: A = {}; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A.decl: type = class_decl @A [template = constants.%A] {} {} -// CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %a.var: ref %A = var a // CHECK:STDOUT: %a: ref %A = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/class_with_fun.carbon b/toolchain/check/testdata/global/class_with_fun.carbon index b705d4ddd288..258c01038b7c 100644 --- a/toolchain/check/testdata/global/class_with_fun.carbon +++ b/toolchain/check/testdata/global/class_with_fun.carbon @@ -50,7 +50,6 @@ var a: A = {}; // CHECK:STDOUT: %return.param: ref %A = out_param runtime_param0 // CHECK:STDOUT: %return: ref %A = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A] // CHECK:STDOUT: %a.var: ref %A = var a // CHECK:STDOUT: %a: ref %A = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/decl.carbon b/toolchain/check/testdata/global/decl.carbon index 369c6c3d27d0..5c07ed62c106 100644 --- a/toolchain/check/testdata/global/decl.carbon +++ b/toolchain/check/testdata/global/decl.carbon @@ -30,8 +30,6 @@ var a: i32; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/simple_init.carbon b/toolchain/check/testdata/global/simple_init.carbon index 93bc6830c620..ce22fe8c4711 100644 --- a/toolchain/check/testdata/global/simple_init.carbon +++ b/toolchain/check/testdata/global/simple_init.carbon @@ -39,8 +39,6 @@ var a: i32 = 0; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/global/simple_with_fun.carbon b/toolchain/check/testdata/global/simple_with_fun.carbon index 68312197b44e..9b415f907b94 100644 --- a/toolchain/check/testdata/global/simple_with_fun.carbon +++ b/toolchain/check/testdata/global/simple_with_fun.carbon @@ -56,8 +56,6 @@ var a: i32 = test_a(); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if/else.carbon b/toolchain/check/testdata/if/else.carbon index 412709dd37cb..666b5cbf9bbd 100644 --- a/toolchain/check/testdata/if/else.carbon +++ b/toolchain/check/testdata/if/else.carbon @@ -61,10 +61,12 @@ fn If(b: bool) { // CHECK:STDOUT: %b.patt: bool = binding_pattern b // CHECK:STDOUT: %b.param_patt: bool = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc15_10.2: type = converted %bool.make_type, %.loc15_10.1 [template = bool] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc15_10.3: type = splice_block %.loc15_10.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc15_10.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc15_10.2: type = converted %bool.make_type, %.loc15_10.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index cd548bd17d3f..181cd0ac3eda 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -90,12 +90,14 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type, %.loc11_11.1 [template = bool] // 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: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11.3: type = splice_block %.loc11_11.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type, %.loc11_11.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -106,12 +108,14 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc22_11.2: type = converted %bool.make_type, %.loc22_11.1 [template = bool] // 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: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc22_11.3: type = splice_block %.loc22_11.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc22_11.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc22_11.2: type = converted %bool.make_type, %.loc22_11.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -122,12 +126,14 @@ fn If3(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc33_11.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc33_11.2: type = converted %bool.make_type, %.loc33_11.1 [template = bool] // 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: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc33_11.3: type = splice_block %.loc33_11.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc33_11.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc33_11.2: type = converted %bool.make_type, %.loc33_11.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index 47051fee04a3..89eb2b35e064 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -60,12 +60,14 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc11_16.2: type = converted %bool.make_type, %.loc11_16.1 [template = bool] -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_16.3: type = splice_block %.loc11_16.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_16.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc11_16.2: type = converted %bool.make_type, %.loc11_16.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -78,8 +80,6 @@ fn VarScope(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// 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: %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] diff --git a/toolchain/check/testdata/if/no_else.carbon b/toolchain/check/testdata/if/no_else.carbon index eb4546d3be12..ae01b6005d1e 100644 --- a/toolchain/check/testdata/if/no_else.carbon +++ b/toolchain/check/testdata/if/no_else.carbon @@ -54,10 +54,12 @@ fn If(b: bool) { // CHECK:STDOUT: %b.patt: bool = binding_pattern b // CHECK:STDOUT: %b.param_patt: bool = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc14_10.2: type = converted %bool.make_type, %.loc14_10.1 [template = bool] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_10.3: type = splice_block %.loc14_10.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc14_10.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc14_10.2: type = converted %bool.make_type, %.loc14_10.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/if/unreachable_fallthrough.carbon b/toolchain/check/testdata/if/unreachable_fallthrough.carbon index ccc7ec314d76..d3f743e5d9fb 100644 --- a/toolchain/check/testdata/if/unreachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/unreachable_fallthrough.carbon @@ -62,12 +62,14 @@ fn If(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_10.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc11_10.2: type = converted %bool.make_type, %.loc11_10.1 [template = bool] // 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: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_10.3: type = splice_block %.loc11_10.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_10.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc11_10.2: type = converted %bool.make_type, %.loc11_10.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/if_expr/basic.carbon b/toolchain/check/testdata/if_expr/basic.carbon index c7d9e86e2c3a..a4a346038c14 100644 --- a/toolchain/check/testdata/if_expr/basic.carbon +++ b/toolchain/check/testdata/if_expr/basic.carbon @@ -62,20 +62,26 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] -// CHECK:STDOUT: %int_32.loc11_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_9.3: type = splice_block %.loc11_9.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_18: type = splice_block %i32.loc11_18 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %m.param: %i32 = value_param runtime_param2 +// CHECK:STDOUT: %.loc11_26: type = splice_block %i32.loc11_26 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %m: %i32 = bind_name m, %m.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param3 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -84,10 +90,6 @@ fn F(b: bool, n: i32, m: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param_patt: bool, %n.param_patt: %i32, %m.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %x.var: ref %array_type = var x // 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] diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 6c642c3dfcbb..1d63bce3f051 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -125,8 +125,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -136,8 +136,8 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %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: %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: %t.param: type = value_param runtime_param0 // CHECK:STDOUT: %t: type = bind_name t, %t.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 @@ -219,22 +219,6 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %true br !if.expr.then.loc23 else br !if.expr.else.loc23 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc23: -// CHECK:STDOUT: %int_32.loc23_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc23(%i32.loc23_23) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc23: -// CHECK:STDOUT: %int_32.loc23_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc23: type = ptr_type %i32 [template = constants.%ptr] -// CHECK:STDOUT: br !if.expr.result.loc23(%ptr.loc23) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc23: -// CHECK:STDOUT: %.loc23_10: type = block_arg !if.expr.result.loc23 [template = constants.%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] @@ -242,24 +226,8 @@ fn PartiallyConstant(t: type) -> i32 { // 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] -// CHECK:STDOUT: %.loc23_40: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] -// CHECK:STDOUT: assign %v.var, %.loc23_40 -// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %false br !if.expr.then.loc24 else br !if.expr.else.loc24 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc24: -// CHECK:STDOUT: %int_32.loc24_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc24_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc24(%i32.loc24_24) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc24: -// CHECK:STDOUT: %int_32.loc24_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc24_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc24: type = ptr_type %i32 [template = constants.%ptr] -// CHECK:STDOUT: br !if.expr.result.loc24(%ptr.loc24) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc24: -// CHECK:STDOUT: %.loc24: type = block_arg !if.expr.result.loc24 [template = constants.%ptr] +// CHECK:STDOUT: %.loc23: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: assign %v.var, %.loc23 // CHECK:STDOUT: %w.var: ref %ptr = var w // CHECK:STDOUT: %w: ref %ptr = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v @@ -274,20 +242,6 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartiallyConstant(%t.param_patt: type) -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %true br !if.expr.then.loc29 else br !if.expr.else.loc29 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc29: -// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result.loc29(%i32.loc29) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc29: -// CHECK:STDOUT: %t.ref.loc29: type = name_ref t, %t -// CHECK:STDOUT: br !if.expr.result.loc29(%t.ref.loc29) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc29: -// CHECK:STDOUT: %.loc29_10: type = block_arg !if.expr.result.loc29 [template = constants.%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] @@ -295,23 +249,8 @@ fn PartiallyConstant(t: type) -> i32 { // 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] -// CHECK:STDOUT: %.loc29_37: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] -// CHECK:STDOUT: assign %v.var, %.loc29_37 -// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %false br !if.expr.then.loc30 else br !if.expr.else.loc30 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc30: -// CHECK:STDOUT: %t.ref.loc30: type = name_ref t, %t -// CHECK:STDOUT: br !if.expr.result.loc30(%t.ref.loc30) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc30: -// CHECK:STDOUT: %int_32.loc30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] -// CHECK:STDOUT: br !if.expr.result.loc30(%ptr) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc30: -// CHECK:STDOUT: %.loc30: type = block_arg !if.expr.result.loc30 [template = constants.%ptr] +// CHECK:STDOUT: %.loc29: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] +// CHECK:STDOUT: assign %v.var, %.loc29 // CHECK:STDOUT: %w.var: ref %ptr = var w // CHECK:STDOUT: %w: ref %ptr = bind_name w, %w.var // CHECK:STDOUT: %v.ref: ref %i32 = name_ref v, %v diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index 1e4814a62902..8427a022407d 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -84,12 +84,14 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc14_9.2: type = converted %bool.make_type, %.loc14_9.1 [template = bool] // 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: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_9.3: type = splice_block %.loc14_9.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc14_9.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc14_9.2: type = converted %bool.make_type, %.loc14_9.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param 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 8c4c3bc09c90..61b7c3884f98 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -8,32 +8,44 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/if_expr/fail_not_in_function.carbon -// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+12]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+16]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: let x: i32 = if true then 1 else 0; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+8]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+12]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: let x: i32 = if true then 1 else 0; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: +// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+8]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: let x: i32 = if true then 1 else 0; +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+4]]:22: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: let x: i32 = if true then 1 else 0; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: let x: i32 = if true then 1 else 0; +// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+4]]:8: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var y: if true then i32 else f64; +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +var y: if true then i32 else f64; + +// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+8]]:9: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fn F(a: if true then i32 else f64); +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ +// CHECK:STDERR: +// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+4]]:9: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fn F(a: if true then i32 else f64); +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: +fn F(a: if true then i32 else f64); + class C { - // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+11]]:10: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] - // CHECK:STDERR: var n: if true then i32 else f64; - // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: - // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+7]]:10: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] + // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+3]]:10: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var n: if true then i32 else f64; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: - // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+3]]:18: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] - // CHECK:STDERR: var n: if true then i32 else f64; - // CHECK:STDERR: ^~~~~~~~ var n: if true then i32 else f64; } @@ -43,7 +55,12 @@ class C { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %C: type = class_type @C [template] +// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %i32 [template] +// CHECK:STDOUT: %struct_type.n: type = struct_type {.n: %i32} [template] +// CHECK:STDOUT: %complete_type.4: = complete_type_witness %struct_type.n [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -59,25 +76,36 @@ class C { // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .Core = imports.%Core -// CHECK:STDOUT: .x = .inst43.loc23_5 +// CHECK:STDOUT: .x = .inst43.loc27_5 +// CHECK:STDOUT: .y = %y +// CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: .C = %C.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %y.var: ref %i32 = var y +// CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %a.patt: %i32 = binding_pattern a +// CHECK:STDOUT: %a.param_patt: %i32 = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %a: %i32 = bind_name a, %a.param +// CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %true br !if.expr.then else br !if.expr.else +// CHECK:STDOUT: %.loc49: %C.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .n = .inst559.loc37_8 -// CHECK:STDOUT: complete_type_witness = .inst561.loc38_1 +// CHECK:STDOUT: .n = %.loc49 +// CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: fn @F(%a.param_patt: %i32); +// CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index 55c7e99d6b34..8c669d732cba 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -46,8 +46,6 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %ConditionIsNonConstant.type: type = fn_type @ConditionIsNonConstant [template] // CHECK:STDOUT: %ConditionIsNonConstant: %ConditionIsNonConstant.type = struct_value () [template] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -70,31 +68,18 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: %b.patt: bool = binding_pattern b // CHECK:STDOUT: %b.param_patt: bool = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc4_30.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc4_30.2: type = converted %bool.make_type, %.loc4_30.1 [template = bool] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_30.3: type = splice_block %.loc4_30.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc4_30.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc4_30.2: type = converted %bool.make_type, %.loc4_30.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @ConditionIsNonConstant(%b.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %b.ref: bool = name_ref b, %b -// CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %int_32.loc12_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result(%i32.loc12_20) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %int_32.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: br !if.expr.result(%i32.loc12_29) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc12: type = block_arg !if.expr.result // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] @@ -107,11 +92,7 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: constants { // CHECK:STDOUT: %ChosenBranchIsNonConstant.type: type = fn_type @ChosenBranchIsNonConstant [template] // CHECK:STDOUT: %ChosenBranchIsNonConstant: %ChosenBranchIsNonConstant.type = struct_value () [template] -// CHECK:STDOUT: %true: bool = bool_literal true [template] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -139,38 +120,10 @@ fn ChosenBranchIsNonConstant(t: type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @ChosenBranchIsNonConstant(%t.param_patt: type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %true br !if.expr.then.loc9 else br !if.expr.else.loc9 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc9: -// CHECK:STDOUT: %t.ref.loc9: type = name_ref t, %t -// CHECK:STDOUT: br !if.expr.result.loc9(%t.ref.loc9) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc9: -// 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: br !if.expr.result.loc9(%i32.loc9) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc9: -// CHECK:STDOUT: %.loc9: type = block_arg !if.expr.result.loc9 // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: assign %v.var, -// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %false br !if.expr.then.loc13 else br !if.expr.else.loc13 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc13: -// 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: br !if.expr.result.loc13(%i32.loc13) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc13: -// CHECK:STDOUT: %t.ref.loc13: type = name_ref t, %t -// CHECK:STDOUT: br !if.expr.result.loc13(%t.ref.loc13) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc13: -// CHECK:STDOUT: %.loc13: type = block_arg !if.expr.result.loc13 // CHECK:STDOUT: %w.var: ref = var w // CHECK:STDOUT: %w: ref = bind_name w, %w.var // CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [template = constants.%int_1] diff --git a/toolchain/check/testdata/if_expr/nested.carbon b/toolchain/check/testdata/if_expr/nested.carbon index c8d5e8fe113f..e700adafd626 100644 --- a/toolchain/check/testdata/if_expr/nested.carbon +++ b/toolchain/check/testdata/if_expr/nested.carbon @@ -69,22 +69,28 @@ fn F(a: bool, b: bool, c: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc11_9: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type.loc11_9 [template = bool] -// CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type.loc11_9, %.loc11_9.1 [template = bool] -// CHECK:STDOUT: %bool.make_type.loc11_18: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %bool.make_type.loc11_18 [template = bool] -// CHECK:STDOUT: %.loc11_18.2: type = converted %bool.make_type.loc11_18, %.loc11_18.1 [template = bool] -// CHECK:STDOUT: %bool.make_type.loc11_27: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %bool.make_type.loc11_27 [template = bool] -// CHECK:STDOUT: %.loc11_27.2: type = converted %bool.make_type.loc11_27, %.loc11_27.1 [template = bool] // CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_9.3: type = splice_block %.loc11_9.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc11_9: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type.loc11_9 [template = bool] +// CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type.loc11_9, %.loc11_9.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: bool = bind_name a, %a.param // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc11_18.3: type = splice_block %.loc11_18.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc11_18: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %bool.make_type.loc11_18 [template = bool] +// CHECK:STDOUT: %.loc11_18.2: type = converted %bool.make_type.loc11_18, %.loc11_18.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %c.param: bool = value_param runtime_param2 +// CHECK:STDOUT: %.loc11_27.3: type = splice_block %.loc11_27.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc11_27: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %bool.make_type.loc11_27 [template = bool] +// CHECK:STDOUT: %.loc11_27.2: type = converted %bool.make_type.loc11_27, %.loc11_27.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: bool = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param3 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/if_expr/struct.carbon b/toolchain/check/testdata/if_expr/struct.carbon index 55583e3ee955..3912d5aeb464 100644 --- a/toolchain/check/testdata/if_expr/struct.carbon +++ b/toolchain/check/testdata/if_expr/struct.carbon @@ -65,22 +65,26 @@ fn F(cond: bool) { // CHECK:STDOUT: %s.patt: %struct_type.a.b.1 = binding_pattern s // CHECK:STDOUT: %s.param_patt: %struct_type.a.b.1 = value_param_pattern %s.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %s.param: %struct_type.a.b.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %struct_type.a.b [template = constants.%struct_type.a.b.1] { +// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %s: %struct_type.a.b.1 = bind_name s, %s.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %cond.patt: bool = binding_pattern cond // CHECK:STDOUT: %cond.param_patt: bool = value_param_pattern %cond.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc13_12.2: type = converted %bool.make_type, %.loc13_12.1 [template = bool] // CHECK:STDOUT: %cond.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_12.3: type = splice_block %.loc13_12.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc13_12.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc13_12.2: type = converted %bool.make_type, %.loc13_12.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %cond: bool = bind_name cond, %cond.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -89,11 +93,6 @@ fn F(cond: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%cond.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc14_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %a.var: ref %struct_type.a.b.1 = var a // CHECK:STDOUT: %a: ref %struct_type.a.b.1 = bind_name a, %a.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] diff --git a/toolchain/check/testdata/impl/compound.carbon b/toolchain/check/testdata/impl/compound.carbon index 4f6fa015cb59..3b9f11ca4999 100644 --- a/toolchain/check/testdata/impl/compound.carbon +++ b/toolchain/check/testdata/impl/compound.carbon @@ -96,38 +96,46 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %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: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCall.decl: %InstanceCall.type = fn_decl @InstanceCall [template = constants.%InstanceCall] { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %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: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc25: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %NonInstanceCallIndirect.decl: %NonInstanceCallIndirect.type = fn_decl @NonInstanceCallIndirect [template = constants.%NonInstanceCallIndirect] { // CHECK:STDOUT: %p.patt: %ptr = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %.loc29: type = splice_block %ptr [template = constants.%ptr] { +// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: %InstanceCallIndirect.decl: %InstanceCallIndirect.type = fn_decl @InstanceCallIndirect [template = constants.%InstanceCallIndirect] { // CHECK:STDOUT: %p.patt: %ptr = binding_pattern p // CHECK:STDOUT: %p.param_patt: %ptr = value_param_pattern %p.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %p.param: %ptr = value_param runtime_param0 +// CHECK:STDOUT: %.loc33: type = splice_block %ptr [template = constants.%ptr] { +// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr = bind_name p, %p.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -140,10 +148,12 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %self.patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type.1) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %.loc13: type = converted %Self.ref, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_14.2: type = splice_block %.loc13_14.1 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1)] { +// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc13_14.1: type = converted %Self.ref, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @G.1.%Self.as_type.loc13_14.1 (%Self.as_type.1) = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc1: %G.assoc_type = assoc_entity element1, %G.decl [template = constants.%assoc1] @@ -161,9 +171,11 @@ fn InstanceCallIndirect(p: i32*) { // CHECK:STDOUT: %self.patt: %i32 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %i32 = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %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: %self.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%F.decl, %G.decl) [template = constants.%interface.1] diff --git a/toolchain/check/testdata/impl/extend_impl.carbon b/toolchain/check/testdata/impl/extend_impl.carbon index e7d9e6834bdc..35dd68abf52a 100644 --- a/toolchain/check/testdata/impl/extend_impl.carbon +++ b/toolchain/check/testdata/impl/extend_impl.carbon @@ -65,8 +65,8 @@ fn G(c: C) { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index a51b6d2a9e6e..ad5b63dff11f 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -123,8 +123,8 @@ class X(U:! type) { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -177,8 +177,6 @@ class X(U:! type) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @Param { -// 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: %.loc9: %Param.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x.1 [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -227,8 +225,6 @@ class X(U:! type) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%c.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %.loc21_17: %F.assoc_type.2 = specific_constant @HasF.%assoc0.loc5_14.1, @HasF(constants.%Param) [template = constants.%assoc0.2] // CHECK:STDOUT: %F.ref.loc21: %F.assoc_type.2 = name_ref F, %.loc21_17 [template = constants.%assoc0.2] @@ -240,8 +236,6 @@ class X(U:! type) { // CHECK:STDOUT: %.loc21_21.1: ref %i32 = class_element_access %.loc21_20.2, element0 // CHECK:STDOUT: %.loc21_21.2: %i32 = bind_value %.loc21_21.1 // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc21_21.2 -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %c.ref: %C = name_ref c, %c @@ -371,14 +365,16 @@ class X(U:! type) { // CHECK:STDOUT: %t.patt: @F.1.%T (%T) = binding_pattern t // CHECK:STDOUT: %t.param_patt: @F.1.%T (%T) = value_param_pattern %t.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc5_14.1: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc5_14.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %T.ref: type = name_ref T, @I.%T.loc4_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_14.3: type = splice_block %.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %.loc5_14.1: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc5_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_14.2: type = converted %Self.ref, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %t.param: @F.1.%T (%T) = value_param runtime_param1 +// CHECK:STDOUT: %T.ref: type = name_ref T, @I.%T.loc4_13.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %t: @F.1.%T (%T) = bind_name t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0.loc5_25.1: @I.%F.assoc_type (%F.assoc_type.1) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc5_25.2 (constants.%assoc0.1)] @@ -408,12 +404,14 @@ class X(U:! type) { // CHECK:STDOUT: %t.patt: @F.2.%U (%U) = binding_pattern t // CHECK:STDOUT: %t.param_patt: @F.2.%U (%U) = value_param_pattern %t.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10: type = specific_constant constants.%X, @X(constants.%U) [symbolic = %X (constants.%X)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10 [symbolic = %X (constants.%X)] -// CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc8_9.1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %self.param: @F.2.%X (%X) = value_param runtime_param0 +// CHECK:STDOUT: %.loc10_16.2: type = splice_block %Self.ref [symbolic = %X (constants.%X)] { +// CHECK:STDOUT: %.loc10_16.1: type = specific_constant constants.%X, @X(constants.%U) [symbolic = %X (constants.%X)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc10_16.1 [symbolic = %X (constants.%X)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.2.%X (%X) = bind_name self, %self.param // CHECK:STDOUT: %t.param: @F.2.%U (%U) = value_param runtime_param1 +// CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc8_9.1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %t: @F.2.%U (%U) = bind_name t, %t.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface.loc9_23.1: = interface_witness (%F.decl) [symbolic = %interface.loc9_23.2 (constants.%interface)] diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index c145cada11d0..bae7d9fe74da 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -67,9 +67,11 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %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: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc22: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -80,10 +82,12 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %self.patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %.loc12: type = converted %Self.ref, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %self.param: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_14.2: type = splice_block %.loc12_14.1 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] { +// CHECK:STDOUT: %Self.ref: %Simple.type = name_ref Self, @Simple.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_14.1: type = converted %Self.ref, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @G.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %G.assoc_type = assoc_entity element0, %G.decl [template = constants.%assoc0.1] @@ -99,8 +103,8 @@ fn InstanceCall(n: i32) { // CHECK:STDOUT: %self.patt: = binding_pattern self // CHECK:STDOUT: %self.param_patt: = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Undeclared.ref: = name_ref Undeclared, [template = ] // CHECK:STDOUT: %self.param: = value_param runtime_param0 +// CHECK:STDOUT: %Undeclared.ref: = name_ref Undeclared, [template = ] // CHECK:STDOUT: %self: = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness () [template = ] diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index 3834a64ceba6..bfd1018450ce 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -87,8 +87,8 @@ class C { // CHECK:STDOUT: %x.patt: @F.1.%T (%T) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @F.1.%T (%T) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @GenericInterface.%T.loc11_28.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %x.param: @F.1.%T (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, @GenericInterface.%T.loc11_28.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %x: @F.1.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0.loc12_13.1: @GenericInterface.%F.assoc_type (%F.assoc_type) = assoc_entity element0, %F.decl [symbolic = %assoc0.loc12_13.2 (constants.%assoc0)] @@ -116,8 +116,8 @@ class C { // CHECK:STDOUT: %x.patt: @F.2.%T (%T) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @F.2.%T (%T) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, @impl.%T.loc19_23.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %x.param: @F.2.%T (%T) = value_param runtime_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, @impl.%T.loc19_23.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %x: @F.2.%T (%T) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface.loc19_56.1: = interface_witness (%F.decl) [symbolic = %interface.loc19_56.2 (constants.%interface)] diff --git a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon index b316c14142a5..1eb3a0f3b2d1 100644 --- a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon @@ -77,8 +77,8 @@ fn F(c: C) { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index 642aa9c32eba..e62f132969b5 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -388,18 +388,22 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc93_26: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc93_26.1: type = value_of_initializer %bool.make_type.loc93_26 [template = bool] -// CHECK:STDOUT: %.loc93_26.2: type = converted %bool.make_type.loc93_26, %.loc93_26.1 [template = bool] -// CHECK:STDOUT: %bool.make_type.loc93_35: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc93_35.1: type = value_of_initializer %bool.make_type.loc93_35 [template = bool] -// CHECK:STDOUT: %.loc93_35.2: type = converted %bool.make_type.loc93_35, %.loc93_35.1 [template = bool] // CHECK:STDOUT: %bool.make_type.loc93_44: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc93_44.1: type = value_of_initializer %bool.make_type.loc93_44 [template = bool] // CHECK:STDOUT: %.loc93_44.2: type = converted %bool.make_type.loc93_44, %.loc93_44.1 [template = bool] // CHECK:STDOUT: %self.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc93_26.3: type = splice_block %.loc93_26.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc93_26: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc93_26.1: type = value_of_initializer %bool.make_type.loc93_26 [template = bool] +// CHECK:STDOUT: %.loc93_26.2: type = converted %bool.make_type.loc93_26, %.loc93_26.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc93_35.3: type = splice_block %.loc93_35.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc93_35: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc93_35.1: type = value_of_initializer %bool.make_type.loc93_35 [template = bool] +// CHECK:STDOUT: %.loc93_35.2: type = converted %bool.make_type.loc93_35, %.loc93_35.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -420,24 +424,26 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: @F.13.%array_type.loc188_52.1 (%array_type.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.13.%array_type.loc188_52.1 (%array_type.1) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc188_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %Self.as_type.loc188_16.2: type = facet_access_type %Self.ref.loc188_12 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc188_16: type = converted %Self.ref.loc188_12, %Self.as_type.loc188_16.2 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %ptr.loc188_16.2: type = ptr_type %Self.as_type [symbolic = %ptr.loc188_16.1 (constants.%ptr.1)] -// CHECK:STDOUT: %Self.ref.loc188_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] -// CHECK:STDOUT: %Self.as_type.loc188_24: type = facet_access_type %Self.ref.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc188_24: type = converted %Self.ref.loc188_24, %Self.as_type.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] -// 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: %struct_type.x.y.loc188_37.2: type = struct_type {.x: %Self.as_type, .y: %i32} [symbolic = %struct_type.x.y.loc188_37.1 (constants.%struct_type.x.y.1)] -// CHECK:STDOUT: %.loc188_38.1: %tuple.type.1 = tuple_literal (%ptr.loc188_16.2, %struct_type.x.y.loc188_37.2) -// CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %Self.ref.loc188_45: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] // CHECK:STDOUT: %Self.as_type.loc188_45: type = facet_access_type %Self.ref.loc188_45 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc188_45: type = converted %Self.ref.loc188_45, %Self.as_type.loc188_45 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] // CHECK:STDOUT: %array_type.loc188_52.2: type = array_type %int_4, %Self.as_type [symbolic = %array_type.loc188_52.1 (constants.%array_type.1)] // CHECK:STDOUT: %x.param: @F.13.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc188_38.3: type = splice_block %.loc188_38.2 [symbolic = %tuple.type (constants.%tuple.type.2)] { +// CHECK:STDOUT: %Self.ref.loc188_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %Self.as_type.loc188_16.2: type = facet_access_type %Self.ref.loc188_12 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc188_16: type = converted %Self.ref.loc188_12, %Self.as_type.loc188_16.2 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %ptr.loc188_16.2: type = ptr_type %Self.as_type [symbolic = %ptr.loc188_16.1 (constants.%ptr.1)] +// CHECK:STDOUT: %Self.ref.loc188_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.3)] +// CHECK:STDOUT: %Self.as_type.loc188_24: type = facet_access_type %Self.ref.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc188_24: type = converted %Self.ref.loc188_24, %Self.as_type.loc188_24 [symbolic = %Self.as_type.loc188_16.1 (constants.%Self.as_type)] +// 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: %struct_type.x.y.loc188_37.2: type = struct_type {.x: %Self.as_type, .y: %i32} [symbolic = %struct_type.x.y.loc188_37.1 (constants.%struct_type.x.y.1)] +// CHECK:STDOUT: %.loc188_38.1: %tuple.type.1 = tuple_literal (%ptr.loc188_16.2, %struct_type.x.y.loc188_37.2) +// CHECK:STDOUT: %.loc188_38.2: type = converted %.loc188_38.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.13.%tuple.type (%tuple.type.2) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @F.13.%array_type.loc188_52.1 (%array_type.1) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.13.%array_type.loc188_52.1 (%array_type.1) = return_slot %return.param @@ -481,10 +487,12 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %b.patt: bool = binding_pattern b // CHECK:STDOUT: %b.param_patt: bool = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc62_13.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc62_13.2: type = converted %bool.make_type, %.loc62_13.1 [template = bool] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc62_13.3: type = splice_block %.loc62_13.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc62_13.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc62_13.2: type = converted %bool.make_type, %.loc62_13.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness () [template = ] @@ -499,8 +507,8 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %self.patt: %FExtraImplicitParam = binding_pattern self // CHECK:STDOUT: %self.param_patt: %FExtraImplicitParam = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [template = constants.%FExtraImplicitParam] // CHECK:STDOUT: %self.param: %FExtraImplicitParam = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FExtraImplicitParam [template = constants.%FExtraImplicitParam] // CHECK:STDOUT: %self: %FExtraImplicitParam = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness () [template = ] @@ -535,13 +543,15 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc104_16: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc104_16.1: type = value_of_initializer %bool.make_type.loc104_16 [template = bool] -// CHECK:STDOUT: %.loc104_16.2: type = converted %bool.make_type.loc104_16, %.loc104_16.1 [template = bool] // CHECK:STDOUT: %bool.make_type.loc104_27: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc104_27.1: type = value_of_initializer %bool.make_type.loc104_27 [template = bool] // CHECK:STDOUT: %.loc104_27.2: type = converted %bool.make_type.loc104_27, %.loc104_27.1 [template = bool] // CHECK:STDOUT: %self.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc104_16.3: type = splice_block %.loc104_16.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc104_16: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc104_16.1: type = value_of_initializer %bool.make_type.loc104_16 [template = bool] +// CHECK:STDOUT: %.loc104_16.2: type = converted %bool.make_type.loc104_16, %.loc104_16.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -560,13 +570,15 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc117_13: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc117_13.1: type = value_of_initializer %bool.make_type.loc117_13 [template = bool] -// CHECK:STDOUT: %.loc117_13.2: type = converted %bool.make_type.loc117_13, %.loc117_13.1 [template = bool] // CHECK:STDOUT: %bool.make_type.loc117_22: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc117_22.1: type = value_of_initializer %bool.make_type.loc117_22 [template = bool] // CHECK:STDOUT: %.loc117_22.2: type = converted %bool.make_type.loc117_22, %.loc117_22.1 [template = bool] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc117_13.3: type = splice_block %.loc117_13.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc117_13: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc117_13.1: type = value_of_initializer %bool.make_type.loc117_13 [template = bool] +// CHECK:STDOUT: %.loc117_13.2: type = converted %bool.make_type.loc117_13, %.loc117_13.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -585,15 +597,19 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %b.patt: bool = binding_pattern b // CHECK:STDOUT: %b.param_patt: bool = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc130_16: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc130_16.1: type = value_of_initializer %bool.make_type.loc130_16 [template = bool] -// CHECK:STDOUT: %.loc130_16.2: type = converted %bool.make_type.loc130_16, %.loc130_16.1 [template = bool] -// CHECK:STDOUT: %bool.make_type.loc130_25: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc130_25.1: type = value_of_initializer %bool.make_type.loc130_25 [template = bool] -// CHECK:STDOUT: %.loc130_25.2: type = converted %bool.make_type.loc130_25, %.loc130_25.1 [template = bool] // CHECK:STDOUT: %self.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc130_16.3: type = splice_block %.loc130_16.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc130_16: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc130_16.1: type = value_of_initializer %bool.make_type.loc130_16 [template = bool] +// CHECK:STDOUT: %.loc130_16.2: type = converted %bool.make_type.loc130_16, %.loc130_16.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc130_25.3: type = splice_block %.loc130_25.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc130_25: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc130_25.1: type = value_of_initializer %bool.make_type.loc130_25 [template = bool] +// CHECK:STDOUT: %.loc130_25.2: type = converted %bool.make_type.loc130_25, %.loc130_25.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness () [template = ] @@ -612,16 +628,18 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc143_16: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc143_16.1: type = value_of_initializer %bool.make_type.loc143_16 [template = bool] -// CHECK:STDOUT: %.loc143_16.2: type = converted %bool.make_type.loc143_16, %.loc143_16.1 [template = bool] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [template = constants.%FDifferentParamType] // CHECK:STDOUT: %bool.make_type.loc143_34: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc143_34.1: type = value_of_initializer %bool.make_type.loc143_34 [template = bool] // CHECK:STDOUT: %.loc143_34.2: type = converted %bool.make_type.loc143_34, %.loc143_34.1 [template = bool] // CHECK:STDOUT: %self.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc143_16.3: type = splice_block %.loc143_16.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc143_16: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc143_16.1: type = value_of_initializer %bool.make_type.loc143_16 [template = bool] +// CHECK:STDOUT: %.loc143_16.2: type = converted %bool.make_type.loc143_16, %.loc143_16.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %b.param: %FDifferentParamType = value_param runtime_param1 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentParamType [template = constants.%FDifferentParamType] // CHECK:STDOUT: %b: %FDifferentParamType = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -642,16 +660,18 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] -// CHECK:STDOUT: %bool.make_type.loc156_25: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc156_25.1: type = value_of_initializer %bool.make_type.loc156_25 [template = bool] -// CHECK:STDOUT: %.loc156_25.2: type = converted %bool.make_type.loc156_25, %.loc156_25.1 [template = bool] // CHECK:STDOUT: %bool.make_type.loc156_34: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc156_34.1: type = value_of_initializer %bool.make_type.loc156_34 [template = bool] // CHECK:STDOUT: %.loc156_34.2: type = converted %bool.make_type.loc156_34, %.loc156_34.1 [template = bool] // CHECK:STDOUT: %self.param: %FDifferentImplicitParamType = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentImplicitParamType [template = constants.%FDifferentImplicitParamType] // CHECK:STDOUT: %self: %FDifferentImplicitParamType = bind_name self, %self.param // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc156_25.3: type = splice_block %.loc156_25.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc156_25: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc156_25.1: type = value_of_initializer %bool.make_type.loc156_25 [template = bool] +// CHECK:STDOUT: %.loc156_25.2: type = converted %bool.make_type.loc156_25, %.loc156_25.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -672,16 +692,20 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: %FDifferentReturnType = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %FDifferentReturnType = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc169_16: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc169_16.1: type = value_of_initializer %bool.make_type.loc169_16 [template = bool] -// CHECK:STDOUT: %.loc169_16.2: type = converted %bool.make_type.loc169_16, %.loc169_16.1 [template = bool] -// CHECK:STDOUT: %bool.make_type.loc169_25: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc169_25.1: type = value_of_initializer %bool.make_type.loc169_25 [template = bool] -// CHECK:STDOUT: %.loc169_25.2: type = converted %bool.make_type.loc169_25, %.loc169_25.1 [template = bool] // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%FDifferentReturnType [template = constants.%FDifferentReturnType] // CHECK:STDOUT: %self.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc169_16.3: type = splice_block %.loc169_16.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc169_16: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc169_16.1: type = value_of_initializer %bool.make_type.loc169_16 [template = bool] +// CHECK:STDOUT: %.loc169_16.2: type = converted %bool.make_type.loc169_16, %.loc169_16.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %b.param: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc169_25.3: type = splice_block %.loc169_25.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc169_25: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc169_25.1: type = value_of_initializer %bool.make_type.loc169_25 [template = bool] +// CHECK:STDOUT: %.loc169_25.2: type = converted %bool.make_type.loc169_25, %.loc169_25.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %FDifferentReturnType = out_param runtime_param2 // CHECK:STDOUT: %return: ref %FDifferentReturnType = return_slot %return.param @@ -702,18 +726,22 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc183_16: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc183_16.1: type = value_of_initializer %bool.make_type.loc183_16 [template = bool] -// CHECK:STDOUT: %.loc183_16.2: type = converted %bool.make_type.loc183_16, %.loc183_16.1 [template = bool] -// CHECK:STDOUT: %bool.make_type.loc183_29: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc183_29.1: type = value_of_initializer %bool.make_type.loc183_29 [template = bool] -// CHECK:STDOUT: %.loc183_29.2: type = converted %bool.make_type.loc183_29, %.loc183_29.1 [template = bool] // CHECK:STDOUT: %bool.make_type.loc183_38: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc183_38.1: type = value_of_initializer %bool.make_type.loc183_38 [template = bool] // CHECK:STDOUT: %.loc183_38.2: type = converted %bool.make_type.loc183_38, %.loc183_38.1 [template = bool] // CHECK:STDOUT: %self.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc183_16.3: type = splice_block %.loc183_16.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc183_16: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc183_16.1: type = value_of_initializer %bool.make_type.loc183_16 [template = bool] +// CHECK:STDOUT: %.loc183_16.2: type = converted %bool.make_type.loc183_16, %.loc183_16.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: bool = bind_name self, %self.param // CHECK:STDOUT: %not_b.param: bool = value_param runtime_param1 +// CHECK:STDOUT: %.loc183_29.3: type = splice_block %.loc183_29.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc183_29: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc183_29.1: type = value_of_initializer %bool.make_type.loc183_29 [template = bool] +// CHECK:STDOUT: %.loc183_29.2: type = converted %bool.make_type.loc183_29, %.loc183_29.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %not_b: bool = bind_name not_b, %not_b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -732,19 +760,21 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: %array_type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %array_type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] -// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadParam [template = constants.%ptr.2] -// CHECK:STDOUT: %int_32.loc200_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc200_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc200_49: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc200_49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %i32, .y: %i32} [template = constants.%struct_type.x.y.2] -// CHECK:STDOUT: %.loc200_53.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) -// CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_60: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] // CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam [template = constants.%array_type.2] // CHECK:STDOUT: %x.param: %tuple.type.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc200_53.3: type = splice_block %.loc200_53.2 [template = constants.%tuple.type.3] { +// CHECK:STDOUT: %SelfNestedBadParam.ref.loc200_14: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] +// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadParam [template = constants.%ptr.2] +// CHECK:STDOUT: %int_32.loc200_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc200_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc200_49: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc200_49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %i32, .y: %i32} [template = constants.%struct_type.x.y.2] +// CHECK:STDOUT: %.loc200_53.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) +// CHECK:STDOUT: %.loc200_53.2: type = converted %.loc200_53.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.3 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %array_type.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %array_type.2 = return_slot %return.param @@ -763,18 +793,20 @@ class SelfNestedBadReturnType { // CHECK:STDOUT: %return.patt: %array_type.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %array_type.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] -// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadReturnType [template = constants.%ptr.3] -// CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] -// 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: %struct_type.x.y: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template = constants.%struct_type.x.y.4] -// CHECK:STDOUT: %.loc212_78.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) -// CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%tuple.type.5 [template = constants.%tuple.type.5] // CHECK:STDOUT: %SelfNestedBadParam.ref: type = name_ref SelfNestedBadParam, file.%SelfNestedBadParam.decl [template = constants.%SelfNestedBadParam] // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4] // CHECK:STDOUT: %array_type: type = array_type %int_4, %SelfNestedBadParam [template = constants.%array_type.2] // CHECK:STDOUT: %x.param: %tuple.type.5 = value_param runtime_param0 +// CHECK:STDOUT: %.loc212_78.3: type = splice_block %.loc212_78.2 [template = constants.%tuple.type.5] { +// CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_14: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] +// CHECK:STDOUT: %ptr: type = ptr_type %SelfNestedBadReturnType [template = constants.%ptr.3] +// CHECK:STDOUT: %SelfNestedBadReturnType.ref.loc212_45: type = name_ref SelfNestedBadReturnType, file.%SelfNestedBadReturnType.decl [template = constants.%SelfNestedBadReturnType] +// 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: %struct_type.x.y: type = struct_type {.x: %SelfNestedBadReturnType, .y: %i32} [template = constants.%struct_type.x.y.4] +// CHECK:STDOUT: %.loc212_78.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) +// CHECK:STDOUT: %.loc212_78.2: type = converted %.loc212_78.1, constants.%tuple.type.5 [template = constants.%tuple.type.5] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.5 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %array_type.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %array_type.2 = return_slot %return.param diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index ea967547bed1..f7321d9e6a46 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -73,10 +73,10 @@ impl i32 as I { // CHECK:STDOUT: %X.patt.loc11_19.1: @C.%T.loc11_9.2 (%T) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc11_19.2 (constants.%X.patt)] // CHECK:STDOUT: %X.param_patt: @C.%T.loc11_9.2 (%T) = value_param_pattern %X.patt.loc11_19.1, runtime_param [symbolic = %X.patt.loc11_19.2 (constants.%X.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_9.1 [symbolic = %T.loc11_9.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc11_9.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_9.2 (constants.%T)] // CHECK:STDOUT: %X.param: @C.%T.loc11_9.2 (%T) = value_param runtime_param +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc11_9.1 [symbolic = %T.loc11_9.2 (constants.%T)] // CHECK:STDOUT: %X.loc11_19.1: @C.%T.loc11_9.2 (%T) = bind_symbolic_name X, 1, %X.param [symbolic = %X.loc11_19.2 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %I.decl: type = interface_decl @I [template = constants.%I.type] {} {} @@ -93,10 +93,12 @@ impl i32 as I { // CHECK:STDOUT: %c.patt: @F.1.%C.loc14_17.1 (%C.2) = binding_pattern c // CHECK:STDOUT: %c.param_patt: @F.1.%C.loc14_17.1 (%C.2) = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %C.loc14_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self) [symbolic = %C.loc14_17.1 (constants.%C.2)] // CHECK:STDOUT: %c.param: @F.1.%C.loc14_17.1 (%C.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc14: type = splice_block %C.loc14_17.2 [symbolic = %C.loc14_17.1 (constants.%C.2)] { +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %C.loc14_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self) [symbolic = %C.loc14_17.1 (constants.%C.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: @F.1.%C.loc14_17.1 (%C.2) = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] @@ -112,11 +114,13 @@ impl i32 as I { // CHECK:STDOUT: %c.patt: %C.3 = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C.3 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] -// 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: %C: type = class_type @C, @C(type, constants.%i32) [template = constants.%C.3] // CHECK:STDOUT: %c.param: %C.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc24: type = splice_block %C [template = constants.%C.3] { +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] +// 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: %C: type = class_type @C, @C(type, constants.%i32) [template = constants.%C.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %C.3 = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness () [template = ] diff --git a/toolchain/check/testdata/impl/impl_as.carbon b/toolchain/check/testdata/impl/impl_as.carbon index 5b32ce087ff7..da8b9aadd91a 100644 --- a/toolchain/check/testdata/impl/impl_as.carbon +++ b/toolchain/check/testdata/impl/impl_as.carbon @@ -97,7 +97,6 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %.loc19_19.1: %empty_struct_type = struct_literal () diff --git a/toolchain/check/testdata/impl/lookup/alias.carbon b/toolchain/check/testdata/impl/lookup/alias.carbon index ac3586b59830..a71fc77e050b 100644 --- a/toolchain/check/testdata/impl/lookup/alias.carbon +++ b/toolchain/check/testdata/impl/lookup/alias.carbon @@ -71,8 +71,8 @@ fn G(c: C) { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon index d6622d412ade..ca3fe49f966c 100644 --- a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon @@ -65,8 +65,8 @@ fn F(c: C) { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc19: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc19: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index 782a372382d6..25893dc3b9dd 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -174,9 +174,11 @@ fn G(x: A) { // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %x.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_10.3: type = splice_block %.loc12_10.2 [template = constants.%empty_struct_type] { +// CHECK:STDOUT: %.loc12_10.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -325,11 +327,13 @@ fn G(x: A) { // CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %.loc12_17.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc12_17.2: type = converted %.loc12_17.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %x.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_10.3: type = splice_block %.loc12_10.2 [template = constants.%empty_struct_type] { +// CHECK:STDOUT: %.loc12_10.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param @@ -344,13 +348,15 @@ fn G(x: A) { // CHECK:STDOUT: %return.patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc5_14: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref.loc5_14 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc5_14: type = converted %Self.ref.loc5_14, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %Self.ref.loc5_25: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_25: type = facet_access_type %Self.ref.loc5_25 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc5_25: type = converted %Self.ref.loc5_25, %Self.as_type.loc5_25 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_14.2: type = splice_block %.loc5_14.1 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref.loc5_14: %HasF.type = name_ref Self, @HasF.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc5_14.2: type = facet_access_type %Self.ref.loc5_14 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_14.1: type = converted %Self.ref.loc5_14, %Self.as_type.loc5_14.2 [symbolic = %Self.as_type.loc5_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc5_14.1 (%Self.as_type) = return_slot %return.param @@ -379,9 +385,9 @@ fn G(x: A) { // CHECK:STDOUT: %return.patt: @F.2.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.2.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)] // CHECK:STDOUT: %T.ref: type = name_ref T, @impl.%T.loc8_14.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @F.2.%T (%T) = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%T.ref [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self: @F.2.%T (%T) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @F.2.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.2.%T (%T) = return_slot %return.param @@ -541,11 +547,13 @@ fn G(x: A) { // CHECK:STDOUT: %x.patt: %C.2 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %C.2 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.generic] -// CHECK:STDOUT: %.loc14_12: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc14_13: type = converted %.loc14_12, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [template = constants.%C.2] // CHECK:STDOUT: %x.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_13.2: 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: %.loc14_12: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc14_13.1: type = converted %.loc14_12, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [template = constants.%C.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %C.2 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -740,9 +748,11 @@ fn G(x: A) { // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_10.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %x.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_10.3: type = splice_block %.loc12_10.2 [template = constants.%empty_struct_type] { +// CHECK:STDOUT: %.loc12_10.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_10.2: type = converted %.loc12_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -941,9 +951,11 @@ fn G(x: A) { // CHECK:STDOUT: %x.patt: %empty_struct_type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_struct_type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_10.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %x.param: %empty_struct_type = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_10.3: type = splice_block %.loc13_10.2 [template = constants.%empty_struct_type] { +// CHECK:STDOUT: %.loc13_10.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc13_10.2: type = converted %.loc13_10.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_struct_type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1093,8 +1105,8 @@ fn G(x: A) { // CHECK:STDOUT: %x.patt: %A = binding_pattern x // CHECK:STDOUT: %x.param_patt: %A = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %x.param: %A = value_param runtime_param0 +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %x: %A = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/instance_method.carbon b/toolchain/check/testdata/impl/lookup/instance_method.carbon index 0bcaab9d7422..c8980db1643e 100644 --- a/toolchain/check/testdata/impl/lookup/instance_method.carbon +++ b/toolchain/check/testdata/impl/lookup/instance_method.carbon @@ -72,10 +72,10 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc11 [template = constants.%C] // 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: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl.loc11 [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -90,12 +90,14 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc14: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] // 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: %self.param: @F.1.%Self.as_type.loc14_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_14.2: type = splice_block %.loc14_14.1 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc14_14.1: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc14_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -115,10 +117,10 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // 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: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon index 19e684cceacd..c17a57d9e7f4 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon @@ -154,13 +154,15 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %return.patt: @TestGeneric.%W.loc16_16.2 (%W) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @TestGeneric.%W.loc16_16.2 (%W) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] -// CHECK:STDOUT: %W.ref.loc16_31: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)] -// CHECK:STDOUT: %A.loc16_32.1: type = class_type @A, @A(constants.%W) [symbolic = %A.loc16_32.2 (constants.%A.3)] // CHECK:STDOUT: %W.ref.loc16_38: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)] // CHECK:STDOUT: %W.param: type = value_param runtime_param // CHECK:STDOUT: %W.loc16_16.1: type = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc16_16.2 (constants.%W)] // CHECK:STDOUT: %a.param: @TestGeneric.%A.loc16_32.2 (%A.3) = value_param runtime_param0 +// CHECK:STDOUT: %.loc16: type = splice_block %A.loc16_32.1 [symbolic = %A.loc16_32.2 (constants.%A.3)] { +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] +// CHECK:STDOUT: %W.ref.loc16_31: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)] +// CHECK:STDOUT: %A.loc16_32.1: type = class_type @A, @A(constants.%W) [symbolic = %A.loc16_32.2 (constants.%A.3)] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: @TestGeneric.%A.loc16_32.2 (%A.3) = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref @TestGeneric.%W.loc16_16.2 (%W) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @TestGeneric.%W.loc16_16.2 (%W) = return_slot %return.param @@ -171,13 +173,15 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] -// CHECK:STDOUT: %.loc20_23: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc20_24: type = converted %.loc20_23, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%empty_struct_type) [template = constants.%A.4] // CHECK:STDOUT: %.loc20_31.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc20_31.2: type = converted %.loc20_31.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %a.param: %A.4 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_24.2: type = splice_block %A [template = constants.%A.4] { +// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.generic] +// CHECK:STDOUT: %.loc20_23: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc20_24.1: type = converted %.loc20_23, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %A: type = class_type @A, @A(constants.%empty_struct_type) [template = constants.%A.4] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %A.4 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param1 // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param @@ -204,12 +208,14 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %return.patt: @F.1.%U (%U) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.1.%U (%U) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_14.1: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%U) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc7_14.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc7_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc7_14.2: type = converted %Self.ref, %Self.as_type.loc7_14.2 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %U.ref: type = name_ref U, @I.%U.loc6_13.1 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_14.3: type = splice_block %.loc7_14.2 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %.loc7_14.1: @F.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%U) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @F.1.%I.type (%I.type.2) = name_ref Self, %.loc7_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc7_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc7_14.2: type = converted %Self.ref, %Self.as_type.loc7_14.2 [symbolic = %Self.as_type.loc7_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc7_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @F.1.%U (%U) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.1.%U (%U) = return_slot %return.param @@ -242,9 +248,9 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %return.patt: @F.2.%V (%V) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.2.%V (%V) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%A.loc10_27.1 [symbolic = %A (constants.%A.2)] // CHECK:STDOUT: %V.ref: type = name_ref V, @impl.%V.loc10_14.1 [symbolic = %V (constants.%V)] // CHECK:STDOUT: %self.param: @F.2.%A (%A.2) = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%A.loc10_27.1 [symbolic = %A (constants.%A.2)] // CHECK:STDOUT: %self: @F.2.%A (%A.2) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @F.2.%V (%V) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.2.%V (%V) = return_slot %return.param @@ -269,7 +275,6 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %complete_type.loc4_1.2: = complete_type_witness @A.%struct_type.n (%struct_type.n.1) [symbolic = %complete_type.loc4_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: // CHECK:STDOUT: class { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc2_9.1 [symbolic = %T.loc2_9.2 (constants.%T)] // CHECK:STDOUT: %.loc3: @A.%A.elem (%A.elem.1) = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type.loc4_1.1: = complete_type_witness %struct_type.n.1 [symbolic = %complete_type.loc4_1.2 (constants.%complete_type.1)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index 2c734473f7af..b748b2d67b94 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -474,9 +474,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %PackageA.ref.loc6: = name_ref PackageA, imports.%PackageA [template = imports.%PackageA] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %C.ref [template = constants.%C] { +// CHECK:STDOUT: %PackageA.ref.loc6: = name_ref PackageA, imports.%PackageA [template = imports.%PackageA] +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -587,9 +589,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %d.patt: %D = binding_pattern d // CHECK:STDOUT: %d.param_patt: %D = value_param_pattern %d.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %PackageB.ref: = name_ref PackageB, imports.%PackageB [template = imports.%PackageB] -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D] // CHECK:STDOUT: %d.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %.loc7: type = splice_block %D.ref [template = constants.%D] { +// CHECK:STDOUT: %PackageB.ref: = name_ref PackageB, imports.%PackageB [template = imports.%PackageB] +// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D] +// CHECK:STDOUT: } // CHECK:STDOUT: %d: %D = bind_name d, %d.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -728,9 +732,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %PackageA.ref: = name_ref PackageA, imports.%PackageA [template = imports.%PackageA] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %.loc7: type = splice_block %C.ref [template = constants.%C] { +// CHECK:STDOUT: %PackageA.ref: = name_ref PackageA, imports.%PackageA [template = imports.%PackageA] +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -861,9 +867,11 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %d.patt: %D = binding_pattern d // CHECK:STDOUT: %d.param_patt: %D = value_param_pattern %d.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %PackageB.ref.loc6: = name_ref PackageB, imports.%PackageB [template = imports.%PackageB] -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D] // CHECK:STDOUT: %d.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %.loc6: type = splice_block %D.ref [template = constants.%D] { +// CHECK:STDOUT: %PackageB.ref.loc6: = name_ref PackageB, imports.%PackageB [template = imports.%PackageB] +// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.1 [template = constants.%D] +// CHECK:STDOUT: } // CHECK:STDOUT: %d: %D = bind_name d, %d.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1093,10 +1101,10 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %X.patt.loc4_26.1: @AnyParam.%T.loc4_16.2 (%T) = symbolic_binding_pattern X, 1 [symbolic = %X.patt.loc4_26.2 (constants.%X.patt)] // CHECK:STDOUT: %X.param_patt: @AnyParam.%T.loc4_16.2 (%T) = value_param_pattern %X.patt.loc4_26.1, runtime_param [symbolic = %X.patt.loc4_26.2 (constants.%X.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_16.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_16.2 (constants.%T)] // CHECK:STDOUT: %X.param: @AnyParam.%T.loc4_16.2 (%T) = value_param runtime_param +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_16.1 [symbolic = %T.loc4_16.2 (constants.%T)] // CHECK:STDOUT: %X.loc4_26.1: @AnyParam.%T.loc4_16.2 (%T) = bind_symbolic_name X, 1, %X.param [symbolic = %X.loc4_26.2 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %Y.decl: type = interface_decl @Y [template = constants.%Y.type] {} {} @@ -1283,10 +1291,6 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @L() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %PackageHasParam.ref.loc13: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] -// CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%import_ref.1 [template = constants.%AnyParam.generic] -// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface.generic] -// CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface.generic) [template = constants.%AnyParam.2] // CHECK:STDOUT: %obj.var: ref %AnyParam.2 = var obj // CHECK:STDOUT: %obj: ref %AnyParam.2 = bind_name obj, %obj.var // CHECK:STDOUT: %.loc13_58.1: %empty_struct_type = struct_literal () @@ -1294,7 +1298,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %.loc13_59: init %AnyParam.2 = converted %.loc13_58.1, %.loc13_58.2 [template = constants.%AnyParam.val] // CHECK:STDOUT: assign %obj.var, %.loc13_59 // CHECK:STDOUT: %obj.ref: ref %AnyParam.2 = name_ref obj, %obj -// CHECK:STDOUT: %PackageHasParam.ref.loc14: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] +// CHECK:STDOUT: %PackageHasParam.ref: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%import_ref.4 [template = constants.%Y.type] // CHECK:STDOUT: %K.ref: %K.assoc_type = name_ref K, imports.%import_ref.6 [template = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: %K.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%K.1] @@ -1335,8 +1339,6 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %M.type: type = fn_type @M [template] // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %M: %M.type = struct_value () [template] -// CHECK:STDOUT: %AnyParam.type: type = generic_class_type @AnyParam [template] -// CHECK:STDOUT: %AnyParam.generic: %AnyParam.type = struct_value () [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic] @@ -1371,10 +1373,8 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: .GenericInterface = %import_ref.4 // CHECK:STDOUT: import PackageGenericInterface//default // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %AnyParam.type = import_ref PackageHasParam//default, AnyParam, loaded [template = constants.%AnyParam.generic] // CHECK:STDOUT: %import_ref.2: = import_ref PackageHasParam//default, loc4_34, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref PackageHasParam//default, inst34 [no loc], unloaded -// CHECK:STDOUT: %import_ref.4: %GenericInterface.type.1 = import_ref PackageGenericInterface//default, GenericInterface, loaded [template = constants.%GenericInterface.generic] // CHECK:STDOUT: %import_ref.5 = import_ref PackageGenericInterface//default, inst28 [no loc], unloaded // CHECK:STDOUT: %import_ref.6: type = import_ref PackageHasParam//default, Y, loaded [template = constants.%Y.type] // CHECK:STDOUT: %import_ref.7 = import_ref PackageHasParam//default, inst40 [no loc], unloaded @@ -1440,11 +1440,6 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: // CHECK:STDOUT: fn @M() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %PackageHasParam.ref.loc8: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] -// CHECK:STDOUT: %AnyParam.ref: %AnyParam.type = name_ref AnyParam, imports.%import_ref.1 [template = constants.%AnyParam.generic] -// CHECK:STDOUT: %PackageGenericInterface.ref: = name_ref PackageGenericInterface, imports.%PackageGenericInterface [template = imports.%PackageGenericInterface] -// CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, imports.%import_ref.4 [template = constants.%GenericInterface.generic] -// CHECK:STDOUT: %AnyParam: type = class_type @AnyParam, @AnyParam(constants.%GenericInterface.type.1, constants.%GenericInterface.generic) [template = constants.%AnyParam.2] // CHECK:STDOUT: %obj.var: ref %AnyParam.2 = var obj // CHECK:STDOUT: %obj: ref %AnyParam.2 = bind_name obj, %obj.var // CHECK:STDOUT: %.loc9_50.1: %empty_struct_type = struct_literal () @@ -1452,7 +1447,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %.loc9_51: init %AnyParam.2 = converted %.loc9_50.1, %.loc9_50.2 [template = constants.%AnyParam.val] // CHECK:STDOUT: assign %obj.var, %.loc9_51 // CHECK:STDOUT: %obj.ref: ref %AnyParam.2 = name_ref obj, %obj -// CHECK:STDOUT: %PackageHasParam.ref.loc10: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] +// CHECK:STDOUT: %PackageHasParam.ref: = name_ref PackageHasParam, imports.%PackageHasParam [template = imports.%PackageHasParam] // CHECK:STDOUT: %Y.ref: type = name_ref Y, imports.%import_ref.6 [template = constants.%Y.type] // CHECK:STDOUT: %K.ref: %K.assoc_type = name_ref K, imports.%import_ref.8 [template = constants.%assoc0] // CHECK:STDOUT: %impl.elem0: %K.type.1 = interface_witness_access constants.%interface, element0 [template = constants.%K.2] @@ -1768,10 +1763,12 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %c.patt: %C.2 = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C.2 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %HasExtraInterfaces.ref.loc5: = name_ref HasExtraInterfaces, imports.%HasExtraInterfaces [template = imports.%HasExtraInterfaces] -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.generic] -// CHECK:STDOUT: %C: type = class_type @C, @C(type) [template = constants.%C.2] // CHECK:STDOUT: %c.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc5: type = splice_block %C [template = constants.%C.2] { +// CHECK:STDOUT: %HasExtraInterfaces.ref.loc5: = name_ref HasExtraInterfaces, imports.%HasExtraInterfaces [template = imports.%HasExtraInterfaces] +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.generic] +// CHECK:STDOUT: %C: type = class_type @C, @C(type) [template = constants.%C.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %C.2 = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon index 14c7875c7ca9..e364b3ba25fe 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/specific_args.carbon @@ -357,8 +357,8 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %x.patt: %X = binding_pattern x // CHECK:STDOUT: %x.param_patt: %X = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref: type = name_ref X, imports.%import_ref.3 [template = constants.%X] // CHECK:STDOUT: %x.param: %X = value_param runtime_param0 +// CHECK:STDOUT: %X.ref: type = name_ref X, imports.%import_ref.3 [template = constants.%X] // CHECK:STDOUT: %x: %X = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -673,10 +673,12 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %c.patt: %C.2 = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C.2 = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.generic] -// CHECK:STDOUT: %InClassArgs.ref: type = name_ref InClassArgs, imports.%import_ref.4 [template = constants.%InClassArgs] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%InClassArgs) [template = constants.%C.2] // CHECK:STDOUT: %c.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_22: type = splice_block %C [template = constants.%C.2] { +// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.generic] +// CHECK:STDOUT: %InClassArgs.ref: type = name_ref InClassArgs, imports.%import_ref.4 [template = constants.%InClassArgs] +// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%InClassArgs) [template = constants.%C.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %c: %C.2 = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -737,8 +739,8 @@ fn H(c: C(InClassArgs)) { c.(I(X).F)(); } // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, imports.%import_ref.1 [template = constants.%I.generic] // CHECK:STDOUT: %X.ref: type = name_ref X, imports.%import_ref.3 [template = constants.%X] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%X)> [template = constants.%I.type.3] -// CHECK:STDOUT: %.loc6: %F.assoc_type.2 = specific_constant imports.%import_ref.10, @I(constants.%X) [template = constants.%assoc0.2] -// CHECK:STDOUT: %F.ref: %F.assoc_type.2 = name_ref F, %.loc6 [template = constants.%assoc0.2] +// CHECK:STDOUT: %.loc6_34: %F.assoc_type.2 = specific_constant imports.%import_ref.10, @I(constants.%X) [template = constants.%assoc0.2] +// CHECK:STDOUT: %F.ref: %F.assoc_type.2 = name_ref F, %.loc6_34 [template = constants.%assoc0.2] // CHECK:STDOUT: %impl.elem0: %F.type.2 = interface_witness_access constants.%interface, element0 [template = constants.%F.3] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %impl.elem0() // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/impl/multiple_extend.carbon b/toolchain/check/testdata/impl/multiple_extend.carbon index ce1fa85e6809..afdd102bce30 100644 --- a/toolchain/check/testdata/impl/multiple_extend.carbon +++ b/toolchain/check/testdata/impl/multiple_extend.carbon @@ -213,8 +213,8 @@ fn P(o: O) { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -379,8 +379,8 @@ fn P(o: O) { // CHECK:STDOUT: %d.patt: %D = binding_pattern d // CHECK:STDOUT: %d.param_patt: %D = value_param_pattern %d.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc21: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %d.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %D.ref.loc21: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %d: %D = bind_name d, %d.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -530,8 +530,8 @@ fn P(o: O) { // CHECK:STDOUT: %e.patt: %E = binding_pattern e // CHECK:STDOUT: %e.param_patt: %E = value_param_pattern %e.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %E.ref.loc19: type = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %e.param: %E = value_param runtime_param0 +// CHECK:STDOUT: %E.ref.loc19: type = name_ref E, file.%E.decl [template = constants.%E] // CHECK:STDOUT: %e: %E = bind_name e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -670,8 +670,8 @@ fn P(o: O) { // CHECK:STDOUT: %l.patt: %L = binding_pattern l // CHECK:STDOUT: %l.param_patt: %L = value_param_pattern %l.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %L.ref.loc19: type = name_ref L, file.%L.decl [template = constants.%L] // CHECK:STDOUT: %l.param: %L = value_param runtime_param0 +// CHECK:STDOUT: %L.ref.loc19: type = name_ref L, file.%L.decl [template = constants.%L] // CHECK:STDOUT: %l: %L = bind_name l, %l.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -815,8 +815,8 @@ fn P(o: O) { // CHECK:STDOUT: %o.patt: %O = binding_pattern o // CHECK:STDOUT: %o.param_patt: %O = value_param_pattern %o.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %O.ref.loc27: type = name_ref O, file.%O.decl [template = constants.%O] // CHECK:STDOUT: %o.param: %O = value_param runtime_param0 +// CHECK:STDOUT: %O.ref.loc27: type = name_ref O, file.%O.decl [template = constants.%O] // CHECK:STDOUT: %o: %O = bind_name o, %o.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon index 5fc3fa3579b8..1a8b9bde0ce4 100644 --- a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon @@ -108,96 +108,96 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %T.patt.loc11_14.1: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc11_14.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: %I.type = value_param_pattern %T.patt.loc11_14.1, runtime_param [symbolic = %T.patt.loc11_14.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc11_14.1 [symbolic = %T.loc11_14.2 (constants.%T.1)] // CHECK:STDOUT: %T.as_type.loc11_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc11_21.2 (constants.%T.as_type.1)] // CHECK:STDOUT: %.loc11: type = converted %T.ref, %T.as_type.loc11_21.1 [symbolic = %T.as_type.loc11_21.2 (constants.%T.as_type.1)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %I.type = value_param runtime_param +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.loc11_14.1: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc11_14.2 (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.2 [template] { // CHECK:STDOUT: %T.patt.loc12_14.1: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc12_14.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %J.type = value_param_pattern %T.patt.loc12_14.1, runtime_param [symbolic = %T.patt.loc12_14.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc12_14.1 [symbolic = %T.loc12_14.2 (constants.%T.2)] // CHECK:STDOUT: %T.as_type.loc12_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.2)] // CHECK:STDOUT: %.loc12: type = converted %T.ref, %T.as_type.loc12_21.1 [symbolic = %T.as_type.loc12_21.2 (constants.%T.as_type.2)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %J.type = value_param runtime_param +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.loc12_14.1: %J.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc12_14.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.3 [template] { // CHECK:STDOUT: %T.patt.loc13_14.1: %K.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_14.2 (constants.%T.patt.3)] // CHECK:STDOUT: %T.param_patt: %K.type = value_param_pattern %T.patt.loc13_14.1, runtime_param [symbolic = %T.patt.loc13_14.2 (constants.%T.patt.3)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] // CHECK:STDOUT: %T.ref: %K.type = name_ref T, %T.loc13_14.1 [symbolic = %T.loc13_14.2 (constants.%T.3)] // CHECK:STDOUT: %T.as_type.loc13_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3)] // CHECK:STDOUT: %.loc13: type = converted %T.ref, %T.as_type.loc13_21.1 [symbolic = %T.as_type.loc13_21.2 (constants.%T.as_type.3)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %K.type = value_param runtime_param +// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] // CHECK:STDOUT: %T.loc13_14.1: %K.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_14.2 (constants.%T.3)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] { // CHECK:STDOUT: %T.patt.loc14_14.1: %L.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc14_14.2 (constants.%T.patt.4)] // CHECK:STDOUT: %T.param_patt: %L.type = value_param_pattern %T.patt.loc14_14.1, runtime_param [symbolic = %T.patt.loc14_14.2 (constants.%T.patt.4)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %T.ref: %L.type = name_ref T, %T.loc14_14.1 [symbolic = %T.loc14_14.2 (constants.%T.4)] // CHECK:STDOUT: %T.as_type.loc14_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.4)] // CHECK:STDOUT: %.loc14: type = converted %T.ref, %T.as_type.loc14_21.1 [symbolic = %T.as_type.loc14_21.2 (constants.%T.as_type.4)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %L.type = value_param runtime_param +// CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %T.loc14_14.1: %L.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc14_14.2 (constants.%T.4)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.5 [template] { // CHECK:STDOUT: %T.patt.loc18_14.1: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc18_14.2 (constants.%T.patt.1)] // CHECK:STDOUT: %T.param_patt: %I.type = value_param_pattern %T.patt.loc18_14.1, runtime_param [symbolic = %T.patt.loc18_14.2 (constants.%T.patt.1)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref: %I.type = name_ref T, %T.loc18_14.1 [symbolic = %T.loc18_14.2 (constants.%T.1)] // CHECK:STDOUT: %T.as_type.loc18_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc18_21.2 (constants.%T.as_type.1)] // CHECK:STDOUT: %.loc18: type = converted %T.ref, %T.as_type.loc18_21.1 [symbolic = %T.as_type.loc18_21.2 (constants.%T.as_type.1)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %I.type = value_param runtime_param +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.loc18_14.1: %I.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc18_14.2 (constants.%T.1)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.6 [template] { // CHECK:STDOUT: %T.patt.loc19_14.1: %J.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_14.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %J.type = value_param_pattern %T.patt.loc19_14.1, runtime_param [symbolic = %T.patt.loc19_14.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.ref: %J.type = name_ref T, %T.loc19_14.1 [symbolic = %T.loc19_14.2 (constants.%T.2)] // CHECK:STDOUT: %T.as_type.loc19_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc19_21.2 (constants.%T.as_type.2)] // CHECK:STDOUT: %.loc19: type = converted %T.ref, %T.as_type.loc19_21.1 [symbolic = %T.as_type.loc19_21.2 (constants.%T.as_type.2)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %J.type = value_param runtime_param +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.loc19_14.1: %J.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_14.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.7 [template] { // CHECK:STDOUT: %T.patt.loc20_14.1: %K.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc20_14.2 (constants.%T.patt.3)] // CHECK:STDOUT: %T.param_patt: %K.type = value_param_pattern %T.patt.loc20_14.1, runtime_param [symbolic = %T.patt.loc20_14.2 (constants.%T.patt.3)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] // CHECK:STDOUT: %T.ref: %K.type = name_ref T, %T.loc20_14.1 [symbolic = %T.loc20_14.2 (constants.%T.3)] // CHECK:STDOUT: %T.as_type.loc20_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc20_21.2 (constants.%T.as_type.3)] // CHECK:STDOUT: %.loc20: type = converted %T.ref, %T.as_type.loc20_21.1 [symbolic = %T.as_type.loc20_21.2 (constants.%T.as_type.3)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %K.type = value_param runtime_param +// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] // CHECK:STDOUT: %T.loc20_14.1: %K.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc20_14.2 (constants.%T.3)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.8 [template] { // CHECK:STDOUT: %T.patt.loc21_14.1: %L.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc21_14.2 (constants.%T.patt.4)] // CHECK:STDOUT: %T.param_patt: %L.type = value_param_pattern %T.patt.loc21_14.1, runtime_param [symbolic = %T.patt.loc21_14.2 (constants.%T.patt.4)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %T.ref: %L.type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T.4)] // CHECK:STDOUT: %T.as_type.loc21_21.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc21_21.2 (constants.%T.as_type.4)] // CHECK:STDOUT: %.loc21: type = converted %T.ref, %T.as_type.loc21_21.1 [symbolic = %T.as_type.loc21_21.2 (constants.%T.as_type.4)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %L.type = value_param runtime_param +// CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %T.loc21_14.1: %L.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc21_14.2 (constants.%T.4)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -405,24 +405,24 @@ impl (C, C).0 as I {} // CHECK:STDOUT: %T.patt.loc7_14.1: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: %I.type = value_param_pattern %T.patt.loc7_14.1, runtime_param [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref.loc7: %I.type = name_ref T, %T.loc7_14.1 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: %T.as_type.loc7_21.1: type = facet_access_type %T.ref.loc7 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] // CHECK:STDOUT: %.loc7: type = converted %T.ref.loc7, %T.as_type.loc7_21.1 [symbolic = %T.as_type.loc7_21.2 (constants.%T.as_type)] // CHECK:STDOUT: %J.ref.loc7: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.param.loc7: %I.type = value_param runtime_param +// CHECK:STDOUT: %I.ref.loc7: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.loc7_14.1: %I.type = bind_symbolic_name T, 0, %T.param.loc7 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] { // CHECK:STDOUT: %T.patt.loc7_14.1: %I.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: %I.type = value_param_pattern %T.patt.loc7_14.1, runtime_param [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref.loc14: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.ref.loc14: %I.type = name_ref T, %T.loc14 [symbolic = constants.%T] // CHECK:STDOUT: %T.as_type.loc14: type = facet_access_type %T.ref.loc14 [symbolic = constants.%T.as_type] // CHECK:STDOUT: %.loc14: type = converted %T.ref.loc14, %T.as_type.loc14 [symbolic = constants.%T.as_type] // CHECK:STDOUT: %J.ref.loc14: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %T.param.loc14: %I.type = value_param runtime_param +// CHECK:STDOUT: %I.ref.loc14: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.loc14: %I.type = bind_symbolic_name T, 0, %T.param.loc14 [symbolic = constants.%T] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon b/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon index a657a7ac3a74..ec07fe403618 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_builtin_call.carbon @@ -129,11 +129,13 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc9_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc9_22.2: type = converted %int_literal.make_type, %.loc9_22.1 [template = Core.IntLiteral] // CHECK:STDOUT: %n.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_22.3: type = splice_block %.loc9_22.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc9_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc9_22.2: type = converted %int_literal.make_type, %.loc9_22.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: Core.IntLiteral = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -142,26 +144,30 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %N.patt.loc11_13.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc11_13.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc11_13.1, runtime_param [symbolic = %N.patt.loc11_13.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc11_28.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc11_28.2: type = converted %int_literal.make_type, %.loc11_28.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param +// CHECK:STDOUT: %.loc11_28.3: type = splice_block %.loc11_28.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc11_28.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc11_28.2: type = converted %int_literal.make_type, %.loc11_28.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc11_13.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc11_13.2 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl [template] { // CHECK:STDOUT: %N.patt.loc15_14.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc15_14.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc15_14.1, runtime_param [symbolic = %N.patt.loc15_14.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc15_29.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc15_29.2: type = converted %int_literal.make_type, %.loc15_29.1 [template = Core.IntLiteral] // CHECK:STDOUT: %MyInt.ref: %MyInt.type = name_ref MyInt, file.%MyInt.decl [template = constants.%MyInt.generic] // CHECK:STDOUT: %N.ref: Core.IntLiteral = name_ref N, %N.loc15_14.1 [symbolic = %N.loc15_14.2 (constants.%N)] // CHECK:STDOUT: %MyInt.loc15_39.1: type = class_type @MyInt, @MyInt(constants.%N) [symbolic = %MyInt.loc15_39.2 (constants.%MyInt)] // CHECK:STDOUT: %Add.ref: type = name_ref Add, file.%Add.decl [template = constants.%Add.type] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param +// CHECK:STDOUT: %.loc15_29.3: type = splice_block %.loc15_29.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc15_29.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc15_29.2: type = converted %int_literal.make_type, %.loc15_29.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc15_14.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc15_14.2 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Double.decl: %Double.type = fn_decl @Double [template = constants.%Double] { @@ -172,19 +178,23 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: @Double.%MyInt.loc19_39.2 (%MyInt) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Double.%MyInt.loc19_39.2 (%MyInt) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc19_26.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc19_26.2: type = converted %int_literal.make_type, %.loc19_26.1 [template = Core.IntLiteral] -// CHECK:STDOUT: %MyInt.ref.loc19_32: %MyInt.type = name_ref MyInt, file.%MyInt.decl [template = constants.%MyInt.generic] -// CHECK:STDOUT: %N.ref.loc19_38: Core.IntLiteral = name_ref N, %N.loc19_11.1 [symbolic = %N.loc19_11.2 (constants.%N)] -// CHECK:STDOUT: %MyInt.loc19_39.1: type = class_type @MyInt, @MyInt(constants.%N) [symbolic = %MyInt.loc19_39.2 (constants.%MyInt)] // CHECK:STDOUT: %MyInt.ref.loc19_45: %MyInt.type = name_ref MyInt, file.%MyInt.decl [template = constants.%MyInt.generic] // CHECK:STDOUT: %N.ref.loc19_51: Core.IntLiteral = name_ref N, %N.loc19_11.1 [symbolic = %N.loc19_11.2 (constants.%N)] // CHECK:STDOUT: %MyInt.loc19_52: type = class_type @MyInt, @MyInt(constants.%N) [symbolic = %MyInt.loc19_39.2 (constants.%MyInt)] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param +// CHECK:STDOUT: %.loc19_26.3: type = splice_block %.loc19_26.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc19_26.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc19_26.2: type = converted %int_literal.make_type, %.loc19_26.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc19_11.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc19_11.2 (constants.%N)] // CHECK:STDOUT: %x.param: @Double.%MyInt.loc19_39.2 (%MyInt) = value_param runtime_param0 +// CHECK:STDOUT: %.loc19_39: type = splice_block %MyInt.loc19_39.1 [symbolic = %MyInt.loc19_39.2 (constants.%MyInt)] { +// CHECK:STDOUT: %MyInt.ref.loc19_32: %MyInt.type = name_ref MyInt, file.%MyInt.decl [template = constants.%MyInt.generic] +// CHECK:STDOUT: %N.ref.loc19_38: Core.IntLiteral = name_ref N, %N.loc19_11.1 [symbolic = %N.loc19_11.2 (constants.%N)] +// CHECK:STDOUT: %MyInt.loc19_39.1: type = class_type @MyInt, @MyInt(constants.%N) [symbolic = %MyInt.loc19_39.2 (constants.%MyInt)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @Double.%MyInt.loc19_39.2 (%MyInt) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @Double.%MyInt.loc19_39.2 (%MyInt) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Double.%MyInt.loc19_39.2 (%MyInt) = return_slot %return.param @@ -201,18 +211,22 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: @Op.1.%Self.as_type.loc5_15.1 (%Self.as_type) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Op.1.%Self.as_type.loc5_15.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref.loc5_15 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc5_15: type = converted %Self.ref.loc5_15, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc5_28: type = facet_access_type %Self.ref.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc5_28: type = converted %Self.ref.loc5_28, %Self.as_type.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_37: type = facet_access_type %Self.ref.loc5_37 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc5_37: type = converted %Self.ref.loc5_37, %Self.as_type.loc5_37 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: %self.param: @Op.1.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_15.2: type = splice_block %.loc5_15.1 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref.loc5_15 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_15.1: type = converted %Self.ref.loc5_15, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @Op.1.%Self.as_type.loc5_15.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %other.param: @Op.1.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param runtime_param1 +// CHECK:STDOUT: %.loc5_28.2: type = splice_block %.loc5_28.1 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc5_28: type = facet_access_type %Self.ref.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_28.1: type = converted %Self.ref.loc5_28, %Self.as_type.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %other: @Op.1.%Self.as_type.loc5_15.1 (%Self.as_type) = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref @Op.1.%Self.as_type.loc5_15.1 (%Self.as_type) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @Op.1.%Self.as_type.loc5_15.1 (%Self.as_type) = return_slot %return.param @@ -245,12 +259,12 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: @Op.2.%MyInt (%MyInt) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Op.2.%MyInt (%MyInt) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc16_15: type = name_ref Self, @impl.%MyInt.loc15_39.1 [symbolic = %MyInt (constants.%MyInt)] -// CHECK:STDOUT: %Self.ref.loc16_28: type = name_ref Self, @impl.%MyInt.loc15_39.1 [symbolic = %MyInt (constants.%MyInt)] // CHECK:STDOUT: %Self.ref.loc16_37: type = name_ref Self, @impl.%MyInt.loc15_39.1 [symbolic = %MyInt (constants.%MyInt)] // CHECK:STDOUT: %self.param: @Op.2.%MyInt (%MyInt) = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc16_15: type = name_ref Self, @impl.%MyInt.loc15_39.1 [symbolic = %MyInt (constants.%MyInt)] // CHECK:STDOUT: %self: @Op.2.%MyInt (%MyInt) = bind_name self, %self.param // CHECK:STDOUT: %other.param: @Op.2.%MyInt (%MyInt) = value_param runtime_param1 +// CHECK:STDOUT: %Self.ref.loc16_28: type = name_ref Self, @impl.%MyInt.loc15_39.1 [symbolic = %MyInt (constants.%MyInt)] // CHECK:STDOUT: %other: @Op.2.%MyInt (%MyInt) = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref @Op.2.%MyInt (%MyInt) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @Op.2.%MyInt (%MyInt) = return_slot %return.param @@ -432,7 +446,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %import_ref.4: %MyInt.type = import_ref Main//generic_impl, MyInt, loaded [template = constants.%MyInt.generic] // CHECK:STDOUT: %import_ref.5: %Double.type = import_ref Main//generic_impl, Double, loaded [template = constants.%Double] // CHECK:STDOUT: %import_ref.7: = import_ref Main//generic_impl, loc13_1, loaded [symbolic = @MyInt.%complete_type (constants.%complete_type.1)] -// CHECK:STDOUT: %import_ref.8 = import_ref Main//generic_impl, inst85 [no loc], unloaded +// CHECK:STDOUT: %import_ref.8 = import_ref Main//generic_impl, inst89 [no loc], unloaded // CHECK:STDOUT: %import_ref.9 = import_ref Main//generic_impl, inst15 [no loc], unloaded // CHECK:STDOUT: %import_ref.10: %Op.assoc_type = import_ref Main//generic_impl, loc5_41, loaded [template = constants.%assoc0] // CHECK:STDOUT: %import_ref.11 = import_ref Main//generic_impl, Op, unloaded @@ -458,13 +472,15 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: %MyInt.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %MyInt.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %MyInt.ref.loc8_19: %MyInt.type = name_ref MyInt, imports.%import_ref.4 [template = constants.%MyInt.generic] -// CHECK:STDOUT: %int_64.loc8_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %MyInt.loc8_27: type = class_type @MyInt, @MyInt(constants.%int_64) [template = constants.%MyInt.2] // CHECK:STDOUT: %MyInt.ref.loc8_33: %MyInt.type = name_ref MyInt, imports.%import_ref.4 [template = constants.%MyInt.generic] // CHECK:STDOUT: %int_64.loc8_39: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %MyInt.loc8_41: type = class_type @MyInt, @MyInt(constants.%int_64) [template = constants.%MyInt.2] // CHECK:STDOUT: %x.param: %MyInt.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc8: type = splice_block %MyInt.loc8_27 [template = constants.%MyInt.2] { +// CHECK:STDOUT: %MyInt.ref.loc8_19: %MyInt.type = name_ref MyInt, imports.%import_ref.4 [template = constants.%MyInt.generic] +// CHECK:STDOUT: %int_64.loc8_25: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %MyInt.loc8_27: type = class_type @MyInt, @MyInt(constants.%int_64) [template = constants.%MyInt.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %MyInt.2 = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %MyInt.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %MyInt.2 = return_slot %return.param @@ -475,13 +491,15 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: %MyInt.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %MyInt.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %MyInt.ref.loc12_26: %MyInt.type = name_ref MyInt, imports.%import_ref.4 [template = constants.%MyInt.generic] -// CHECK:STDOUT: %int_64.loc12_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %MyInt.loc12_34: type = class_type @MyInt, @MyInt(constants.%int_64) [template = constants.%MyInt.2] // CHECK:STDOUT: %MyInt.ref.loc12_40: %MyInt.type = name_ref MyInt, imports.%import_ref.4 [template = constants.%MyInt.generic] // CHECK:STDOUT: %int_64.loc12_46: Core.IntLiteral = int_value 64 [template = constants.%int_64] // CHECK:STDOUT: %MyInt.loc12_48: type = class_type @MyInt, @MyInt(constants.%int_64) [template = constants.%MyInt.2] // CHECK:STDOUT: %n.param: %MyInt.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %MyInt.loc12_34 [template = constants.%MyInt.2] { +// CHECK:STDOUT: %MyInt.ref.loc12_26: %MyInt.type = name_ref MyInt, imports.%import_ref.4 [template = constants.%MyInt.generic] +// CHECK:STDOUT: %int_64.loc12_32: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %MyInt.loc12_34: type = class_type @MyInt, @MyInt(constants.%int_64) [template = constants.%MyInt.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %MyInt.2 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %MyInt.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %MyInt.2 = return_slot %return.param @@ -732,11 +750,13 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc5_22.2: type = converted %int_literal.make_type, %.loc5_22.1 [template = Core.IntLiteral] // CHECK:STDOUT: %n.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_22.3: type = splice_block %.loc5_22.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc5_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc5_22.2: type = converted %int_literal.make_type, %.loc5_22.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: Core.IntLiteral = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -747,16 +767,18 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, file.%Int.decl [template = constants.%Int] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%int_32) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc6_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc6_23.2: type = converted %int.make_type_signed, %.loc6_23.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc6_40.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] // CHECK:STDOUT: %.loc6_40.2: type = converted %int_literal.make_type, %.loc6_40.1 [template = Core.IntLiteral] // CHECK:STDOUT: %n.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_23.3: type = splice_block %.loc6_23.2 [template = constants.%i32.builtin] { +// CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, file.%Int.decl [template = constants.%Int] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc6_23.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc6_23.2: type = converted %int.make_type_signed, %.loc6_23.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param @@ -767,16 +789,18 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc7_30.2: type = converted %int_literal.make_type, %.loc7_30.1 [template = Core.IntLiteral] // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, file.%Int.decl [template = constants.%Int] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%int_32) [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc7_42.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc7_42.2: type = converted %int.make_type_signed, %.loc7_42.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %n.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_30.3: type = splice_block %.loc7_30.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc7_30.2: type = converted %int_literal.make_type, %.loc7_30.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: Core.IntLiteral = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -787,11 +811,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: @Make.%iN.builtin (%iN.builtin.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Make.%iN.builtin (%iN.builtin.1) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Int.ref.loc9_13: %Int.type = name_ref Int, file.%Int.decl [template = constants.%Int] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc9_19: init type = call %Int.ref.loc9_13(%int_32) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed.loc9_19 [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed.loc9_19, %.loc9_19.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %Int.ref.loc9_25: %Int.type = name_ref Int, file.%Int.decl [template = constants.%Int] // CHECK:STDOUT: %ToLiteral.ref: %ToLiteral.type.1 = name_ref ToLiteral, file.%ToLiteral.decl.loc6 [template = constants.%ToLiteral.1] // CHECK:STDOUT: %N.ref.loc9_39: %i32.builtin = name_ref N, %N.loc9_9.1 [symbolic = %N.loc9_9.2 (constants.%N.1)] @@ -802,6 +821,13 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.loc9_41.1: type = value_of_initializer %int.make_type_signed.loc9_41 [symbolic = %iN.builtin (constants.%iN.builtin.1)] // CHECK:STDOUT: %.loc9_41.2: type = converted %int.make_type_signed.loc9_41, %.loc9_41.1 [symbolic = %iN.builtin (constants.%iN.builtin.1)] // CHECK:STDOUT: %N.param: %i32.builtin = value_param runtime_param +// CHECK:STDOUT: %.loc9_19.3: type = splice_block %.loc9_19.2 [template = constants.%i32.builtin] { +// CHECK:STDOUT: %Int.ref.loc9_13: %Int.type = name_ref Int, file.%Int.decl [template = constants.%Int] +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed.loc9_19: init type = call %Int.ref.loc9_13(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc9_19.1: type = value_of_initializer %int.make_type_signed.loc9_19 [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc9_19.2: type = converted %int.make_type_signed.loc9_19, %.loc9_19.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc9_9.1: %i32.builtin = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc9_9.2 (constants.%N.1)] // CHECK:STDOUT: %return.param: ref @Make.%iN.builtin (%iN.builtin.1) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @Make.%iN.builtin (%iN.builtin.1) = return_slot %return.param @@ -813,12 +839,12 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, constants.%OtherInt [template = constants.%OtherInt] // CHECK:STDOUT: %IntLiteral.ref.loc16: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type.loc16: init type = call %IntLiteral.ref.loc16() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc16_51.1: type = value_of_initializer %int_literal.make_type.loc16 [template = Core.IntLiteral] // CHECK:STDOUT: %.loc16_51.2: type = converted %int_literal.make_type.loc16, %.loc16_51.1 [template = Core.IntLiteral] // CHECK:STDOUT: %self.param.loc16: %OtherInt = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc16: type = name_ref Self, constants.%OtherInt [template = constants.%OtherInt] // CHECK:STDOUT: %self.loc16: %OtherInt = bind_name self, %self.param.loc16 // CHECK:STDOUT: %return.param.loc16: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return.loc16: ref Core.IntLiteral = return_slot %return.param.loc16 @@ -829,7 +855,6 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: @MakeFromClass.%iN.builtin (%iN.builtin.2) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @MakeFromClass.%iN.builtin (%iN.builtin.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %OtherInt.ref: type = name_ref OtherInt, file.%OtherInt.decl [template = constants.%OtherInt] // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, file.%Int.decl [template = constants.%Int] // CHECK:STDOUT: %N.ref.loc18_39: %OtherInt = name_ref N, %N.loc18_18.1 [symbolic = %N.loc18_18.2 (constants.%N.2)] // CHECK:STDOUT: %ToLiteral.ref: %ToLiteral.type.2 = name_ref ToLiteral, @OtherInt.%ToLiteral.decl [template = constants.%ToLiteral.2] @@ -841,6 +866,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %.loc18_52.1: type = value_of_initializer %int.make_type_signed [symbolic = %iN.builtin (constants.%iN.builtin.2)] // CHECK:STDOUT: %.loc18_52.2: type = converted %int.make_type_signed, %.loc18_52.1 [symbolic = %iN.builtin (constants.%iN.builtin.2)] // CHECK:STDOUT: %N.param: %OtherInt = value_param runtime_param +// CHECK:STDOUT: %OtherInt.ref: type = name_ref OtherInt, file.%OtherInt.decl [template = constants.%OtherInt] // CHECK:STDOUT: %N.loc18_18.1: %OtherInt = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc18_18.2 (constants.%N.2)] // CHECK:STDOUT: %return.param: ref @MakeFromClass.%iN.builtin (%iN.builtin.2) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @MakeFromClass.%iN.builtin (%iN.builtin.2) = return_slot %return.param @@ -860,12 +886,12 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%OtherInt [template = constants.%OtherInt] // CHECK:STDOUT: %IntLiteral.ref.loc13: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] // CHECK:STDOUT: %int_literal.make_type.loc13: init type = call %IntLiteral.ref.loc13() [template = Core.IntLiteral] // CHECK:STDOUT: %.loc13_44.1: type = value_of_initializer %int_literal.make_type.loc13 [template = Core.IntLiteral] // CHECK:STDOUT: %.loc13_44.2: type = converted %int_literal.make_type.loc13, %.loc13_44.1 [template = Core.IntLiteral] // CHECK:STDOUT: %self.param.loc13: %OtherInt = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc13: type = name_ref Self, constants.%OtherInt [template = constants.%OtherInt] // CHECK:STDOUT: %self.loc13: %OtherInt = bind_name self, %self.param.loc13 // CHECK:STDOUT: %return.param.loc13: ref Core.IntLiteral = out_param runtime_param1 // CHECK:STDOUT: %return.loc13: ref Core.IntLiteral = return_slot %return.param.loc13 @@ -1010,7 +1036,7 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: %import_ref.6: type = import_ref Main//convert_symbolic, OtherInt, loaded [template = constants.%OtherInt] // CHECK:STDOUT: %import_ref.7: %MakeFromClass.type = import_ref Main//convert_symbolic, MakeFromClass, loaded [template = constants.%MakeFromClass] // CHECK:STDOUT: %import_ref.9: = import_ref Main//convert_symbolic, loc14_1, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.10 = import_ref Main//convert_symbolic, inst125 [no loc], unloaded +// CHECK:STDOUT: %import_ref.10 = import_ref Main//convert_symbolic, inst129 [no loc], unloaded // CHECK:STDOUT: %import_ref.11 = import_ref Main//convert_symbolic, loc13_45, unloaded // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1027,18 +1053,8 @@ var n: Int(64) = MakeFromClass(FromLiteral(64) as OtherInt); // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %Int.ref.loc6: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %int_64.loc6: Core.IntLiteral = int_value 64 [template = constants.%int_64.1] -// CHECK:STDOUT: %int.make_type_signed.loc6: init type = call %Int.ref.loc6(%int_64.loc6) [template = constants.%i64.builtin] -// CHECK:STDOUT: %.loc6_14.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i64.builtin] -// CHECK:STDOUT: %.loc6_14.2: type = converted %int.make_type_signed.loc6, %.loc6_14.1 [template = constants.%i64.builtin] // CHECK:STDOUT: %m.var: ref %i64.builtin = var m // CHECK:STDOUT: %m: ref %i64.builtin = bind_name m, %m.var -// CHECK:STDOUT: %Int.ref.loc7: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %int_64.loc7: Core.IntLiteral = int_value 64 [template = constants.%int_64.1] -// CHECK:STDOUT: %int.make_type_signed.loc7: init type = call %Int.ref.loc7(%int_64.loc7) [template = constants.%i64.builtin] -// CHECK:STDOUT: %.loc7_14.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i64.builtin] -// CHECK:STDOUT: %.loc7_14.2: type = converted %int.make_type_signed.loc7, %.loc7_14.1 [template = constants.%i64.builtin] // CHECK:STDOUT: %n.var: ref %i64.builtin = var n // CHECK:STDOUT: %n: ref %i64.builtin = bind_name n, %n.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon index f7faa34949ad..64f78a0faa33 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_extend_impl.carbon @@ -151,8 +151,8 @@ fn G(c: C) { // CHECK:STDOUT: %c.patt: %C = binding_pattern c // CHECK:STDOUT: %c.param_patt: %C = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %c.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %c: %C = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index cc725a2593ed..482b8dfe78d4 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -59,18 +59,22 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %return.patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref.loc5_15 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc5_15: type = converted %Self.ref.loc5_15, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc5_28: type = facet_access_type %Self.ref.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc5_28: type = converted %Self.ref.loc5_28, %Self.as_type.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: %Self.ref.loc5_37: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc5_37: type = facet_access_type %Self.ref.loc5_37 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc5_37: type = converted %Self.ref.loc5_37, %Self.as_type.loc5_37 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] // CHECK:STDOUT: %self.param: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc5_15.2: type = splice_block %.loc5_15.1 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref.loc5_15: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc5_15.2: type = facet_access_type %Self.ref.loc5_15 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_15.1: type = converted %Self.ref.loc5_15, %Self.as_type.loc5_15.2 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %other.param: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = value_param runtime_param1 +// CHECK:STDOUT: %.loc5_28.2: type = splice_block %.loc5_28.1 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref.loc5_28: %Add.type = name_ref Self, @Add.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc5_28: type = facet_access_type %Self.ref.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc5_28.1: type = converted %Self.ref.loc5_28, %Self.as_type.loc5_28 [symbolic = %Self.as_type.loc5_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %other: @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @Op.%Self.as_type.loc5_15.1 (%Self.as_type) = return_slot %return.param @@ -141,15 +145,19 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_17.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_17.2: type = converted %.loc10_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc10_24.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_24.2: type = converted %.loc10_24.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc10_10.3: type = splice_block %.loc10_10.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc10_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: %y.param: %empty_tuple.type = value_param runtime_param1 +// CHECK:STDOUT: %.loc10_17.3: type = splice_block %.loc10_17.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc10_17.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_17.2: type = converted %.loc10_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %y: %empty_tuple.type = bind_name y, %y.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param @@ -172,12 +180,12 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %Self.ref.loc7_28: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%empty_tuple.type] // CHECK:STDOUT: %Self.ref.loc7_37: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%empty_tuple.type] // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc7_15: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%empty_tuple.type] // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param // CHECK:STDOUT: %other.param: %empty_tuple.type = value_param runtime_param1 +// CHECK:STDOUT: %Self.ref.loc7_28: type = name_ref Self, @impl.%.loc6_7.2 [template = constants.%empty_tuple.type] // CHECK:STDOUT: %other: %empty_tuple.type = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param diff --git a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon index 66c1e6c9cff2..e05631774081 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon @@ -223,10 +223,6 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.generic] -// CHECK:STDOUT: %.loc6_11: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc6_12: type = converted %.loc6_11, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%empty_struct_type) [template = constants.%C.2] // CHECK:STDOUT: %c.var: ref %C.2 = var c // CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var // CHECK:STDOUT: %F.decl: %F.type.4 = fn_decl @F.3 [template = constants.%F.4] { diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index feec609fe90a..274b01380d9d 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -138,8 +138,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %a.patt: %A = binding_pattern a // CHECK:STDOUT: %a.param_patt: %A = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %a.param: %A = value_param runtime_param0 +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %a: %A = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -314,8 +314,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %a.patt: %A = binding_pattern a // CHECK:STDOUT: %a.param_patt: %A = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] // CHECK:STDOUT: %a.param: %A = value_param runtime_param0 +// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] // CHECK:STDOUT: %a: %A = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -470,8 +470,8 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %a.patt: %A = binding_pattern a // CHECK:STDOUT: %a.param_patt: %A = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] // CHECK:STDOUT: %a.param: %A = value_param runtime_param0 +// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] // CHECK:STDOUT: %a: %A = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -784,9 +784,9 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %return.patt: %B = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %B = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] // CHECK:STDOUT: %B.ref.loc4: type = name_ref B, imports.%import_ref.3 [template = constants.%B] // CHECK:STDOUT: %a.param: %A = value_param runtime_param0 +// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] // CHECK:STDOUT: %a: %A = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %B = out_param runtime_param1 // CHECK:STDOUT: %return: ref %B = return_slot %return.param @@ -945,9 +945,9 @@ fn MakeC(a: A) -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] // CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %A = value_param runtime_param0 +// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.2 [template = constants.%A] // CHECK:STDOUT: %a: %A = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param diff --git a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon index ccf712192355..6e5882c3e100 100644 --- a/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon +++ b/toolchain/check/testdata/impl/no_prelude/self_in_signature.carbon @@ -127,18 +127,22 @@ impl D as SelfNested { // CHECK:STDOUT: %return.patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %.loc12_14: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %Self.ref.loc12_23: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] -// CHECK:STDOUT: %Self.as_type.loc12_23: type = facet_access_type %Self.ref.loc12_23 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] -// CHECK:STDOUT: %.loc12_23: type = converted %Self.ref.loc12_23, %Self.as_type.loc12_23 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %Self.ref.loc12_32: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] // CHECK:STDOUT: %Self.as_type.loc12_32: type = facet_access_type %Self.ref.loc12_32 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %.loc12_32: type = converted %Self.ref.loc12_32, %Self.as_type.loc12_32 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] // CHECK:STDOUT: %self.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_14.2: type = splice_block %.loc12_14.1 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] { +// CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_14.1: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name self, %self.param // CHECK:STDOUT: %x.param: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = value_param runtime_param1 +// CHECK:STDOUT: %.loc12_23.2: type = splice_block %.loc12_23.1 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] { +// CHECK:STDOUT: %Self.ref.loc12_23: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self.1)] +// CHECK:STDOUT: %Self.as_type.loc12_23: type = facet_access_type %Self.ref.loc12_23 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: %.loc12_23.1: type = converted %Self.ref.loc12_23, %Self.as_type.loc12_23 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type.1)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = out_param runtime_param2 // CHECK:STDOUT: %return: ref @F.1.%Self.as_type.loc12_14.1 (%Self.as_type.1) = return_slot %return.param @@ -157,19 +161,21 @@ impl D as SelfNested { // CHECK:STDOUT: %x.patt: @F.4.%tuple.type (%tuple.type.2) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @F.4.%tuple.type (%tuple.type.2) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc28_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %Self.as_type.loc28_16.2: type = facet_access_type %Self.ref.loc28_12 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] -// CHECK:STDOUT: %.loc28_16: type = converted %Self.ref.loc28_12, %Self.as_type.loc28_16.2 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] -// CHECK:STDOUT: %ptr.loc28_16.2: type = ptr_type %Self.as_type.2 [symbolic = %ptr.loc28_16.1 (constants.%ptr.2)] -// CHECK:STDOUT: %Self.ref.loc28_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %Self.as_type.loc28_24: type = facet_access_type %Self.ref.loc28_24 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] -// CHECK:STDOUT: %.loc28_24: type = converted %Self.ref.loc28_24, %Self.as_type.loc28_24 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] -// CHECK:STDOUT: %.loc28_35.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc28_35.2: type = converted %.loc28_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.x.y.loc28_36.2: type = struct_type {.x: %Self.as_type.2, .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc28_36.1 (constants.%struct_type.x.y.1)] -// CHECK:STDOUT: %.loc28_37.1: %tuple.type.1 = tuple_literal (%ptr.loc28_16.2, %struct_type.x.y.loc28_36.2) -// CHECK:STDOUT: %.loc28_37.2: type = converted %.loc28_37.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: %x.param: @F.4.%tuple.type (%tuple.type.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc28_37.3: type = splice_block %.loc28_37.2 [symbolic = %tuple.type (constants.%tuple.type.2)] { +// CHECK:STDOUT: %Self.ref.loc28_12: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.as_type.loc28_16.2: type = facet_access_type %Self.ref.loc28_12 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %.loc28_16: type = converted %Self.ref.loc28_12, %Self.as_type.loc28_16.2 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %ptr.loc28_16.2: type = ptr_type %Self.as_type.2 [symbolic = %ptr.loc28_16.1 (constants.%ptr.2)] +// CHECK:STDOUT: %Self.ref.loc28_24: %SelfNested.type = name_ref Self, @SelfNested.%Self [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.as_type.loc28_24: type = facet_access_type %Self.ref.loc28_24 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %.loc28_24: type = converted %Self.ref.loc28_24, %Self.as_type.loc28_24 [symbolic = %Self.as_type.loc28_16.1 (constants.%Self.as_type.2)] +// CHECK:STDOUT: %.loc28_35.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc28_35.2: type = converted %.loc28_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %struct_type.x.y.loc28_36.2: type = struct_type {.x: %Self.as_type.2, .y: %empty_tuple.type} [symbolic = %struct_type.x.y.loc28_36.1 (constants.%struct_type.x.y.1)] +// CHECK:STDOUT: %.loc28_37.1: %tuple.type.1 = tuple_literal (%ptr.loc28_16.2, %struct_type.x.y.loc28_36.2) +// CHECK:STDOUT: %.loc28_37.2: type = converted %.loc28_37.1, constants.%tuple.type.2 [symbolic = %tuple.type (constants.%tuple.type.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @F.4.%tuple.type (%tuple.type.2) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %F.assoc_type.2 = assoc_entity element0, %F.decl [template = constants.%assoc0.2] @@ -189,12 +195,12 @@ impl D as SelfNested { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc20_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc20_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc20_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %x.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %x: %C = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -215,12 +221,12 @@ impl D as SelfNested { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc24_14: type = name_ref Self, @impl.2.%D.ref [template = constants.%D] -// CHECK:STDOUT: %Self.ref.loc24_23: type = name_ref Self, @impl.2.%D.ref [template = constants.%D] // CHECK:STDOUT: %Self.ref.loc24_32: type = name_ref Self, @impl.2.%D.ref [template = constants.%D] // CHECK:STDOUT: %self.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref.loc24_14: type = name_ref Self, @impl.2.%D.ref [template = constants.%D] // CHECK:STDOUT: %self: %D = bind_name self, %self.param // CHECK:STDOUT: %x.param: %D = value_param runtime_param1 +// CHECK:STDOUT: %Self.ref.loc24_23: type = name_ref Self, @impl.2.%D.ref [template = constants.%D] // CHECK:STDOUT: %x: %D = bind_name x, %x.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param2 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -237,15 +243,17 @@ impl D as SelfNested { // CHECK:STDOUT: %x.patt: %tuple.type.3 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %tuple.type.3 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc32_12: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.3] -// CHECK:STDOUT: %C.ref.loc32_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %.loc32_29.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc32_29.2: type = converted %.loc32_29.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %C, .y: %empty_tuple.type} [template = constants.%struct_type.x.y.2] -// CHECK:STDOUT: %.loc32_31.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) -// CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %x.param: %tuple.type.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc32_31.3: type = splice_block %.loc32_31.2 [template = constants.%tuple.type.3] { +// CHECK:STDOUT: %C.ref.loc32_12: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.3] +// CHECK:STDOUT: %C.ref.loc32_21: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %.loc32_29.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc32_29.2: type = converted %.loc32_29.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %C, .y: %empty_tuple.type} [template = constants.%struct_type.x.y.2] +// CHECK:STDOUT: %.loc32_31.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) +// CHECK:STDOUT: %.loc32_31.2: type = converted %.loc32_31.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.3 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.3] @@ -260,15 +268,17 @@ impl D as SelfNested { // CHECK:STDOUT: %x.patt: %tuple.type.4 = binding_pattern x // CHECK:STDOUT: %x.param_patt: %tuple.type.4 = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc36_12: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] -// CHECK:STDOUT: %ptr: type = ptr_type %D [template = constants.%ptr.4] -// CHECK:STDOUT: %Self.ref.loc36_24: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] -// CHECK:STDOUT: %.loc36_35.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc36_35.2: type = converted %.loc36_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %D, .y: %empty_tuple.type} [template = constants.%struct_type.x.y.3] -// CHECK:STDOUT: %.loc36_37.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) -// CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] // CHECK:STDOUT: %x.param: %tuple.type.4 = value_param runtime_param0 +// CHECK:STDOUT: %.loc36_37.3: type = splice_block %.loc36_37.2 [template = constants.%tuple.type.4] { +// CHECK:STDOUT: %Self.ref.loc36_12: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] +// CHECK:STDOUT: %ptr: type = ptr_type %D [template = constants.%ptr.4] +// CHECK:STDOUT: %Self.ref.loc36_24: type = name_ref Self, @impl.4.%D.ref [template = constants.%D] +// CHECK:STDOUT: %.loc36_35.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc36_35.2: type = converted %.loc36_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %struct_type.x.y: type = struct_type {.x: %D, .y: %empty_tuple.type} [template = constants.%struct_type.x.y.3] +// CHECK:STDOUT: %.loc36_37.1: %tuple.type.1 = tuple_literal (%ptr, %struct_type.x.y) +// CHECK:STDOUT: %.loc36_37.2: type = converted %.loc36_37.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %tuple.type.4 = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%F.decl) [template = constants.%interface.4] diff --git a/toolchain/check/testdata/index/array_element_access.carbon b/toolchain/check/testdata/index/array_element_access.carbon index b712a43989a5..e4abbc748d76 100644 --- a/toolchain/check/testdata/index/array_element_access.carbon +++ b/toolchain/check/testdata/index/array_element_access.carbon @@ -62,22 +62,12 @@ var d: i32 = a[b]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// 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: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var -// 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: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index c3cf079c78ac..a5667ffb0437 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -101,22 +101,26 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %b.patt: %array_type = binding_pattern b // CHECK:STDOUT: %b.param_patt: %array_type = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %int_3.loc13: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type.loc13: type = array_type %int_3.loc13, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.param: %array_type = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %array_type [template = constants.%array_type] { +// 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: %int_3.loc13: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %array_type: type = array_type %int_3.loc13, %i32 [template = constants.%array_type] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %array_type = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: %ValueBinding.decl: %ValueBinding.type = fn_decl @ValueBinding [template = constants.%ValueBinding] { // CHECK:STDOUT: %b.patt: %array_type = binding_pattern b // CHECK:STDOUT: %b.param_patt: %array_type = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_3.loc21: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type.loc21: type = array_type %int_3.loc21, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.param: %array_type = value_param runtime_param0 +// CHECK:STDOUT: %.loc21: type = splice_block %array_type [template = constants.%array_type] { +// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_3.loc21: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] +// CHECK:STDOUT: %array_type: type = array_type %int_3.loc21, %i32 [template = constants.%array_type] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %array_type = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -125,16 +129,12 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%b.param_patt: %array_type) { // CHECK:STDOUT: !entry: -// 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: %int_3.loc14_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type.loc14: type = array_type %int_3.loc14_16, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: %int_1.loc14_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc14_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int_3.loc14_28: 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_28) +// 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.5, element0 [template = constants.%Convert.10] // 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] @@ -152,25 +152,22 @@ fn ValueBinding(b: [i32; 3]) { // 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.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc14_29.3: = bound_method %int_3.loc14_28, %impl.elem0.loc14_29.3 [template = constants.%Convert.bound.3] +// 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_28) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc14_29.8: init %i32 = converted %int_3.loc14_28, %int.convert_checked.loc14_29.3 [template = constants.%int_3.2] +// 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] +// CHECK:STDOUT: %.loc14_29.8: init %i32 = converted %int_3.loc14, %int.convert_checked.loc14_29.3 [template = constants.%int_3.2] // CHECK:STDOUT: %int_2.loc14_29: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc14_29.9: ref %i32 = array_index %a.var, %int_2.loc14_29 // CHECK:STDOUT: %.loc14_29.10: init %i32 = initialize_from %.loc14_29.8 to %.loc14_29.9 [template = constants.%int_3.2] // CHECK:STDOUT: %.loc14_29.11: init %array_type = array_init (%.loc14_29.4, %.loc14_29.7, %.loc14_29.10) to %a.var [template = constants.%array] // CHECK:STDOUT: %.loc14_30: init %array_type = converted %.loc14_29.1, %.loc14_29.11 [template = constants.%array] // CHECK:STDOUT: assign %a.var, %.loc14_30 -// CHECK:STDOUT: %int_32.loc17_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %pa.var: ref %ptr.2 = var pa // CHECK:STDOUT: %pa: ref %ptr.2 = bind_name pa, %pa.var // CHECK:STDOUT: %a.ref.loc17: ref %array_type = name_ref a, %a // CHECK:STDOUT: %int_0.loc17: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %int_32.loc17_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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.5, element0 [template = constants.%Convert.10] // 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] @@ -203,16 +200,12 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: // CHECK:STDOUT: fn @ValueBinding(%b.param_patt: %array_type) { // CHECK:STDOUT: !entry: -// 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: %int_3.loc22_16: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %array_type.loc22: type = array_type %int_3.loc22_16, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var // CHECK:STDOUT: %int_1.loc22_22: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %int_2.loc22_25: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] -// CHECK:STDOUT: %int_3.loc22_28: 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_28) +// 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.5, element0 [template = constants.%Convert.10] // 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] @@ -230,10 +223,10 @@ fn ValueBinding(b: [i32; 3]) { // 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.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc22_29.3: = bound_method %int_3.loc22_28, %impl.elem0.loc22_29.3 [template = constants.%Convert.bound.3] +// 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_28) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc22_29.8: init %i32 = converted %int_3.loc22_28, %int.convert_checked.loc22_29.3 [template = constants.%int_3.2] +// 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] +// CHECK:STDOUT: %.loc22_29.8: init %i32 = converted %int_3.loc22, %int.convert_checked.loc22_29.3 [template = constants.%int_3.2] // CHECK:STDOUT: %int_2.loc22_29: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] // CHECK:STDOUT: %.loc22_29.9: ref %i32 = array_index %a.var, %int_2.loc22_29 // CHECK:STDOUT: %.loc22_29.10: init %i32 = initialize_from %.loc22_29.8 to %.loc22_29.9 [template = constants.%int_3.2] diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index a59163be8ae4..25dc37dbfc3d 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -65,18 +65,10 @@ var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// 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: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: } 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 d344adf94016..b345fd685529 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -54,14 +54,8 @@ var b: i32 = a[2.6]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } 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 3d8a305a4615..69dc59d6abef 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 @@ -53,14 +53,8 @@ var b: i32 = a[1]; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] -// CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [template = constants.%array_type] // CHECK:STDOUT: %a.var: ref %array_type = var a // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 7f0f1835a0b9..e1c386a450cc 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -93,11 +93,13 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %b.patt: %array_type = binding_pattern b // CHECK:STDOUT: %b.param_patt: %array_type = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] // CHECK:STDOUT: %b.param: %array_type = value_param runtime_param0 +// CHECK:STDOUT: %.loc13: type = splice_block %array_type [template = constants.%array_type] { +// 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: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] +// CHECK:STDOUT: %array_type: type = array_type %int_3, %i32 [template = constants.%array_type] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %array_type = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -106,15 +108,12 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: // CHECK:STDOUT: fn @G(%b.param_patt: %array_type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc19_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc19: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %pb.var: ref %ptr.2 = var pb // CHECK:STDOUT: %pb: ref %ptr.2 = bind_name pb, %pb.var // CHECK:STDOUT: %b.ref.loc19: %array_type = name_ref b, %b // CHECK:STDOUT: %int_0.loc19: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] -// CHECK:STDOUT: %int_32.loc19_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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.5, element0 [template = constants.%Convert.10] // 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] @@ -146,9 +145,6 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %int.convert_checked.loc24_8: init %i32 = call %Convert.specific_fn.loc24_8(%int_4.loc24) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc24_8: init %i32 = converted %int_4.loc24, %int.convert_checked.loc24_8 [template = constants.%int_4.2] // CHECK:STDOUT: assign %.loc24_6.3, %.loc24_8 -// CHECK:STDOUT: %int_32.loc32_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc32_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc32: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %pf.var: ref %ptr.2 = var pf // CHECK:STDOUT: %pf: ref %ptr.2 = bind_name pf, %pf.var // CHECK:STDOUT: %F.ref.loc32: %F.type = name_ref F, file.%F.decl [template = constants.%F] @@ -156,8 +152,8 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %F.call.loc32: init %array_type = call %F.ref.loc32() to %.loc32_21.1 // CHECK:STDOUT: %int_0.loc32: Core.IntLiteral = int_value 0 [template = constants.%int_0.1] // CHECK:STDOUT: %.loc32_21.2: ref %array_type = temporary %.loc32_21.1, %F.call.loc32 -// CHECK:STDOUT: %int_32.loc32_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc32_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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.5, element0 [template = constants.%Convert.10] // 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] diff --git a/toolchain/check/testdata/index/fail_invalid_base.carbon b/toolchain/check/testdata/index/fail_invalid_base.carbon index 0685759d715a..88ebd8100a0d 100644 --- a/toolchain/check/testdata/index/fail_invalid_base.carbon +++ b/toolchain/check/testdata/index/fail_invalid_base.carbon @@ -69,21 +69,13 @@ var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %N: = namespace [template] {} -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var -// CHECK:STDOUT: %int_32.loc34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index e369f788f325..165aeb72a5eb 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -44,8 +44,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: %a.ref: = name_ref a, [template = ] diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 922b45ac905f..81f17a70b0d4 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -54,14 +54,8 @@ var d: i32 = c[-10]; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template = constants.%array_type] // CHECK:STDOUT: %c.var: ref %array_type = var c // CHECK:STDOUT: %c: ref %array_type = bind_name c, %c.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/assoc_const.carbon b/toolchain/check/testdata/interface/assoc_const.carbon index e8eb8e1a9713..a4b113eb7d00 100644 --- a/toolchain/check/testdata/interface/assoc_const.carbon +++ b/toolchain/check/testdata/interface/assoc_const.carbon @@ -47,8 +47,6 @@ interface I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %T: type = assoc_const_decl T [template] // CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, %T [template = constants.%assoc0] -// 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: %N: %i32 = assoc_const_decl N [template] // CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, %N [template = constants.%assoc1] // CHECK:STDOUT: 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 9abea6fba37b..e0c88174cfdd 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -71,8 +71,6 @@ interface I { // CHECK:STDOUT: %.loc16_36: type = converted %.loc16_35, constants.%tuple.type.2 [template = constants.%tuple.type.2] // 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_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42, %impl.elem0 [template = constants.%Convert.bound] diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon index bbaea5efdae1..b3c6f00e3ee9 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon @@ -67,15 +67,19 @@ interface Interface { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc21_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc21_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc21_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc21_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc21_19: type = splice_block %i32.loc21_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc21_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc21_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc21_27: type = splice_block %i32.loc21_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc21_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc21_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index 3a9d42ceb446..def5b62198d8 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -108,15 +108,19 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc31_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc31_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc31_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc31_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc31_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc31_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc31_19: type = splice_block %i32.loc31_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc31_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc31_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc31_27: type = splice_block %i32.loc31_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc31_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc31_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -135,15 +139,19 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc13_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc13_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc13_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc13_35: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc13_35: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_19: type = splice_block %i32.loc13_19 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc13_27: type = splice_block %i32.loc13_27 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc13_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc13_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -231,15 +239,17 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.patt: %U = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %U = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20: type = specific_constant constants.%C.2, @C(constants.%Self) [symbolic = constants.%C.2] -// CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, %.loc20 [symbolic = constants.%C.2] -// CHECK:STDOUT: %U.ref.loc20_43: type = name_ref U, %U.loc20 [symbolic = constants.%U] // CHECK:STDOUT: %U.ref.loc20_49: type = name_ref U, %U.loc20 [symbolic = constants.%U] // CHECK:STDOUT: %self.param.loc20: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_24.2: type = splice_block %Self.ref.loc20 [symbolic = constants.%C.2] { +// CHECK:STDOUT: %.loc20_24.1: type = specific_constant constants.%C.2, @C(constants.%Self) [symbolic = constants.%C.2] +// CHECK:STDOUT: %Self.ref.loc20: type = name_ref Self, %.loc20_24.1 [symbolic = constants.%C.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc20: %C.2 = bind_name self, %self.param.loc20 // CHECK:STDOUT: %U.param.loc20: type = value_param runtime_param // CHECK:STDOUT: %U.loc20: type = bind_symbolic_name U, 1, %U.param.loc20 [symbolic = constants.%U] // CHECK:STDOUT: %u.param.loc20: %U = value_param runtime_param1 +// CHECK:STDOUT: %U.ref.loc20_43: type = name_ref U, %U.loc20 [symbolic = constants.%U] // CHECK:STDOUT: %u.loc20: %U = bind_name u, %u.param.loc20 // CHECK:STDOUT: %return.param.loc20: ref %U = out_param runtime_param2 // CHECK:STDOUT: %return.loc20: ref %U = return_slot %return.param.loc20 @@ -273,15 +283,17 @@ fn Interface.C.F[self: Self](U:! type, u: U) -> U { return u; } // CHECK:STDOUT: %return.patt: %U = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %U = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc14: type = specific_constant constants.%C.2, @C(constants.%Self) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14 [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %U.ref.loc14_35: type = name_ref U, %U.loc14_22.2 [symbolic = %U.loc14_22.1 (constants.%U)] // CHECK:STDOUT: %U.ref.loc14_41: type = name_ref U, %U.loc14_22.2 [symbolic = %U.loc14_22.1 (constants.%U)] // CHECK:STDOUT: %self.param.loc14: @F.%C (%C.2) = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_16.2: type = splice_block %Self.ref.loc14 [symbolic = %C (constants.%C.2)] { +// CHECK:STDOUT: %.loc14_16.1: type = specific_constant constants.%C.2, @C(constants.%Self) [symbolic = %C (constants.%C.2)] +// CHECK:STDOUT: %Self.ref.loc14: type = name_ref Self, %.loc14_16.1 [symbolic = %C (constants.%C.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self.loc14: @F.%C (%C.2) = bind_name self, %self.param.loc14 // CHECK:STDOUT: %U.param.loc14: type = value_param runtime_param // CHECK:STDOUT: %U.loc14_22.2: type = bind_symbolic_name U, 1, %U.param.loc14 [symbolic = %U.loc14_22.1 (constants.%U)] // CHECK:STDOUT: %u.param.loc14: @F.%U.loc14_22.1 (%U) = value_param runtime_param1 +// CHECK:STDOUT: %U.ref.loc14_35: type = name_ref U, %U.loc14_22.2 [symbolic = %U.loc14_22.1 (constants.%U)] // CHECK:STDOUT: %u.loc14: @F.%U.loc14_22.1 (%U) = bind_name u, %u.param.loc14 // CHECK:STDOUT: %return.param.loc14: ref @F.%U.loc14_22.1 (%U) = out_param runtime_param2 // CHECK:STDOUT: %return.loc14: ref @F.%U.loc14_22.1 (%U) = return_slot %return.param.loc14 diff --git a/toolchain/check/testdata/interface/member_lookup.carbon b/toolchain/check/testdata/interface/member_lookup.carbon index 246d8ed56a40..b46c8254f870 100644 --- a/toolchain/check/testdata/interface/member_lookup.carbon +++ b/toolchain/check/testdata/interface/member_lookup.carbon @@ -112,13 +112,15 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %return.patt: @AccessGeneric.%T.loc8_18.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @AccessGeneric.%T.loc8_18.2 (%T) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] -// CHECK:STDOUT: %T.ref.loc8_42: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T)] -// CHECK:STDOUT: %Interface.type.loc8_43.1: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.2)] // CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_18.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_18.2 (constants.%T)] // CHECK:STDOUT: %I.param: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.2) = value_param runtime_param +// CHECK:STDOUT: %.loc8: type = splice_block %Interface.type.loc8_43.1 [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.2)] { +// CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] +// CHECK:STDOUT: %T.ref.loc8_42: type = name_ref T, %T.loc8_18.1 [symbolic = %T.loc8_18.2 (constants.%T)] +// CHECK:STDOUT: %Interface.type.loc8_43.1: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_43.2 (constants.%Interface.type.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %I.loc8_28.1: @AccessGeneric.%Interface.type.loc8_43.2 (%Interface.type.2) = bind_symbolic_name I, 1, %I.param [symbolic = %I.loc8_28.2 (constants.%I.1)] // CHECK:STDOUT: %return.param: ref @AccessGeneric.%T.loc8_18.2 (%T) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @AccessGeneric.%T.loc8_18.2 (%T) = return_slot %return.param @@ -129,13 +131,15 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] -// CHECK:STDOUT: %int_32.loc12_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [template = constants.%Interface.type.3] // CHECK:STDOUT: %int_32.loc12_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc12_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.param: %Interface.type.3 = value_param runtime_param +// CHECK:STDOUT: %.loc12: type = splice_block %Interface.type [template = constants.%Interface.type.3] { +// CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] +// CHECK:STDOUT: %int_32.loc12_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc12_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [template = constants.%Interface.type.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %I.loc12_19.1: %Interface.type.3 = bind_symbolic_name I, 0, %I.param [symbolic = %I.loc12_19.2 (constants.%I.2)] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -155,7 +159,6 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @Interface.%Interface.type (%Interface.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_21.1 [symbolic = %T.loc4_21.2 (constants.%T)] // CHECK:STDOUT: %X: @Interface.%T.loc4_21.2 (%T) = assoc_const_decl X [template] // CHECK:STDOUT: %assoc0.loc5_12.1: @Interface.%assoc_type (%assoc_type.1) = assoc_entity element0, %X [symbolic = %assoc0.loc5_12.2 (constants.%assoc0.1)] // CHECK:STDOUT: @@ -313,13 +316,15 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %return.patt: @AccessMissingGeneric.%T.loc8_25.2 (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @AccessMissingGeneric.%T.loc8_25.2 (%T) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] -// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_25.1 [symbolic = %T.loc8_25.2 (constants.%T)] -// CHECK:STDOUT: %Interface.type.loc8_50.1: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_50.2 (constants.%Interface.type.2)] // CHECK:STDOUT: %T.ref.loc8_56: type = name_ref T, %T.loc8_25.1 [symbolic = %T.loc8_25.2 (constants.%T)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_25.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_25.2 (constants.%T)] // CHECK:STDOUT: %I.param: @AccessMissingGeneric.%Interface.type.loc8_50.2 (%Interface.type.2) = value_param runtime_param +// CHECK:STDOUT: %.loc8: type = splice_block %Interface.type.loc8_50.1 [symbolic = %Interface.type.loc8_50.2 (constants.%Interface.type.2)] { +// CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] +// CHECK:STDOUT: %T.ref.loc8_49: type = name_ref T, %T.loc8_25.1 [symbolic = %T.loc8_25.2 (constants.%T)] +// CHECK:STDOUT: %Interface.type.loc8_50.1: type = facet_type <@Interface, @Interface(constants.%T)> [symbolic = %Interface.type.loc8_50.2 (constants.%Interface.type.2)] +// CHECK:STDOUT: } // CHECK:STDOUT: %I.loc8_35.1: @AccessMissingGeneric.%Interface.type.loc8_50.2 (%Interface.type.2) = bind_symbolic_name I, 1, %I.param [symbolic = %I.loc8_35.2 (constants.%I.1)] // CHECK:STDOUT: %return.param: ref @AccessMissingGeneric.%T.loc8_25.2 (%T) = out_param runtime_param0 // CHECK:STDOUT: %return: ref @AccessMissingGeneric.%T.loc8_25.2 (%T) = return_slot %return.param @@ -330,13 +335,15 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] -// CHECK:STDOUT: %int_32.loc16_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [template = constants.%Interface.type.3] // CHECK:STDOUT: %int_32.loc16_49: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc16_49: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %I.param: %Interface.type.3 = value_param runtime_param +// CHECK:STDOUT: %.loc16: type = splice_block %Interface.type [template = constants.%Interface.type.3] { +// CHECK:STDOUT: %Interface.ref: %Interface.type.1 = name_ref Interface, file.%Interface.decl [template = constants.%Interface.generic] +// CHECK:STDOUT: %int_32.loc16_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc16_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Interface.type: type = facet_type <@Interface, @Interface(constants.%i32)> [template = constants.%Interface.type.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %I.loc16_26.1: %Interface.type.3 = bind_symbolic_name I, 0, %I.param [symbolic = %I.loc16_26.2 (constants.%I.2)] // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -356,7 +363,6 @@ fn AccessMissingConcrete(I:! Interface(i32)) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: interface { // CHECK:STDOUT: %Self.1: @Interface.%Interface.type (%Interface.type.2) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self)] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_21.1 [symbolic = %T.loc4_21.2 (constants.%T)] // CHECK:STDOUT: %X: @Interface.%T.loc4_21.2 (%T) = assoc_const_decl X [template] // CHECK:STDOUT: %assoc0.loc5_12.1: @Interface.%assoc_type (%assoc_type.1) = assoc_entity element0, %X [symbolic = %assoc0.loc5_12.2 (constants.%assoc0.1)] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/interface/no_prelude/as_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type.carbon index bd15ac238932..99b521132c76 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type.carbon @@ -31,8 +31,8 @@ fn F(e: Empty) {} // CHECK:STDOUT: %e.patt: %Empty.type = binding_pattern e // CHECK:STDOUT: %e.param_patt: %Empty.type = value_param_pattern %e.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: %e.param: %Empty.type = value_param runtime_param0 +// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: %e: %Empty.type = bind_name e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon index f51912518a12..53c11889925e 100644 --- a/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/as_type_of_type.carbon @@ -37,8 +37,8 @@ fn F(T:! Empty) { // CHECK:STDOUT: %T.patt.loc13_6.1: %Empty.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: %Empty.type = value_param_pattern %T.patt.loc13_6.1, runtime_param [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: %T.param: %Empty.type = value_param runtime_param +// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: %T.loc13_6.1: %Empty.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_6.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -56,16 +56,13 @@ fn F(T:! Empty) { // CHECK:STDOUT: %T.patt.loc13_6.2: %Empty.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %T.as_type.loc14_10.2: type = facet_access_type %T.loc13_6.2 [symbolic = %T.as_type.loc14_10.2 (constants.%T.as_type)] -// CHECK:STDOUT: %require_complete: = require_complete_type @F.%T.as_type.loc14_10.2 (%T.as_type) [symbolic = %require_complete (constants.%require_complete)] +// CHECK:STDOUT: %T.as_type: type = facet_access_type %T.loc13_6.2 [symbolic = %T.as_type (constants.%T.as_type)] +// CHECK:STDOUT: %require_complete: = require_complete_type @F.%T.as_type (%T.as_type) [symbolic = %require_complete (constants.%require_complete)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: %Empty.type) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %T.ref: %Empty.type = name_ref T, %T.loc13_6.1 [symbolic = %T.loc13_6.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc14_10.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc14_10.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc14: type = converted %T.ref, %T.as_type.loc14_10.1 [symbolic = %T.as_type.loc14_10.2 (constants.%T.as_type)] -// CHECK:STDOUT: %x.var: ref @F.%T.as_type.loc14_10.2 (%T.as_type) = var x -// CHECK:STDOUT: %x: ref @F.%T.as_type.loc14_10.2 (%T.as_type) = bind_name x, %x.var +// CHECK:STDOUT: %x.var: ref @F.%T.as_type (%T.as_type) = var x +// CHECK:STDOUT: %x: ref @F.%T.as_type (%T.as_type) = bind_name x, %x.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon index 1dc560535b6d..55c787424d95 100644 --- a/toolchain/check/testdata/interface/no_prelude/default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/default_fn.carbon @@ -89,7 +89,6 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %.loc16_19.1: %empty_struct_type = struct_literal () diff --git a/toolchain/check/testdata/interface/no_prelude/export_name.carbon b/toolchain/check/testdata/interface/no_prelude/export_name.carbon index 37d2fd6ddcad..ca81fdbaf527 100644 --- a/toolchain/check/testdata/interface/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/interface/no_prelude/export_name.carbon @@ -108,8 +108,8 @@ fn UseEmpty(i: I) {} // CHECK:STDOUT: %i.patt: %I.type = binding_pattern i // CHECK:STDOUT: %i.param_patt: %I.type = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.1 [template = constants.%I.type] // CHECK:STDOUT: %i.param: %I.type = value_param runtime_param0 +// CHECK:STDOUT: %I.ref: type = name_ref I, imports.%import_ref.1 [template = constants.%I.type] // CHECK:STDOUT: %i: %I.type = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon index bbcb6432af92..1927430c5632 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon @@ -30,7 +30,6 @@ alias UseOther = I.other; // CHECK:STDOUT: constants { // CHECK:STDOUT: %I.type: type = facet_type <@I> [template] // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -50,7 +49,6 @@ alias UseOther = I.other; // CHECK:STDOUT: // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = %Self diff --git a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon index a492b9412903..ad69c248b9b1 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon @@ -152,10 +152,12 @@ interface Class { } // CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc14_14.1 (%Self.as_type) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc14_14.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %.type = name_ref Self, @.1.%Self [symbolic = %Self (constants.%Self.2)] -// CHECK:STDOUT: %Self.as_type.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc14: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %self.param: @F.%Self.as_type.loc14_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_14.2: type = splice_block %.loc14_14.1 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref: %.type = name_ref Self, @.1.%Self [symbolic = %Self (constants.%Self.2)] +// CHECK:STDOUT: %Self.as_type.loc14_14.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc14_14.1: type = converted %Self.ref, %Self.as_type.loc14_14.2 [symbolic = %Self.as_type.loc14_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.%Self.as_type.loc14_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] diff --git a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon index b18a173c487b..d385f2292c40 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon @@ -95,9 +95,11 @@ interface DifferentParams(T:! ()) {} // CHECK:STDOUT: %T.patt.loc38_27.1: %empty_tuple.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %empty_tuple.type = value_param_pattern %T.patt.loc38_27.1, runtime_param [symbolic = %T.patt.loc38_27.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc38_32.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc38_32.2: type = converted %.loc38_32.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %T.param: %empty_tuple.type = value_param runtime_param +// CHECK:STDOUT: %.loc38_32.3: type = splice_block %.loc38_32.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc38_32.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc38_32.2: type = converted %.loc38_32.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc38_27.1: %empty_tuple.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc38_27.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_lookup_in_type_type.carbon b/toolchain/check/testdata/interface/no_prelude/fail_lookup_in_type_type.carbon index 7f7176d274c0..1f6aaadc8159 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_lookup_in_type_type.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_lookup_in_type_type.carbon @@ -49,8 +49,6 @@ let U: (type where .Self impls type).missing = {}; // CHECK:STDOUT: --- fail_lookup_type_where.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic] -// CHECK:STDOUT: %type_where: type = facet_type [template] // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -58,12 +56,6 @@ let U: (type where .Self impls type).missing = {}; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .U = @__global_init.%U // CHECK:STDOUT: } -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.loc7: type = where_expr %.Self [template = constants.%type_where] { -// CHECK:STDOUT: requirement_impls %.Self.ref, type -// CHECK:STDOUT: } -// CHECK:STDOUT: %missing.ref: = name_ref missing, [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon index e6b15d47c92d..0dce1419f903 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon @@ -72,11 +72,11 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: %return.patt: = return_slot_pattern // CHECK:STDOUT: %return.param_patt: = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Different.ref: type = name_ref Different, file.%Different.decl [template = constants.%Different.type] // CHECK:STDOUT: %U.ref: %Different.type = name_ref U, %U.loc36_6.1 [symbolic = %U.loc36_6.2 (constants.%U)] // CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @Interface.%assoc1 [template = constants.%assoc1] // CHECK:STDOUT: %U.param: %Different.type = value_param runtime_param +// CHECK:STDOUT: %Different.ref: type = name_ref Different, file.%Different.decl [template = constants.%Different.type] // CHECK:STDOUT: %U.loc36_6.1: %Different.type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc36_6.2 (constants.%U)] // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param @@ -112,11 +112,8 @@ fn G(U:! Different) -> U.(Interface.T); // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Interface.ref.loc22: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %F.ref: %F.assoc_type = name_ref F, @Interface.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %Interface.ref.loc28: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] -// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @Interface.%assoc1 [template = constants.%assoc1] -// CHECK:STDOUT: %.loc28: type = converted %T.ref, [template = ] // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon index 2b46f7a30dac..37f94498415e 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon @@ -172,10 +172,12 @@ interface I { // CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc9_22.1 (%Self.as_type) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc9_22.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc9_22.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc9: type = converted %Self.ref, %Self.as_type.loc9_22.2 [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)] // CHECK:STDOUT: %self.param: @F.%Self.as_type.loc9_22.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_22.2: type = splice_block %.loc9_22.1 [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc9_22.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc9_22.1: type = converted %Self.ref, %Self.as_type.loc9_22.2 [symbolic = %Self.as_type.loc9_22.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.%Self.as_type.loc9_22.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] @@ -223,10 +225,12 @@ interface I { // CHECK:STDOUT: %self.patt: @F.%Self.as_type.loc8_24.1 (%Self.as_type) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @F.%Self.as_type.loc8_24.1 (%Self.as_type) = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc8_24.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_24.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc8: type = converted %Self.ref, %Self.as_type.loc8_24.2 [symbolic = %Self.as_type.loc8_24.1 (constants.%Self.as_type)] // CHECK:STDOUT: %self.param: @F.%Self.as_type.loc8_24.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc8_24.2: type = splice_block %.loc8_24.1 [symbolic = %Self.as_type.loc8_24.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc8_24.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc8_24.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc8_24.1: type = converted %Self.ref, %Self.as_type.loc8_24.2 [symbolic = %Self.as_type.loc8_24.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.%Self.as_type.loc8_24.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %assoc0: %F.assoc_type = assoc_entity element0, %F.decl [template = constants.%assoc0] diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon index baca7f01f407..d644af0f0caa 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon @@ -57,8 +57,8 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: %T.patt.loc13_15.1: %Interface.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: %Interface.type = value_param_pattern %T.patt.loc13_15.1, runtime_param [symbolic = %T.patt.loc13_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.param: %Interface.type = value_param runtime_param +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.loc13_15.1: %Interface.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_15.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %CallFacet.decl: %CallFacet.type = fn_decl @CallFacet [template = constants.%CallFacet] { @@ -67,13 +67,15 @@ fn CallFacet(T:! Interface, x: T) { // CHECK:STDOUT: %x.patt: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type) = binding_pattern x // CHECK:STDOUT: %x.param_patt: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type) = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] -// CHECK:STDOUT: %T.ref: %Interface.type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T)] -// CHECK:STDOUT: %T.as_type.loc21_32.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc21_32.2 (constants.%T.as_type)] -// CHECK:STDOUT: %.loc21: type = converted %T.ref, %T.as_type.loc21_32.1 [symbolic = %T.as_type.loc21_32.2 (constants.%T.as_type)] // CHECK:STDOUT: %T.param: %Interface.type = value_param runtime_param +// CHECK:STDOUT: %Interface.ref: type = name_ref Interface, file.%Interface.decl [template = constants.%Interface.type] // CHECK:STDOUT: %T.loc21_14.1: %Interface.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc21_14.2 (constants.%T)] // CHECK:STDOUT: %x.param: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc21_32.2: type = splice_block %.loc21_32.1 [symbolic = %T.as_type.loc21_32.2 (constants.%T.as_type)] { +// CHECK:STDOUT: %T.ref: %Interface.type = name_ref T, %T.loc21_14.1 [symbolic = %T.loc21_14.2 (constants.%T)] +// CHECK:STDOUT: %T.as_type.loc21_32.1: type = facet_access_type %T.ref [symbolic = %T.as_type.loc21_32.2 (constants.%T.as_type)] +// CHECK:STDOUT: %.loc21_32.1: type = converted %T.ref, %T.as_type.loc21_32.1 [symbolic = %T.as_type.loc21_32.2 (constants.%T.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: @CallFacet.%T.as_type.loc21_32.2 (%T.as_type) = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon index 16658113add2..0d24ce6264ff 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon @@ -59,15 +59,17 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: } { // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc22_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc22_6.2 (constants.%T)] -// CHECK:STDOUT: %.loc22_24.1: @.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc22_24: @.1.%I.type (%I.type.2) = name_ref Self, %.loc22_24.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc22_24.1: type = facet_access_type %Self.ref.loc22_24 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc22_24.2: type = converted %Self.ref.loc22_24, %Self.as_type.loc22_24.1 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc22_35.1: @.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc22_35: @.1.%I.type (%I.type.2) = name_ref Self, %.loc22_35.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc22_35: type = facet_access_type %Self.ref.loc22_35 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc22_35.2: type = converted %Self.ref.loc22_35, %Self.as_type.loc22_35 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] // CHECK:STDOUT: %self.param: @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc22_24.3: type = splice_block %.loc22_24.2 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] { +// CHECK:STDOUT: %.loc22_24.1: @.1.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc22_24: @.1.%I.type (%I.type.2) = name_ref Self, %.loc22_24.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc22_24.1: type = facet_access_type %Self.ref.loc22_24 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc22_24.2: type = converted %Self.ref.loc22_24, %Self.as_type.loc22_24.1 [symbolic = %Self.as_type.loc22_24.2 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @.1.%Self.as_type.loc22_24.2 (%Self.as_type) = return_slot %return.param @@ -94,15 +96,17 @@ fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDOUT: %return.patt: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_14.1: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref.loc13_14: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_14.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref.loc13_14 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref.loc13_14, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc13_25.1: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.ref.loc13_25: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_25.1 [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc13_25: type = facet_access_type %Self.ref.loc13_25 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc13_25.2: type = converted %Self.ref.loc13_25, %Self.as_type.loc13_25 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %self.param: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc13_14.3: type = splice_block %.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %.loc13_14.1: @F.%I.type (%I.type.2) = specific_constant @I.%Self.1, @I(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref.loc13_14: @F.%I.type (%I.type.2) = name_ref Self, %.loc13_14.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc13_14.2: type = facet_access_type %Self.ref.loc13_14 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc13_14.2: type = converted %Self.ref.loc13_14, %Self.as_type.loc13_14.2 [symbolic = %Self.as_type.loc13_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.%Self.as_type.loc13_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @F.%Self.as_type.loc13_14.1 (%Self.as_type) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%Self.as_type.loc13_14.1 (%Self.as_type) = return_slot %return.param diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index 05502498edea..b4661488e7f8 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -137,30 +137,34 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %N.patt.loc22_38.1: @WithImplicitArgs.%T.loc22_28.2 (%T.1) = symbolic_binding_pattern N, 1 [symbolic = %N.patt.loc22_38.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: @WithImplicitArgs.%T.loc22_28.2 (%T.1) = value_param_pattern %N.patt.loc22_38.1, runtime_param [symbolic = %N.patt.loc22_38.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc22_28.1 [symbolic = %T.loc22_28.2 (constants.%T.1)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc22_28.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc22_28.2 (constants.%T.1)] // CHECK:STDOUT: %N.param: @WithImplicitArgs.%T.loc22_28.2 (%T.1) = value_param runtime_param +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc22_28.1 [symbolic = %T.loc22_28.2 (constants.%T.1)] // CHECK:STDOUT: %N.loc22_38.1: @WithImplicitArgs.%T.loc22_28.2 (%T.1) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc22_38.2 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %Receive.decl: %Receive.type = fn_decl @Receive [template = constants.%Receive] { // CHECK:STDOUT: %T.patt.loc24_12.1: %Simple.type.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc24_12.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %Simple.type.3 = value_param_pattern %T.patt.loc24_12.1, runtime_param [symbolic = %T.patt.loc24_12.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple.generic] -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [template = constants.%Simple.type.3] // CHECK:STDOUT: %T.param: %Simple.type.3 = value_param runtime_param +// CHECK:STDOUT: %.loc24: type = splice_block %Simple.type [template = constants.%Simple.type.3] { +// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple.generic] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [template = constants.%Simple.type.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc24_12.1: %Simple.type.3 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc24_12.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %Pass.decl: %Pass.type = fn_decl @Pass [template = constants.%Pass] { // CHECK:STDOUT: %T.patt.loc25_9.1: %Simple.type.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc25_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %Simple.type.3 = value_param_pattern %T.patt.loc25_9.1, runtime_param [symbolic = %T.patt.loc25_9.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple.generic] -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [template = constants.%Simple.type.3] // CHECK:STDOUT: %T.param: %Simple.type.3 = value_param runtime_param +// CHECK:STDOUT: %.loc25: type = splice_block %Simple.type [template = constants.%Simple.type.3] { +// CHECK:STDOUT: %Simple.ref: %Simple.type.1 = name_ref Simple, file.%Simple.decl [template = constants.%Simple.generic] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %Simple.type: type = facet_type <@Simple, @Simple(constants.%C)> [template = constants.%Simple.type.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc25_9.1: %Simple.type.3 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc25_9.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -422,20 +426,24 @@ fn G(T:! Generic(B)) { // CHECK:STDOUT: %T.patt.loc9_6.1: %Generic.type.3 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc9_6.2 (constants.%T.patt.2)] // CHECK:STDOUT: %T.param_patt: %Generic.type.3 = value_param_pattern %T.patt.loc9_6.1, runtime_param [symbolic = %T.patt.loc9_6.2 (constants.%T.patt.2)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic] -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] -// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%A)> [template = constants.%Generic.type.3] // CHECK:STDOUT: %T.param: %Generic.type.3 = value_param runtime_param +// CHECK:STDOUT: %.loc9: type = splice_block %Generic.type [template = constants.%Generic.type.3] { +// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic] +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A] +// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%A)> [template = constants.%Generic.type.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc9_6.1: %Generic.type.3 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc9_6.2 (constants.%T.2)] // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %T.patt.loc10_6.1: %Generic.type.4 = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_6.2 (constants.%T.patt.3)] // CHECK:STDOUT: %T.param_patt: %Generic.type.4 = value_param_pattern %T.patt.loc10_6.1, runtime_param [symbolic = %T.patt.loc10_6.2 (constants.%T.patt.3)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic] -// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] -// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%B)> [template = constants.%Generic.type.4] // CHECK:STDOUT: %T.param: %Generic.type.4 = value_param runtime_param +// CHECK:STDOUT: %.loc10: type = splice_block %Generic.type [template = constants.%Generic.type.4] { +// CHECK:STDOUT: %Generic.ref: %Generic.type.1 = name_ref Generic, file.%Generic.decl [template = constants.%Generic.generic] +// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [template = constants.%B] +// CHECK:STDOUT: %Generic.type: type = facet_type <@Generic, @Generic(constants.%B)> [template = constants.%Generic.type.4] +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc10_6.1: %Generic.type.4 = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_6.2 (constants.%T.3)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/import.carbon b/toolchain/check/testdata/interface/no_prelude/import.carbon index 81e7cd28392e..1aeb233cd7ba 100644 --- a/toolchain/check/testdata/interface/no_prelude/import.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import.carbon @@ -82,8 +82,6 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} // CHECK:STDOUT: %Basic.decl: type = interface_decl @Basic [template = constants.%Basic.type] {} {} // CHECK:STDOUT: %ForwardDeclared.decl: type = interface_decl @ForwardDeclared [template = constants.%ForwardDeclared.type] {} {} -// CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, %ForwardDeclared.decl [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %struct_type.f: type = struct_type {.f: %ForwardDeclared.type} [template = constants.%struct_type.f.1] // CHECK:STDOUT: %f_ref.var: ref %struct_type.f.1 = var f_ref // CHECK:STDOUT: %f_ref: ref %struct_type.f.1 = bind_name f_ref, %f_ref.var // CHECK:STDOUT: } @@ -204,24 +202,24 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %e.patt: %Empty.type = binding_pattern e // CHECK:STDOUT: %e.param_patt: %Empty.type = value_param_pattern %e.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%import_ref.1 [template = constants.%Empty.type] // CHECK:STDOUT: %e.param: %Empty.type = value_param runtime_param0 +// CHECK:STDOUT: %Empty.ref: type = name_ref Empty, imports.%import_ref.1 [template = constants.%Empty.type] // CHECK:STDOUT: %e: %Empty.type = bind_name e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: %UseBasic.decl: %UseBasic.type = fn_decl @UseBasic [template = constants.%UseBasic] { // CHECK:STDOUT: %e.patt: %Basic.type = binding_pattern e // CHECK:STDOUT: %e.param_patt: %Basic.type = value_param_pattern %e.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Basic.ref: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] // CHECK:STDOUT: %e.param: %Basic.type = value_param runtime_param0 +// CHECK:STDOUT: %Basic.ref: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] // CHECK:STDOUT: %e: %Basic.type = bind_name e, %e.param // CHECK:STDOUT: } // CHECK:STDOUT: %UseForwardDeclared.decl: %UseForwardDeclared.type = fn_decl @UseForwardDeclared [template = constants.%UseForwardDeclared] { // CHECK:STDOUT: %f.patt: %ForwardDeclared.type = binding_pattern f // CHECK:STDOUT: %f.param_patt: %ForwardDeclared.type = value_param_pattern %f.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] // CHECK:STDOUT: %f.param: %ForwardDeclared.type = value_param runtime_param0 +// CHECK:STDOUT: %ForwardDeclared.ref: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] // CHECK:STDOUT: %f: %ForwardDeclared.type = bind_name f, %f.param // CHECK:STDOUT: } // CHECK:STDOUT: %Basic.ref.loc10: type = name_ref Basic, imports.%import_ref.2 [template = constants.%Basic.type] @@ -236,8 +234,6 @@ var f: ForwardDeclared* = &f_ref.f; // CHECK:STDOUT: %ForwardDeclared.ref.loc14: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] // CHECK:STDOUT: %F.ref.loc14: %F.assoc_type.2 = name_ref F, imports.%import_ref.13 [template = constants.%assoc1.2] // CHECK:STDOUT: %UseForwardDeclaredF: %F.assoc_type.2 = bind_alias UseForwardDeclaredF, imports.%import_ref.13 [template = constants.%assoc1.2] -// CHECK:STDOUT: %ForwardDeclared.ref.loc16: type = name_ref ForwardDeclared, imports.%import_ref.3 [template = constants.%ForwardDeclared.type] -// CHECK:STDOUT: %ptr: type = ptr_type %ForwardDeclared.type [template = constants.%ptr] // CHECK:STDOUT: %f.var: ref %ptr = var f // CHECK:STDOUT: %f: ref %ptr = bind_name f, %f.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/import_access.carbon b/toolchain/check/testdata/interface/no_prelude/import_access.carbon index c10de96c5042..3ec6c5006267 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_access.carbon @@ -215,8 +215,8 @@ private interface Redecl {} // CHECK:STDOUT: %i.patt: %Def.type = binding_pattern i // CHECK:STDOUT: %i.param_patt: %Def.type = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Def.ref: type = name_ref Def, imports.%import_ref.1 [template = constants.%Def.type] // CHECK:STDOUT: %i.param: %Def.type = value_param runtime_param0 +// CHECK:STDOUT: %Def.ref: type = name_ref Def, imports.%import_ref.1 [template = constants.%Def.type] // CHECK:STDOUT: %i: %Def.type = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -248,8 +248,8 @@ private interface Redecl {} // CHECK:STDOUT: %i.patt: = binding_pattern i // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 +// CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -282,9 +282,11 @@ private interface Redecl {} // CHECK:STDOUT: %i.patt: = binding_pattern i // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] -// CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 +// CHECK:STDOUT: %.1: = splice_block [template = ] { +// CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] +// CHECK:STDOUT: %Def.ref: = name_ref Def, [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -318,8 +320,8 @@ private interface Redecl {} // CHECK:STDOUT: %i.patt: %ForwardWithDef.type = binding_pattern i // CHECK:STDOUT: %i.param_patt: %ForwardWithDef.type = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %ForwardWithDef.ref: type = name_ref ForwardWithDef, imports.%import_ref.1 [template = constants.%ForwardWithDef.type] // CHECK:STDOUT: %i.param: %ForwardWithDef.type = value_param runtime_param0 +// CHECK:STDOUT: %ForwardWithDef.ref: type = name_ref ForwardWithDef, imports.%import_ref.1 [template = constants.%ForwardWithDef.type] // CHECK:STDOUT: %i: %ForwardWithDef.type = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -351,8 +353,8 @@ private interface Redecl {} // CHECK:STDOUT: %i.patt: = binding_pattern i // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 +// CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -385,9 +387,11 @@ private interface Redecl {} // CHECK:STDOUT: %i.patt: = binding_pattern i // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] -// CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 +// CHECK:STDOUT: %.1: = splice_block [template = ] { +// CHECK:STDOUT: %Test.ref: = name_ref Test, imports.%Test [template = imports.%Test] +// CHECK:STDOUT: %ForwardWithDef.ref: = name_ref ForwardWithDef, [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -417,9 +421,11 @@ private interface Redecl {} // CHECK:STDOUT: %i.patt: = binding_pattern i // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 +// CHECK:STDOUT: %.loc8: type = splice_block %ptr [template = ] { +// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: %Forward.decl: type = interface_decl @Forward [template = constants.%Forward.type] {} {} @@ -454,9 +460,11 @@ private interface Redecl {} // CHECK:STDOUT: %i.patt: = binding_pattern i // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 +// CHECK:STDOUT: %.loc10: type = splice_block %ptr [template = ] { +// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -489,9 +497,11 @@ private interface Redecl {} // CHECK:STDOUT: %i.patt: = binding_pattern i // CHECK:STDOUT: %i.param_patt: = value_param_pattern %i.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] -// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %i.param: = value_param runtime_param0 +// CHECK:STDOUT: %.loc9: type = splice_block %ptr [template = ] { +// CHECK:STDOUT: %Forward.ref: = name_ref Forward, [template = ] +// CHECK:STDOUT: %ptr: type = ptr_type [template = ] +// CHECK:STDOUT: } // CHECK:STDOUT: %i: = bind_name i, %i.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/no_prelude/self.carbon b/toolchain/check/testdata/interface/no_prelude/self.carbon index 131b346937f8..8f5bf9ac2ebc 100644 --- a/toolchain/check/testdata/interface/no_prelude/self.carbon +++ b/toolchain/check/testdata/interface/no_prelude/self.carbon @@ -39,13 +39,15 @@ interface UseSelf { // CHECK:STDOUT: %return.patt: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc12_14: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %Self.ref.loc12_25: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] // CHECK:STDOUT: %Self.as_type.loc12_25: type = facet_access_type %Self.ref.loc12_25 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %.loc12_25: type = converted %Self.ref.loc12_25, %Self.as_type.loc12_25 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] // CHECK:STDOUT: %self.param: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_14.2: type = splice_block %.loc12_14.1 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %Self.ref.loc12_14: %UseSelf.type = name_ref Self, @UseSelf.%Self [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc12_14.2: type = facet_access_type %Self.ref.loc12_14 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc12_14.1: type = converted %Self.ref.loc12_14, %Self.as_type.loc12_14.2 [symbolic = %Self.as_type.loc12_14.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @F.%Self.as_type.loc12_14.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @F.%Self.as_type.loc12_14.1 (%Self.as_type) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @F.%Self.as_type.loc12_14.1 (%Self.as_type) = return_slot %return.param diff --git a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon index fdb274330157..9d8d996ae399 100644 --- a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon @@ -217,32 +217,32 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc8: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc8: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc8: %C = bind_symbolic_name a, 0, %a.param.loc8 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc10: %Bar.type.1 = interface_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc10_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc10_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc10_15.1, runtime_param [symbolic = %a.patt.loc10_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param.loc10: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref.loc10: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc10_15.1: %C = bind_symbolic_name a, 0, %a.param.loc10 [symbolic = %a.loc10_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl.loc11: %Bar.type.1 = interface_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc10_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc10_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc10_15.1, runtime_param [symbolic = %a.patt.loc10_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param.loc11: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref.loc11: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc11: %C = bind_symbolic_name a, 0, %a.param.loc11 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -327,16 +327,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc6_21.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_21.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_21.1, runtime_param [symbolic = %a.patt.loc6_21.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6_21.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_21.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_21.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_21.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_21.1, runtime_param [symbolic = %a.patt.loc6_21.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -399,16 +399,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc6_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc14_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc14_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc14_15.1, runtime_param [symbolic = %a.patt.loc14_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc14_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc14_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -481,16 +481,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc6_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc6: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc6: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6_15.1: %C = bind_symbolic_name a, 0, %a.param.loc6 [symbolic = %a.loc6_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Foo.decl.loc7: %Foo.type.1 = interface_decl @Foo [template = constants.%Foo.generic] { // CHECK:STDOUT: %a.patt.loc6_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param.loc7: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7: %C = bind_symbolic_name a, 0, %a.param.loc7 [symbolic = constants.%a] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -555,16 +555,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %Bar.decl: %Bar.type = interface_decl @Bar [template = constants.%Bar.generic] { // CHECK:STDOUT: %a.patt.loc8_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc8_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc8_15.1, runtime_param [symbolic = %a.patt.loc8_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc8_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc8_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -645,16 +645,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc12_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc12_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc12_15.1, runtime_param [symbolic = %a.patt.loc12_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %a.loc12_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc12_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl.loc21: %.type.3 = interface_decl @.2 [template = constants.%.generic.2] { // CHECK:STDOUT: %a.patt.loc21_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc21_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc21_15.1, runtime_param [symbolic = %a.patt.loc21_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %a.loc21_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc21_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -768,16 +768,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %b.patt.loc15_15.1: %C = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc15_15.2 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt.loc15_15.1, runtime_param [symbolic = %b.patt.loc15_15.2 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %b.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %b.loc15_15.1: %C = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc15_15.2 (constants.%b)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -855,16 +855,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc15_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_15.1, runtime_param [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc15_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc15_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -942,16 +942,16 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc7_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc7_15.1, runtime_param [symbolic = %a.patt.loc7_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc7_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc7_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc15_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc15_15.1, runtime_param [symbolic = %a.patt.loc15_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc15_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc15_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1022,8 +1022,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc6_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.loc6_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1085,8 +1085,8 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc17_15.1: %C = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt.loc17_15.1, runtime_param [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D [template = constants.%C] // CHECK:STDOUT: %a.loc17_15.1: %C = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc17_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1160,19 +1160,23 @@ interface Foo(a:! const (const C)) {} // CHECK:STDOUT: %a.patt.loc6_15.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc6_15.1, runtime_param [symbolic = %a.patt.loc6_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] // CHECK:STDOUT: %a.param: %const = value_param runtime_param +// CHECK:STDOUT: %.loc6: type = splice_block %const [template = constants.%const] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %const: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc6_15.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc6_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: %.decl: %.type.1 = interface_decl @.1 [template = constants.%.generic] { // CHECK:STDOUT: %a.patt.loc17_15.1: %const = symbolic_binding_pattern a, 0 [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] // CHECK:STDOUT: %a.param_patt: %const = value_param_pattern %a.patt.loc17_15.1, runtime_param [symbolic = %a.patt.loc17_15.2 (constants.%a.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %const.loc17_26: type = const_type %C [template = constants.%const] -// CHECK:STDOUT: %const.loc17_19: type = const_type %const [template = constants.%const] // CHECK:STDOUT: %a.param: %const = value_param runtime_param +// CHECK:STDOUT: %.loc17: type = splice_block %const.loc17_19 [template = constants.%const] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %const.loc17_26: type = const_type %C [template = constants.%const] +// CHECK:STDOUT: %const.loc17_19: type = const_type %const [template = constants.%const] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc17_15.1: %const = bind_symbolic_name a, 0, %a.param [symbolic = %a.loc17_15.2 (constants.%a)] // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/interface/todo_define_not_default.carbon b/toolchain/check/testdata/interface/todo_define_not_default.carbon index 52ab8e46fd30..9bbbe677c58d 100644 --- a/toolchain/check/testdata/interface/todo_define_not_default.carbon +++ b/toolchain/check/testdata/interface/todo_define_not_default.carbon @@ -80,15 +80,19 @@ interface I { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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: %int_32.loc14_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc14_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_11: type = splice_block %i32.loc14_11 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc14_19: type = splice_block %i32.loc14_19 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %b: %i32 = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -102,8 +106,6 @@ interface I { // CHECK:STDOUT: %.loc18_28: type = converted %.loc18_27, constants.%tuple.type.2 [template = constants.%tuple.type.2] // 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_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: %int_42: Core.IntLiteral = int_value 42 [template = constants.%int_42.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_42, %impl.elem0 [template = constants.%Convert.bound] diff --git a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon index b36f50311d37..77996dc1ce78 100644 --- a/toolchain/check/testdata/ir/duplicate_name_same_line.carbon +++ b/toolchain/check/testdata/ir/duplicate_name_same_line.carbon @@ -56,8 +56,6 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: if %true.loc11_14 br !if.then.loc11_18 else br !if.else.loc11_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_18: -// CHECK:STDOUT: %int_32.loc11_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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] @@ -74,8 +72,6 @@ fn A() { if (true) { var n: i32 = 1; } if (true) { var n: i32 = 2; } } // CHECK:STDOUT: if %true.loc11_44 br !if.then.loc11_48 else br !if.else.loc11_48 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc11_48: -// CHECK:STDOUT: %int_32.loc11_59: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_59: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %n.var.loc11_56: ref %i32 = var n // CHECK:STDOUT: %n.loc11_56: ref %i32 = bind_name n, %n.var.loc11_56 // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2.1] diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index ce3a4607ca2d..0382f1735569 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -200,8 +200,6 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_12.2: type = converted %.loc10_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc10_17: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc10_18: %empty_tuple.type = converted %.loc10_17, %empty_tuple [template = constants.%empty_tuple] @@ -250,8 +248,6 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc9_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_12.2: type = converted %.loc9_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc9_17: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_18: %empty_tuple.type = converted %.loc9_17, %empty_tuple [template = constants.%empty_tuple] @@ -321,8 +317,6 @@ impl i32 as Empty { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc9_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_12.2: type = converted %.loc9_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc9_17: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %empty_tuple.loc9: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc9_18: %empty_tuple.type = converted %.loc9_17, %empty_tuple.loc9 [template = constants.%empty_tuple] @@ -331,21 +325,15 @@ impl i32 as Empty { // CHECK:STDOUT: %b.patt.loc10_8.2: %tuple.type.1 = symbolic_binding_pattern b, 0 [symbolic = %b.patt.loc10_8.1 (constants.%b.patt)] // CHECK:STDOUT: %b.param_patt: %tuple.type.1 = value_param_pattern %b.patt.loc10_8.2, runtime_param [symbolic = %b.patt.loc10_8.1 (constants.%b.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc10_14: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_16.1: %tuple.type.1 = tuple_literal (%.loc10_14) -// CHECK:STDOUT: %.loc10_16.2: type = converted %.loc10_14, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_16.3: type = converted %.loc10_16.1, constants.%tuple.type.1 [template = constants.%tuple.type.1] // CHECK:STDOUT: %b.param: %tuple.type.1 = value_param runtime_param +// CHECK:STDOUT: %.loc10_16.4: type = splice_block %.loc10_16.3 [template = constants.%tuple.type.1] { +// CHECK:STDOUT: %.loc10_14: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_16.1: %tuple.type.1 = tuple_literal (%.loc10_14) +// CHECK:STDOUT: %.loc10_16.2: type = converted %.loc10_14, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc10_16.3: type = converted %.loc10_16.1, constants.%tuple.type.1 [template = constants.%tuple.type.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %b.loc10_8.2: %tuple.type.1 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc10_8.1 (constants.%b)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc22_13: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc22_17: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc22_21: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc22_22.1: %tuple.type.2 = tuple_literal (%.loc22_13, %.loc22_17, %.loc22_21) -// CHECK:STDOUT: %.loc22_22.2: type = converted %.loc22_13, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc22_22.3: type = converted %.loc22_17, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc22_22.4: type = converted %.loc22_21, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc22_22.5: type = converted %.loc22_22.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %.loc22_28: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc22_32: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc22_36: %empty_tuple.type = tuple_literal () @@ -381,12 +369,6 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: fn(%b.param_patt: %tuple.type.1) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_15: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_19: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_20.1: %tuple.type.3 = tuple_literal (%.loc11_15, %.loc11_19) -// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_20.3: type = converted %.loc11_19, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_20.4: type = converted %.loc11_20.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %.loc11_26: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_30: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc11_31.1: %tuple.type.3 = tuple_literal (%.loc11_26, %.loc11_30) @@ -397,18 +379,12 @@ impl i32 as Empty { // CHECK:STDOUT: %tuple: %tuple.type.3 = tuple_value (%.loc11_31.2, %.loc11_31.3) [template = constants.%tuple.2] // CHECK:STDOUT: %.loc11_32: %tuple.type.3 = converted %.loc11_31.1, %tuple [template = constants.%tuple.2] // CHECK:STDOUT: %c.loc11_9.1: %tuple.type.3 = bind_symbolic_name c, 1, %.loc11_32 [symbolic = %c.loc11_9.2 (constants.%c)] -// CHECK:STDOUT: %.loc13_14.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc13_14.2: type = converted %.loc13_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a1.var: ref %empty_tuple.type = var a1 // CHECK:STDOUT: %a1: ref %empty_tuple.type = bind_name a1, %a1.var // CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, @C.%a // CHECK:STDOUT: %.loc13_18: init %empty_tuple.type = tuple_init () to %a1.var [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc13_19: init %empty_tuple.type = converted %a.ref, %.loc13_18 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a1.var, %.loc13_19 -// CHECK:STDOUT: %.loc14_15: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%.loc14_15) -// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc14_17.3: type = converted %.loc14_17.1, constants.%tuple.type.1 [template = constants.%tuple.type.1] // CHECK:STDOUT: %b1.var: ref %tuple.type.1 = var b1 // CHECK:STDOUT: %b1: ref %tuple.type.1 = bind_name b1, %b1.var // CHECK:STDOUT: %b.ref: %tuple.type.1 = name_ref b, %b.loc10_8.2 [symbolic = %b.loc10_8.1 (constants.%b)] @@ -419,12 +395,6 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc14_21.3: init %tuple.type.1 = tuple_init (%.loc14_21.2) to %b1.var [template = constants.%tuple.3] // CHECK:STDOUT: %.loc14_22: init %tuple.type.1 = converted %b.ref, %.loc14_21.3 [template = constants.%tuple.3] // CHECK:STDOUT: assign %b1.var, %.loc14_22 -// CHECK:STDOUT: %.loc15_15: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_19: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_20.1: %tuple.type.3 = tuple_literal (%.loc15_15, %.loc15_19) -// CHECK:STDOUT: %.loc15_20.2: type = converted %.loc15_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc15_20.3: type = converted %.loc15_19, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc15_20.4: type = converted %.loc15_20.1, constants.%tuple.type.3 [template = constants.%tuple.type.3] // CHECK:STDOUT: %c1.var: ref %tuple.type.3 = var c1 // CHECK:STDOUT: %c1: ref %tuple.type.3 = bind_name c1, %c1.var // CHECK:STDOUT: %c.ref: %tuple.type.3 = name_ref c, %c.loc11_9.1 [symbolic = %c.loc11_9.2 (constants.%c)] @@ -439,14 +409,6 @@ impl i32 as Empty { // CHECK:STDOUT: %.loc15_24.5: init %tuple.type.3 = tuple_init (%.loc15_24.2, %.loc15_24.4) to %c1.var [template = constants.%tuple.2] // CHECK:STDOUT: %.loc15_25: init %tuple.type.3 = converted %c.ref, %.loc15_24.5 [template = constants.%tuple.2] // CHECK:STDOUT: assign %c1.var, %.loc15_25 -// CHECK:STDOUT: %.loc16_15: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc16_19: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc16_23: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc16_24.1: %tuple.type.2 = tuple_literal (%.loc16_15, %.loc16_19, %.loc16_23) -// CHECK:STDOUT: %.loc16_24.2: type = converted %.loc16_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc16_24.3: type = converted %.loc16_19, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc16_24.4: type = converted %.loc16_23, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc16_24.5: type = converted %.loc16_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %d1.var: ref %tuple.type.2 = var d1 // CHECK:STDOUT: %d1: ref %tuple.type.2 = bind_name d1, %d1.var // CHECK:STDOUT: %d.ref: %tuple.type.2 = name_ref d, @C.%d @@ -512,8 +474,6 @@ impl i32 as Empty { // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template = constants.%complete_type] // CHECK:STDOUT: @@ -569,8 +529,8 @@ impl i32 as Empty { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -578,8 +538,6 @@ impl i32 as Empty { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] @@ -634,8 +592,8 @@ impl i32 as Empty { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -647,8 +605,6 @@ impl i32 as Empty { // CHECK:STDOUT: if %true br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc6: = bound_method %int_0, %impl.elem0.loc6 [template = constants.%Convert.bound.1] @@ -866,8 +822,8 @@ impl i32 as Empty { // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Empty.decl: type = interface_decl @Empty [template = constants.%Empty.type] {} {} // CHECK:STDOUT: impl_decl @impl.1 [template] {} { -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %Empty.ref: type = name_ref Empty, file.%Empty.decl [template = constants.%Empty.type] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -880,9 +836,7 @@ impl i32 as Empty { // CHECK:STDOUT: witness = () // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: impl @impl.1: %i32.loc6 as %Empty.ref { -// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_0, %impl.elem0 [template = constants.%Convert.bound] diff --git a/toolchain/check/testdata/let/convert.carbon b/toolchain/check/testdata/let/convert.carbon index e37b5772c502..d6c6e058cce4 100644 --- a/toolchain/check/testdata/let/convert.carbon +++ b/toolchain/check/testdata/let/convert.carbon @@ -22,7 +22,6 @@ fn F() -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %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] @@ -63,8 +62,8 @@ fn F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -72,14 +71,6 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc12_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc12_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc12_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_24.1: %tuple.type.1 = tuple_literal (%i32.loc12_11, %i32.loc12_16, %i32.loc12_21) -// CHECK:STDOUT: %.loc12_24.2: type = converted %.loc12_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %v.var: ref %tuple.type.2 = var v // CHECK:STDOUT: %v: ref %tuple.type.2 = bind_name v, %v.var // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] @@ -110,14 +101,6 @@ fn F() -> i32 { // CHECK:STDOUT: %.loc12_36.8: init %tuple.type.2 = tuple_init (%.loc12_36.3, %.loc12_36.5, %.loc12_36.7) to %v.var [template = constants.%tuple] // CHECK:STDOUT: %.loc12_37: init %tuple.type.2 = converted %.loc12_36.1, %.loc12_36.8 [template = constants.%tuple] // CHECK:STDOUT: assign %v.var, %.loc12_37 -// CHECK:STDOUT: %int_32.loc14_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_24.1: %tuple.type.1 = tuple_literal (%i32.loc14_11, %i32.loc14_16, %i32.loc14_21) -// CHECK:STDOUT: %.loc14_24.2: type = converted %.loc14_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %v.ref: ref %tuple.type.2 = name_ref v, %v // CHECK:STDOUT: %tuple.elem0.loc14: ref %i32 = tuple_access %v.ref, element0 // CHECK:STDOUT: %.loc14_28.1: %i32 = bind_value %tuple.elem0.loc14 diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 358e9ed7ee30..95e0e7e15955 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -60,8 +60,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// 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: %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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc12: = bound_method %int_1, %impl.elem0.loc12 [template = constants.%Convert.bound.1] @@ -70,8 +68,6 @@ fn F() { // CHECK:STDOUT: %.loc12_17.1: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%int_1.2] // 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_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: %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.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound.loc19: = bound_method %int_2, %impl.elem0.loc19 [template = constants.%Convert.bound.2] diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index f4929b1f3531..4e137a2e6bcf 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -60,11 +60,13 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc12_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc12_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %i32.loc12_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc12_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -76,7 +78,6 @@ fn F(a: i32) -> i32 { // 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: %T: type = bind_symbolic_name T, 0, %i32.loc13 [symbolic = constants.%T] -// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [template = constants.%int_5] // CHECK:STDOUT: %.loc21: %T = converted %int_5, [template = ] // CHECK:STDOUT: %x: %T = bind_name x, diff --git a/toolchain/check/testdata/let/fail_generic_import.carbon b/toolchain/check/testdata/let/fail_generic_import.carbon index 4fb47a044098..570174feb61e 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -82,7 +82,6 @@ let a: T = 0; // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%import_ref // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/let/fail_missing_value.carbon b/toolchain/check/testdata/let/fail_missing_value.carbon index c66ed6d5179f..37c0df7b31f7 100644 --- a/toolchain/check/testdata/let/fail_missing_value.carbon +++ b/toolchain/check/testdata/let/fail_missing_value.carbon @@ -45,16 +45,12 @@ fn F() { // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %n: %i32 = bind_name n, // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// 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: %n: %i32 = bind_name n, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index 0d6c751f4d8b..8e70e4d4cba0 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -120,22 +120,6 @@ protected protected let i: i32 = 1; // CHECK:STDOUT: .i = @__global_init.%i // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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: %int_32.loc33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc46: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc46: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc59: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc59: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc72: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc72: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc84: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc84: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/let/fail_use_in_init.carbon b/toolchain/check/testdata/let/fail_use_in_init.carbon index 0d3624683580..8ca2389e6c37 100644 --- a/toolchain/check/testdata/let/fail_use_in_init.carbon +++ b/toolchain/check/testdata/let/fail_use_in_init.carbon @@ -43,8 +43,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// 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: %a.ref: = name_ref a, [template = ] // CHECK:STDOUT: %a: %i32 = bind_name a, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/let/generic.carbon b/toolchain/check/testdata/let/generic.carbon index 630faff440d1..75a249c00c07 100644 --- a/toolchain/check/testdata/let/generic.carbon +++ b/toolchain/check/testdata/let/generic.carbon @@ -47,11 +47,8 @@ fn F() { // 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: %T: type = bind_symbolic_name T, 0, %i32 [symbolic = constants.%T] -// CHECK:STDOUT: %T.ref.loc13: type = name_ref T, %T [symbolic = constants.%T] -// CHECK:STDOUT: %ptr: type = ptr_type %T [symbolic = constants.%ptr] // CHECK:STDOUT: %p.var: ref %ptr = var p // CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var -// CHECK:STDOUT: %T.ref.loc14: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %a.var: ref %T = var a // CHECK:STDOUT: %a: ref %T = bind_name a, %a.var // CHECK:STDOUT: %p.ref: ref %ptr = name_ref p, %p diff --git a/toolchain/check/testdata/let/generic_import.carbon b/toolchain/check/testdata/let/generic_import.carbon index 158f87222580..5002c499c983 100644 --- a/toolchain/check/testdata/let/generic_import.carbon +++ b/toolchain/check/testdata/let/generic_import.carbon @@ -83,11 +83,8 @@ var b: T = *a; // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %T.ref.loc8: type = name_ref T, imports.%import_ref -// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var -// CHECK:STDOUT: %T.ref.loc12: type = name_ref T, imports.%import_ref // CHECK:STDOUT: %b.var: ref = var b // CHECK:STDOUT: %b: ref = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/let/global.carbon b/toolchain/check/testdata/let/global.carbon index 8dc64d81de61..78760aa5307d 100644 --- a/toolchain/check/testdata/let/global.carbon +++ b/toolchain/check/testdata/let/global.carbon @@ -45,8 +45,6 @@ fn F() -> i32 { return n; } // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 diff --git a/toolchain/check/testdata/let/local.carbon b/toolchain/check/testdata/let/local.carbon index f223b422a9f9..5f2c0dae3c09 100644 --- a/toolchain/check/testdata/let/local.carbon +++ b/toolchain/check/testdata/let/local.carbon @@ -42,11 +42,13 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -55,8 +57,6 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// 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: %a.ref: %i32 = name_ref a, %a // CHECK:STDOUT: %b: %i32 = bind_name b, %a.ref // CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b diff --git a/toolchain/check/testdata/let/no_prelude/import.carbon b/toolchain/check/testdata/let/no_prelude/import.carbon index 49df73b454f2..ff08684d494c 100644 --- a/toolchain/check/testdata/let/no_prelude/import.carbon +++ b/toolchain/check/testdata/let/no_prelude/import.carbon @@ -43,8 +43,6 @@ let b: () = Other.a; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .a = @__global_init.%a // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -73,8 +71,6 @@ let b: () = Other.a; // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -95,8 +91,6 @@ let b: () = Other.a; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .a = @__global_init.%a // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -128,8 +122,6 @@ let b: () = Other.a; // CHECK:STDOUT: .b = @__global_init.%b // CHECK:STDOUT: } // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/let/no_prelude/import_access.carbon b/toolchain/check/testdata/let/no_prelude/import_access.carbon index 4d995ba88353..914dc07fffd2 100644 --- a/toolchain/check/testdata/let/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/let/no_prelude/import_access.carbon @@ -62,8 +62,6 @@ let v2: () = Test.v; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v [private] = @__global_init.%v // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_17.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_17.2: type = converted %.loc4_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -92,8 +90,6 @@ let v2: () = Test.v; // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -114,8 +110,6 @@ let v2: () = Test.v; // CHECK:STDOUT: .v2 = @__global_init.%v2 // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { @@ -143,8 +137,6 @@ let v2: () = Test.v; // CHECK:STDOUT: .v2 = @__global_init.%v2 // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc9_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_10.2: type = converted %.loc9_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/let/shadowed_decl.carbon b/toolchain/check/testdata/let/shadowed_decl.carbon index 79352f85fef7..65a0791d83fb 100644 --- a/toolchain/check/testdata/let/shadowed_decl.carbon +++ b/toolchain/check/testdata/let/shadowed_decl.carbon @@ -52,11 +52,13 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_9 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %a.loc11: %i32 = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -65,8 +67,6 @@ fn F(a: i32) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%a.param_patt: %i32) -> %i32 { // CHECK:STDOUT: !entry: -// 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: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] // CHECK:STDOUT: %impl.elem0: %Convert.type.2 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] // CHECK:STDOUT: %Convert.bound: = bound_method %int_1, %impl.elem0 [template = constants.%Convert.bound] diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index de1aa87e438c..21f3dc47ffdd 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.carbon @@ -88,8 +88,6 @@ var a: i32 = NS.A(); // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } -// 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: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/fail_duplicate.carbon b/toolchain/check/testdata/namespace/fail_duplicate.carbon index ae4d1e2c5c26..bf646d65cd6a 100644 --- a/toolchain/check/testdata/namespace/fail_duplicate.carbon +++ b/toolchain/check/testdata/namespace/fail_duplicate.carbon @@ -52,8 +52,5 @@ fn Foo.Baz() { // CHECK:STDOUT: fn @Baz() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: return -// CHECK:STDOUT: -// CHECK:STDOUT: !.loc23: -// CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index f3e28d07db72..5f22c1cfa315 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -72,15 +72,17 @@ fn D(T:! type).F() {} // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} -// 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: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc24: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %B: = namespace [template] {} -// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0, %T.param [symbolic = constants.%T] // CHECK:STDOUT: %x.param: %T = value_param runtime_param0 +// CHECK:STDOUT: %T.ref: type = name_ref T, %T [symbolic = constants.%T] // CHECK:STDOUT: %x: %T = bind_name x, %x.param // CHECK:STDOUT: %C: = namespace [template] {} // CHECK:STDOUT: %D: = namespace [template] {} diff --git a/toolchain/check/testdata/namespace/imported.carbon b/toolchain/check/testdata/namespace/imported.carbon index 47240ab4f1ea..8449fac6ba80 100644 --- a/toolchain/check/testdata/namespace/imported.carbon +++ b/toolchain/check/testdata/namespace/imported.carbon @@ -105,20 +105,12 @@ var package_b: () = package.NS.ChildNS.B(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %.loc5_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc5_9.2: type = converted %.loc5_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %.loc7_17.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_17.2: type = converted %.loc7_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %package_a.var: ref %empty_tuple.type = var package_a // CHECK:STDOUT: %package_a: ref %empty_tuple.type = bind_name package_a, %package_a.var -// CHECK:STDOUT: %.loc8_17.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc8_17.2: type = converted %.loc8_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %package_b.var: ref %empty_tuple.type = var package_b // CHECK:STDOUT: %package_b: ref %empty_tuple.type = bind_name package_b, %package_b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/imported_indirect.carbon b/toolchain/check/testdata/namespace/imported_indirect.carbon index c059c7847903..62c0309a6a61 100644 --- a/toolchain/check/testdata/namespace/imported_indirect.carbon +++ b/toolchain/check/testdata/namespace/imported_indirect.carbon @@ -253,8 +253,6 @@ fn G() { Same.F(); } // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc5_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc5_9.2: type = converted %.loc5_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e // CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/namespace/merging_with_indirections.carbon b/toolchain/check/testdata/namespace/merging_with_indirections.carbon index 8ebf87f08532..22d0c698705b 100644 --- a/toolchain/check/testdata/namespace/merging_with_indirections.carbon +++ b/toolchain/check/testdata/namespace/merging_with_indirections.carbon @@ -175,13 +175,6 @@ fn Run() { // CHECK:STDOUT: %import_ref.1: %F.type = import_ref Other//b, F, loaded [template = constants.%F] // CHECK:STDOUT: %import_ref.2: = import_ref Other//b, inst28 [indirect], loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//b, inst29 [indirect], unloaded -// CHECK:STDOUT: %import_ref.4: = import_ref Other//b, NS1, loaded -// CHECK:STDOUT: %NS1: = namespace %import_ref.4, [template] { -// CHECK:STDOUT: .A = %import_ref.5 -// CHECK:STDOUT: import Other//b -// CHECK:STDOUT: import Other//a -// CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.5: type = import_ref Other//a, A, loaded [template = constants.%A] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -208,9 +201,6 @@ fn Run() { // CHECK:STDOUT: %.loc7_11.1: ref %A = temporary_storage // CHECK:STDOUT: %F.call.loc7: init %A = call %F.ref.loc7() to %.loc7_11.1 // CHECK:STDOUT: %.loc7_11.2: ref %A = temporary %.loc7_11.1, %F.call.loc7 -// CHECK:STDOUT: %Other.ref.loc10: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %NS1.ref: = name_ref NS1, imports.%NS1 [template = imports.%NS1] -// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%import_ref.5 [template = constants.%A] // CHECK:STDOUT: %a.var: ref %A = var a // CHECK:STDOUT: %a: ref %A = bind_name a, %a.var // CHECK:STDOUT: %a.ref: ref %A = name_ref a, %a diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index cfdbc63cb028..8af56b402af6 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.carbon @@ -79,8 +79,8 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -98,8 +98,6 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: if %true br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// 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: %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] diff --git a/toolchain/check/testdata/operators/builtin/and.carbon b/toolchain/check/testdata/operators/builtin/and.carbon index bb106a5dc638..7ac74c04caa5 100644 --- a/toolchain/check/testdata/operators/builtin/and.carbon +++ b/toolchain/check/testdata/operators/builtin/and.carbon @@ -100,10 +100,12 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %x.patt: bool = binding_pattern x // CHECK:STDOUT: %x.param_patt: bool = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] -// CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type.loc25, %.loc25_23.1 [template = bool] // CHECK:STDOUT: %x.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc25_23.3: type = splice_block %.loc25_23.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type, %.loc25_23.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: bool = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -143,122 +145,22 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true.loc19_13: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %false.loc19: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %true.loc19_13 br !and.rhs.loc19 else br !and.result.loc19(%false.loc19) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.rhs.loc19: -// CHECK:STDOUT: %true.loc19_22: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: br !and.result.loc19(%true.loc19_22) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.result.loc19: -// CHECK:STDOUT: %.loc19_18: bool = block_arg !and.result.loc19 [template = constants.%true] -// CHECK:STDOUT: if %.loc19_18 br !if.expr.then.loc19 else br !if.expr.else.loc19 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc19: -// CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc19_32.1: type = value_of_initializer %bool.make_type.loc19 [template = bool] -// CHECK:STDOUT: %.loc19_32.2: type = converted %bool.make_type.loc19, %.loc19_32.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_32.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc19: -// CHECK:STDOUT: %.loc19_43: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc19_37: type = converted %.loc19_43, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_37) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc19: -// CHECK:STDOUT: %.loc19_10: type = block_arg !if.expr.result.loc19 [template = bool] // CHECK:STDOUT: %a.var: ref bool = var a // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %true.loc19_47: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: assign %a.var, %true.loc19_47 -// CHECK:STDOUT: %true.loc20: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %false.loc20_18: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %true.loc20 br !and.rhs.loc20 else br !and.result.loc20(%false.loc20_18) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.rhs.loc20: -// CHECK:STDOUT: %false.loc20_22: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: br !and.result.loc20(%false.loc20_22) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.result.loc20: -// CHECK:STDOUT: %.loc20_18: bool = block_arg !and.result.loc20 [template = constants.%false] -// CHECK:STDOUT: if %.loc20_18 br !if.expr.then.loc20 else br !if.expr.else.loc20 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc20: -// CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc20_33.1: type = value_of_initializer %bool.make_type.loc20 [template = bool] -// CHECK:STDOUT: %.loc20_33.2: type = converted %bool.make_type.loc20, %.loc20_33.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_33.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc20: -// CHECK:STDOUT: %.loc20_44: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc20_38: type = converted %.loc20_44, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_38) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc20: -// CHECK:STDOUT: %.loc20_10: type = block_arg !if.expr.result.loc20 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %a.var, %true // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var // CHECK:STDOUT: %.loc20_49.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc20_49.2: init %empty_tuple.type = tuple_init () to %b.var [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc20_50: init %empty_tuple.type = converted %.loc20_49.1, %.loc20_49.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %b.var, %.loc20_50 -// CHECK:STDOUT: %false.loc21_13: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %false.loc21_19: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %false.loc21_13 br !and.rhs.loc21 else br !and.result.loc21(%false.loc21_19) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.rhs.loc21: -// CHECK:STDOUT: %true.loc21: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: br !and.result.loc21(%true.loc21) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.result.loc21: -// CHECK:STDOUT: %.loc21_19: bool = block_arg !and.result.loc21 [template = constants.%false] -// CHECK:STDOUT: if %.loc21_19 br !if.expr.then.loc21 else br !if.expr.else.loc21 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc21: -// CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc21_33.1: type = value_of_initializer %bool.make_type.loc21 [template = bool] -// CHECK:STDOUT: %.loc21_33.2: type = converted %bool.make_type.loc21, %.loc21_33.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_33.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc21: -// CHECK:STDOUT: %.loc21_44: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc21_38: type = converted %.loc21_44, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_38) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc21: -// CHECK:STDOUT: %.loc21_10: type = block_arg !if.expr.result.loc21 [template = constants.%empty_tuple.type] // CHECK:STDOUT: %c.var: ref %empty_tuple.type = var c // CHECK:STDOUT: %c: ref %empty_tuple.type = bind_name c, %c.var // CHECK:STDOUT: %.loc21_49.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc21_49.2: init %empty_tuple.type = tuple_init () to %c.var [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc21_50: init %empty_tuple.type = converted %.loc21_49.1, %.loc21_49.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %c.var, %.loc21_50 -// CHECK:STDOUT: %false.loc22_13: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %false.loc22_19: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %false.loc22_13 br !and.rhs.loc22 else br !and.result.loc22(%false.loc22_19) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.rhs.loc22: -// CHECK:STDOUT: %false.loc22_23: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: br !and.result.loc22(%false.loc22_23) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.result.loc22: -// CHECK:STDOUT: %.loc22_19: bool = block_arg !and.result.loc22 [template = constants.%false] -// CHECK:STDOUT: if %.loc22_19 br !if.expr.then.loc22 else br !if.expr.else.loc22 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc22: -// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc22_34.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] -// CHECK:STDOUT: %.loc22_34.2: type = converted %bool.make_type.loc22, %.loc22_34.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_34.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc22: -// CHECK:STDOUT: %.loc22_45: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc22_39: type = converted %.loc22_45, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_39) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc22: -// CHECK:STDOUT: %.loc22_10: type = block_arg !if.expr.result.loc22 [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var // CHECK:STDOUT: %.loc22_50.1: %empty_tuple.type = tuple_literal () @@ -270,31 +172,6 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %false.loc26_13: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %false.loc26_19: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %false.loc26_13 br !and.rhs else br !and.result(%false.loc26_19) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.rhs: -// CHECK:STDOUT: %x.ref: bool = name_ref x, %x -// CHECK:STDOUT: br !and.result(%x.ref) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc26_19: bool = block_arg !and.result [template = constants.%false] -// CHECK:STDOUT: if %.loc26_19 br !if.expr.then else br !if.expr.else -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %bool.make_type.loc26: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc26_30.1: type = value_of_initializer %bool.make_type.loc26 [template = bool] -// CHECK:STDOUT: %.loc26_30.2: type = converted %bool.make_type.loc26, %.loc26_30.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result(%.loc26_30.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %.loc26_41: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc26_35: type = converted %.loc26_41, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result(%.loc26_35) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc26_10: type = block_arg !if.expr.result [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %.loc26_46.1: %empty_tuple.type = tuple_literal () diff --git a/toolchain/check/testdata/operators/builtin/assignment.carbon b/toolchain/check/testdata/operators/builtin/assignment.carbon index f2c05f532719..fb8fb537d383 100644 --- a/toolchain/check/testdata/operators/builtin/assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/assignment.carbon @@ -45,7 +45,6 @@ fn Main() { // CHECK:STDOUT: %Convert.bound.2: = bound_method %int_9.1, %Convert.10 [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.1: type = tuple_type (type, type) [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] @@ -101,8 +100,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// 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: %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] @@ -120,12 +117,6 @@ fn Main() { // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_9) [template = constants.%int_9.2] // CHECK:STDOUT: %.loc13: init %i32 = converted %int_9, %int.convert_checked.loc13 [template = constants.%int_9.2] // CHECK:STDOUT: assign %a.ref.loc13, %.loc13 -// CHECK:STDOUT: %int_32.loc15_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc15_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_19.1: %tuple.type.1 = tuple_literal (%i32.loc15_11, %i32.loc15_16) -// CHECK:STDOUT: %.loc15_19.2: type = converted %.loc15_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] @@ -168,11 +159,6 @@ fn Main() { // CHECK:STDOUT: %int.convert_checked.loc17: init %i32 = call %Convert.specific_fn.loc17(%int_4.loc17) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc17: init %i32 = converted %int_4.loc17, %int.convert_checked.loc17 [template = constants.%int_4.2] // CHECK:STDOUT: assign %tuple.elem1.loc17, %.loc17 -// CHECK:STDOUT: %int_32.loc19_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc19_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc19_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %c.var: ref %struct_type.a.b.1 = var c // CHECK:STDOUT: %c: ref %struct_type.a.b.1 = bind_name c, %c.var // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] @@ -213,9 +199,6 @@ fn Main() { // CHECK:STDOUT: %int.convert_checked.loc21: init %i32 = call %Convert.specific_fn.loc21(%int_4.loc21) [template = constants.%int_4.2] // CHECK:STDOUT: %.loc21_7: init %i32 = converted %int_4.loc21, %int.convert_checked.loc21 [template = constants.%int_4.2] // CHECK:STDOUT: assign %.loc21_4, %.loc21_7 -// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.3] // CHECK:STDOUT: %p.var: ref %ptr.3 = var p // CHECK:STDOUT: %p: ref %ptr.3 = bind_name p, %p.var // CHECK:STDOUT: %a.ref.loc23: ref %i32 = name_ref a, %a diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index f04d66dcdb0d..2dca60c5f1ab 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -14,59 +14,118 @@ fn F(b: bool) -> type { } // TODO: Short-circuit operators should be permitted outside functions. -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+12]]:11: error: cannot evaluate type expression [TypeExprEvaluationFailure] +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+8]]:11: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var and_: F(true and true); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+8]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] -// CHECK:STDERR: var and_: F(true and true); -// CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: // CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+4]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var and_: F(true and true); // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: var and_: F(true and true); -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+11]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+12]]:21: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var and_val: bool = true and true; +// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+8]]:21: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var and_val: bool = true and true; +// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+4]]:21: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var and_val: bool = true and true; +// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: +var and_val: bool = true and true; + +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+8]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var or_: F(true or true); // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+7]]:12: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] -// CHECK:STDERR: var or_: F(true or true); -// CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+3]]:12: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+4]]:12: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var or_: F(true or true); // CHECK:STDERR: ^~~~~~~~~~~~ +// CHECK:STDERR: var or_: F(true or true); +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+11]]:20: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var or_val: bool = true or true; +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+7]]:20: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var or_val: bool = true or true; +// CHECK:STDERR: ^~~~~~~~~~~~ +// CHECK:STDERR: +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+3]]:20: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var or_val: bool = true or true; +// CHECK:STDERR: ^~~~~~~~~~~~ +var or_val: bool = true or true; + // CHECK:STDOUT: --- fail_and_or_not_in_function.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { +// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] +// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] +// CHECK:STDOUT: %F.type: type = fn_type @F [template] +// CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] +// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { +// CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { +// CHECK:STDOUT: .Bool = %import_ref.1 +// CHECK:STDOUT: .Int = %import_ref.2 +// CHECK:STDOUT: .Float = %import_ref.6 +// CHECK:STDOUT: import Core//prelude +// CHECK:STDOUT: import Core//prelude/... +// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { -// CHECK:STDOUT: %.loc42_17: bool = block_arg [template = constants.%true] -// CHECK:STDOUT: %F.call: init type = call .inst96.loc42_10(%.loc42_17) -// CHECK:STDOUT: %.loc42_24.1: type = value_of_initializer %F.call -// CHECK:STDOUT: %.loc42_24.2: type = converted %F.call, %.loc42_24.1 +// CHECK:STDOUT: package: = namespace [template] { +// CHECK:STDOUT: .Core = imports.%Core +// CHECK:STDOUT: .F = %F.decl +// CHECK:STDOUT: .and_ = %and_ +// CHECK:STDOUT: .and_val = %and_val +// CHECK:STDOUT: .or_ = %or_ +// CHECK:STDOUT: .or_val = %or_val +// CHECK:STDOUT: } +// CHECK:STDOUT: %Core.import = import Core +// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { +// CHECK:STDOUT: %b.patt: bool = binding_pattern b +// CHECK:STDOUT: %b.param_patt: bool = value_param_pattern %b.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: type = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: } { +// CHECK:STDOUT: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc12_9.3: type = splice_block %.loc12_9.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc12_9.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc12_9.2: type = converted %bool.make_type, %.loc12_9.1 [template = bool] +// CHECK:STDOUT: } +// CHECK:STDOUT: %b: bool = bind_name b, %b.param +// CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 +// CHECK:STDOUT: %return: ref type = return_slot %return.param +// CHECK:STDOUT: } +// CHECK:STDOUT: %and_.var: ref = var and_ +// CHECK:STDOUT: %and_: ref = bind_name and_, %and_.var +// CHECK:STDOUT: %and_val.var: ref bool = var and_val +// CHECK:STDOUT: %and_val: ref bool = bind_name and_val, %and_val.var // CHECK:STDOUT: %or_.var: ref = var or_ // CHECK:STDOUT: %or_: ref = bind_name or_, %or_.var +// CHECK:STDOUT: %or_val.var: ref bool = var or_val +// CHECK:STDOUT: %or_val: ref bool = bind_name or_val, %or_val.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F(%b.param_patt: bool) -> type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %b.ref: bool = name_ref b, .inst25.loc12_6 +// CHECK:STDOUT: %b.ref: bool = name_ref b, %b // CHECK:STDOUT: if %b.ref br !if.expr.then else br !if.expr.else // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.then: @@ -86,3 +145,10 @@ var or_: F(true or true); // CHECK:STDOUT: return %.loc13_10 // CHECK:STDOUT: } // CHECK:STDOUT: +// CHECK:STDOUT: fn @__global_init() { +// CHECK:STDOUT: !entry: +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] +// CHECK:STDOUT: if %true br !and.rhs else br !and.result(%false) +// CHECK:STDOUT: } +// CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon index 43de5e48f3d3..5eee9a9a1f01 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon @@ -47,12 +47,9 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [template] -// CHECK:STDOUT: %true: bool = bool_literal true [template] -// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -73,69 +70,20 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %x.patt: bool = binding_pattern x // CHECK:STDOUT: %x.param_patt: bool = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc4: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc4_23.1: type = value_of_initializer %bool.make_type.loc4 [template = bool] -// CHECK:STDOUT: %.loc4_23.2: type = converted %bool.make_type.loc4, %.loc4_23.1 [template = bool] // CHECK:STDOUT: %x.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_23.3: type = splice_block %.loc4_23.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc4_23.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc4_23.2: type = converted %bool.make_type, %.loc4_23.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: bool = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true.loc9: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %false.loc9: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %true.loc9 br !and.rhs else br !and.result(%false.loc9) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.rhs: -// CHECK:STDOUT: %x.ref.loc9: bool = name_ref x, %x -// CHECK:STDOUT: br !and.result(%x.ref.loc9) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc9_18: bool = block_arg !and.result -// CHECK:STDOUT: if %.loc9_18 br !if.expr.then.loc9 else br !if.expr.else.loc9 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc9: -// CHECK:STDOUT: %bool.make_type.loc9: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc9_29.1: type = value_of_initializer %bool.make_type.loc9 [template = bool] -// CHECK:STDOUT: %.loc9_29.2: type = converted %bool.make_type.loc9, %.loc9_29.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc9(%.loc9_29.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc9: -// CHECK:STDOUT: %.loc9_40: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_34: type = converted %.loc9_40, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc9(%.loc9_34) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc9: -// CHECK:STDOUT: %.loc9_10: type = block_arg !if.expr.result.loc9 // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var -// CHECK:STDOUT: %false.loc14: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %.loc14_19.1: bool = not %false.loc14 [template = constants.%true] -// CHECK:STDOUT: %true.loc14: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %.loc14_19.1 br !or.rhs else br !or.result(%true.loc14) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.rhs: -// CHECK:STDOUT: %x.ref.loc14: bool = name_ref x, %x -// CHECK:STDOUT: br !or.result(%x.ref.loc14) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.result: -// CHECK:STDOUT: %.loc14_19.2: bool = block_arg !or.result -// CHECK:STDOUT: if %.loc14_19.2 br !if.expr.then.loc14 else br !if.expr.else.loc14 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc14: -// CHECK:STDOUT: %bool.make_type.loc14: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc14_29.1: type = value_of_initializer %bool.make_type.loc14 [template = bool] -// CHECK:STDOUT: %.loc14_29.2: type = converted %bool.make_type.loc14, %.loc14_29.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc14(%.loc14_29.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc14: -// CHECK:STDOUT: %.loc14_40: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_34: type = converted %.loc14_40, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc14(%.loc14_34) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc14: -// CHECK:STDOUT: %.loc14_10: type = block_arg !if.expr.result.loc14 // CHECK:STDOUT: %b.var: ref = var b // CHECK:STDOUT: %b: ref = bind_name b, %b.var // CHECK:STDOUT: return @@ -145,12 +93,9 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %KnownValueButNonConstantCondition.type: type = fn_type @KnownValueButNonConstantCondition [template] // CHECK:STDOUT: %KnownValueButNonConstantCondition: %KnownValueButNonConstantCondition.type = struct_value () [template] -// CHECK:STDOUT: %false: bool = bool_literal false [template] -// CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -171,69 +116,20 @@ fn KnownValueButNonConstantCondition(x: bool) { // CHECK:STDOUT: %x.patt: bool = binding_pattern x // CHECK:STDOUT: %x.param_patt: bool = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc4: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc4_41.1: type = value_of_initializer %bool.make_type.loc4 [template = bool] -// CHECK:STDOUT: %.loc4_41.2: type = converted %bool.make_type.loc4, %.loc4_41.1 [template = bool] // CHECK:STDOUT: %x.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_41.3: type = splice_block %.loc4_41.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc4_41.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc4_41.2: type = converted %bool.make_type, %.loc4_41.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: bool = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @KnownValueButNonConstantCondition(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %x.ref.loc11: bool = name_ref x, %x -// CHECK:STDOUT: %false.loc11_15: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: if %x.ref.loc11 br !and.rhs else br !and.result(%false.loc11_15) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.rhs: -// CHECK:STDOUT: %false.loc11_19: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: br !and.result(%false.loc11_19) -// CHECK:STDOUT: -// CHECK:STDOUT: !and.result: -// CHECK:STDOUT: %.loc11_15: bool = block_arg !and.result -// CHECK:STDOUT: if %.loc11_15 br !if.expr.then.loc11 else br !if.expr.else.loc11 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc11: -// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %bool.make_type.loc11 [template = bool] -// CHECK:STDOUT: %.loc11_30.2: type = converted %bool.make_type.loc11, %.loc11_30.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc11(%.loc11_30.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc11: -// CHECK:STDOUT: %.loc11_41: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_35: type = converted %.loc11_41, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc11(%.loc11_35) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc11: -// CHECK:STDOUT: %.loc11_10: type = block_arg !if.expr.result.loc11 // CHECK:STDOUT: %c.var: ref = var c // CHECK:STDOUT: %c: ref = bind_name c, %c.var -// CHECK:STDOUT: %x.ref.loc15: bool = name_ref x, %x -// CHECK:STDOUT: %.loc15_15.1: bool = not %x.ref.loc15 -// CHECK:STDOUT: %true.loc15_15: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %.loc15_15.1 br !or.rhs else br !or.result(%true.loc15_15) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.rhs: -// CHECK:STDOUT: %true.loc15_18: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: br !or.result(%true.loc15_18) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.result: -// CHECK:STDOUT: %.loc15_15.2: bool = block_arg !or.result -// CHECK:STDOUT: if %.loc15_15.2 br !if.expr.then.loc15 else br !if.expr.else.loc15 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc15: -// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc15_28.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] -// CHECK:STDOUT: %.loc15_28.2: type = converted %bool.make_type.loc15, %.loc15_28.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc15(%.loc15_28.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc15: -// CHECK:STDOUT: %.loc15_39: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_33: type = converted %.loc15_39, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc15(%.loc15_33) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc15: -// CHECK:STDOUT: %.loc15_10: type = block_arg !if.expr.result.loc15 // CHECK:STDOUT: %d.var: ref = var d // CHECK:STDOUT: %d: ref = bind_name d, %d.var // CHECK:STDOUT: return 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 19720122b217..a91245aab83f 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 @@ -161,8 +161,6 @@ fn Main() { // CHECK:STDOUT: assign %.loc28_8.1, %.loc28_10 // CHECK:STDOUT: %tuple.loc28: %tuple.type.1 = tuple_value (%int_1.loc28, %int_2.loc28) [template = constants.%tuple.2] // CHECK:STDOUT: %.loc28_8.2: %tuple.type.1 = converted %.loc28_8.1, %tuple.loc28 [template = constants.%tuple.2] -// CHECK:STDOUT: %int_32.loc29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%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] @@ -254,8 +252,6 @@ fn Main() { // CHECK:STDOUT: %int.convert_checked.loc49_27: init %i32 = call %Convert.specific_fn.loc49_27(%int_3.loc49) [template = constants.%int_3.2] // CHECK:STDOUT: %.loc49_27: init %i32 = converted %int_3.loc49, %int.convert_checked.loc49_27 [template = constants.%int_3.2] // CHECK:STDOUT: assign %.loc49_4, %.loc49_27 -// CHECK:STDOUT: %int_32.loc52: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc52: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: %true.loc56: bool = bool_literal true [template = constants.%true] 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 0e3d3719ed03..fc4f450b741c 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -88,8 +88,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// 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: %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] diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index 164949a70fa3..a62abe86e1b3 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -23,8 +23,6 @@ fn Main() { // CHECK:STDOUT: constants { // CHECK:STDOUT: %Main.type: type = fn_type @Main [template] // CHECK:STDOUT: %Main: %Main.type = struct_value () [template] -// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -48,9 +46,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc18_10.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc18_10.2: type = converted %bool.make_type, %.loc18_10.1 [template = bool] // CHECK:STDOUT: %x.var: ref bool = var x // CHECK:STDOUT: %x: ref bool = bind_name x, %x.var // CHECK:STDOUT: %int_12: Core.IntLiteral = int_value 12 [template = constants.%int_12] 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 2e3fecb0fe40..e64cc7adef81 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -57,8 +57,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// 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: %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] diff --git a/toolchain/check/testdata/operators/builtin/or.carbon b/toolchain/check/testdata/operators/builtin/or.carbon index af800fc39562..a6348a38655a 100644 --- a/toolchain/check/testdata/operators/builtin/or.carbon +++ b/toolchain/check/testdata/operators/builtin/or.carbon @@ -41,7 +41,6 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %Or: %Or.type = struct_value () [template] // CHECK:STDOUT: %Constant.type: type = fn_type @Constant [template] // CHECK:STDOUT: %Constant: %Constant.type = struct_value () [template] -// CHECK:STDOUT: %false: bool = bool_literal false [template] // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [template] // CHECK:STDOUT: %PartialConstant.type: type = fn_type @PartialConstant [template] // CHECK:STDOUT: %PartialConstant: %PartialConstant.type = struct_value () [template] @@ -100,10 +99,12 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: %x.patt: bool = binding_pattern x // CHECK:STDOUT: %x.param_patt: bool = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc25: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type.loc25 [template = bool] -// CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type.loc25, %.loc25_23.1 [template = bool] // CHECK:STDOUT: %x.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc25_23.3: type = splice_block %.loc25_23.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc25_23.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc25_23.2: type = converted %bool.make_type, %.loc25_23.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: bool = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -144,122 +145,18 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true.loc19_13: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %.loc19_18.1: bool = not %true.loc19_13 [template = constants.%false] -// CHECK:STDOUT: %true.loc19_18: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %.loc19_18.1 br !or.rhs.loc19 else br !or.result.loc19(%true.loc19_18) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.rhs.loc19: -// CHECK:STDOUT: %true.loc19_21: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: br !or.result.loc19(%true.loc19_21) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.result.loc19: -// CHECK:STDOUT: %.loc19_18.2: bool = block_arg !or.result.loc19 [template = constants.%true] -// CHECK:STDOUT: if %.loc19_18.2 br !if.expr.then.loc19 else br !if.expr.else.loc19 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc19: -// CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc19_31.1: type = value_of_initializer %bool.make_type.loc19 [template = bool] -// CHECK:STDOUT: %.loc19_31.2: type = converted %bool.make_type.loc19, %.loc19_31.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_31.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc19: -// CHECK:STDOUT: %.loc19_42: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc19_36: type = converted %.loc19_42, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_36) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc19: -// CHECK:STDOUT: %.loc19_10: type = block_arg !if.expr.result.loc19 [template = bool] // CHECK:STDOUT: %a.var: ref bool = var a // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %true.loc19_46: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: assign %a.var, %true.loc19_46 -// CHECK:STDOUT: %true.loc20_13: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %.loc20_18.1: bool = not %true.loc20_13 [template = constants.%false] -// CHECK:STDOUT: %true.loc20_18: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %.loc20_18.1 br !or.rhs.loc20 else br !or.result.loc20(%true.loc20_18) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.rhs.loc20: -// CHECK:STDOUT: %false.loc20: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: br !or.result.loc20(%false.loc20) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.result.loc20: -// CHECK:STDOUT: %.loc20_18.2: bool = block_arg !or.result.loc20 [template = constants.%true] -// CHECK:STDOUT: if %.loc20_18.2 br !if.expr.then.loc20 else br !if.expr.else.loc20 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc20: -// CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc20_32.1: type = value_of_initializer %bool.make_type.loc20 [template = bool] -// CHECK:STDOUT: %.loc20_32.2: type = converted %bool.make_type.loc20, %.loc20_32.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_32.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc20: -// CHECK:STDOUT: %.loc20_43: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc20_37: type = converted %.loc20_43, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_37) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc20: -// CHECK:STDOUT: %.loc20_10: type = block_arg !if.expr.result.loc20 [template = bool] +// CHECK:STDOUT: %true.loc19: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %a.var, %true.loc19 // CHECK:STDOUT: %b.var: ref bool = var b // CHECK:STDOUT: %b: ref bool = bind_name b, %b.var -// CHECK:STDOUT: %true.loc20_47: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: assign %b.var, %true.loc20_47 -// CHECK:STDOUT: %false.loc21: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %.loc21_19.1: bool = not %false.loc21 [template = constants.%true] -// CHECK:STDOUT: %true.loc21_19: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %.loc21_19.1 br !or.rhs.loc21 else br !or.result.loc21(%true.loc21_19) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.rhs.loc21: -// CHECK:STDOUT: %true.loc21_22: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: br !or.result.loc21(%true.loc21_22) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.result.loc21: -// CHECK:STDOUT: %.loc21_19.2: bool = block_arg !or.result.loc21 [template = constants.%true] -// CHECK:STDOUT: if %.loc21_19.2 br !if.expr.then.loc21 else br !if.expr.else.loc21 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc21: -// CHECK:STDOUT: %bool.make_type.loc21: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc21_32.1: type = value_of_initializer %bool.make_type.loc21 [template = bool] -// CHECK:STDOUT: %.loc21_32.2: type = converted %bool.make_type.loc21, %.loc21_32.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_32.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc21: -// CHECK:STDOUT: %.loc21_43: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc21_37: type = converted %.loc21_43, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc21(%.loc21_37) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc21: -// CHECK:STDOUT: %.loc21_10: type = block_arg !if.expr.result.loc21 [template = bool] +// CHECK:STDOUT: %true.loc20: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %b.var, %true.loc20 // CHECK:STDOUT: %c.var: ref bool = var c // CHECK:STDOUT: %c: ref bool = bind_name c, %c.var -// CHECK:STDOUT: %true.loc21_47: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: assign %c.var, %true.loc21_47 -// CHECK:STDOUT: %false.loc22_13: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %.loc22_19.1: bool = not %false.loc22_13 [template = constants.%true] -// CHECK:STDOUT: %true.loc22: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %.loc22_19.1 br !or.rhs.loc22 else br !or.result.loc22(%true.loc22) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.rhs.loc22: -// CHECK:STDOUT: %false.loc22_22: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: br !or.result.loc22(%false.loc22_22) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.result.loc22: -// CHECK:STDOUT: %.loc22_19.2: bool = block_arg !or.result.loc22 [template = constants.%false] -// CHECK:STDOUT: if %.loc22_19.2 br !if.expr.then.loc22 else br !if.expr.else.loc22 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc22: -// CHECK:STDOUT: %bool.make_type.loc22: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc22_33.1: type = value_of_initializer %bool.make_type.loc22 [template = bool] -// CHECK:STDOUT: %.loc22_33.2: type = converted %bool.make_type.loc22, %.loc22_33.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_33.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc22: -// CHECK:STDOUT: %.loc22_44: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc22_38: type = converted %.loc22_44, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc22(%.loc22_38) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc22: -// CHECK:STDOUT: %.loc22_10: type = block_arg !if.expr.result.loc22 [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %true.loc21: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %c.var, %true.loc21 // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var // CHECK:STDOUT: %.loc22_49.1: %empty_tuple.type = tuple_literal () @@ -271,36 +168,10 @@ fn PartialConstant(x: bool) { // CHECK:STDOUT: // CHECK:STDOUT: fn @PartialConstant(%x.param_patt: bool) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true.loc26_13: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %.loc26_18.1: bool = not %true.loc26_13 [template = constants.%false] -// CHECK:STDOUT: %true.loc26_18: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: if %.loc26_18.1 br !or.rhs else br !or.result(%true.loc26_18) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.rhs: -// CHECK:STDOUT: %x.ref: bool = name_ref x, %x -// CHECK:STDOUT: br !or.result(%x.ref) -// CHECK:STDOUT: -// CHECK:STDOUT: !or.result: -// CHECK:STDOUT: %.loc26_18.2: bool = block_arg !or.result [template = constants.%true] -// CHECK:STDOUT: if %.loc26_18.2 br !if.expr.then else br !if.expr.else -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then: -// CHECK:STDOUT: %bool.make_type.loc26: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc26_28.1: type = value_of_initializer %bool.make_type.loc26 [template = bool] -// CHECK:STDOUT: %.loc26_28.2: type = converted %bool.make_type.loc26, %.loc26_28.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result(%.loc26_28.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %.loc26_39: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc26_33: type = converted %.loc26_39, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result(%.loc26_33) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result: -// CHECK:STDOUT: %.loc26_10: type = block_arg !if.expr.result [template = bool] // CHECK:STDOUT: %a.var: ref bool = var a // CHECK:STDOUT: %a: ref bool = bind_name a, %a.var -// CHECK:STDOUT: %true.loc26_43: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: assign %a.var, %true.loc26_43 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %a.var, %true // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/builtin/unary_op.carbon b/toolchain/check/testdata/operators/builtin/unary_op.carbon index dfc80f429fd5..21095c0a4167 100644 --- a/toolchain/check/testdata/operators/builtin/unary_op.carbon +++ b/toolchain/check/testdata/operators/builtin/unary_op.carbon @@ -58,23 +58,19 @@ fn Constant() { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type.loc11_11: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11_11 [template = bool] -// CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11_11, %.loc11_11.1 [template = bool] // CHECK:STDOUT: %bool.make_type.loc11_20: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_20.1: type = value_of_initializer %bool.make_type.loc11_20 [template = bool] // CHECK:STDOUT: %.loc11_20.2: type = converted %bool.make_type.loc11_20, %.loc11_20.1 [template = bool] // CHECK:STDOUT: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_11.3: type = splice_block %.loc11_11.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type.loc11_11: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_11.1: type = value_of_initializer %bool.make_type.loc11_11 [template = bool] +// CHECK:STDOUT: %.loc11_11.2: type = converted %bool.make_type.loc11_11, %.loc11_11.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param1 // CHECK:STDOUT: %return: ref bool = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %bool.make_type.loc15: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %bool.make_type.loc15 [template = bool] -// CHECK:STDOUT: %.loc15_15.2: type = converted %bool.make_type.loc15, %.loc15_15.1 [template = bool] -// CHECK:STDOUT: %bool.make_type.loc16: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc16_16.1: type = value_of_initializer %bool.make_type.loc16 [template = bool] -// CHECK:STDOUT: %.loc16_16.2: type = converted %bool.make_type.loc16, %.loc16_16.1 [template = bool] // CHECK:STDOUT: %Constant.decl: %Constant.type = fn_decl @Constant [template = constants.%Constant] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: @@ -87,50 +83,16 @@ fn Constant() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Constant() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %true.loc19: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: %.loc19_13: bool = not %true.loc19 [template = constants.%false] -// CHECK:STDOUT: if %.loc19_13 br !if.expr.then.loc19 else br !if.expr.else.loc19 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc19: -// CHECK:STDOUT: %bool.make_type.loc19: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc19_27.1: type = value_of_initializer %bool.make_type.loc19 [template = bool] -// CHECK:STDOUT: %.loc19_27.2: type = converted %bool.make_type.loc19, %.loc19_27.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_27.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc19: -// CHECK:STDOUT: %.loc19_38: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc19_32: type = converted %.loc19_38, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc19(%.loc19_32) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc19: -// CHECK:STDOUT: %.loc19_10: type = block_arg !if.expr.result.loc19 [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: %.loc19_43.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc19_43.2: init %empty_tuple.type = tuple_init () to %a.var [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc19_44: init %empty_tuple.type = converted %.loc19_43.1, %.loc19_43.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %a.var, %.loc19_44 -// CHECK:STDOUT: %false: bool = bool_literal false [template = constants.%false] -// CHECK:STDOUT: %.loc20_13: bool = not %false [template = constants.%true] -// CHECK:STDOUT: if %.loc20_13 br !if.expr.then.loc20 else br !if.expr.else.loc20 -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.then.loc20: -// CHECK:STDOUT: %bool.make_type.loc20: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc20_28.1: type = value_of_initializer %bool.make_type.loc20 [template = bool] -// CHECK:STDOUT: %.loc20_28.2: type = converted %bool.make_type.loc20, %.loc20_28.1 [template = bool] -// CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_28.2) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.else.loc20: -// CHECK:STDOUT: %.loc20_39: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc20_33: type = converted %.loc20_39, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: br !if.expr.result.loc20(%.loc20_33) -// CHECK:STDOUT: -// CHECK:STDOUT: !if.expr.result.loc20: -// CHECK:STDOUT: %.loc20_10: type = block_arg !if.expr.result.loc20 [template = bool] // CHECK:STDOUT: %b.var: ref bool = var b // CHECK:STDOUT: %b: ref bool = bind_name b, %b.var -// CHECK:STDOUT: %true.loc20: bool = bool_literal true [template = constants.%true] -// CHECK:STDOUT: assign %b.var, %true.loc20 +// CHECK:STDOUT: %true: bool = bool_literal true [template = constants.%true] +// CHECK:STDOUT: assign %b.var, %true // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/add.carbon b/toolchain/check/testdata/operators/overloaded/add.carbon index 210a583a1bbf..3396ecffec9e 100644 --- a/toolchain/check/testdata/operators/overloaded/add.carbon +++ b/toolchain/check/testdata/operators/overloaded/add.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/bit_and.carbon b/toolchain/check/testdata/operators/overloaded/bit_and.carbon index 658d89f5cc9d..e56b393ac927 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_and.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_and.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon index ccd42c22a5f0..cbacbb9dcdd8 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_complement.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_complement.carbon @@ -68,9 +68,9 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -84,9 +84,9 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param diff --git a/toolchain/check/testdata/operators/overloaded/bit_or.carbon b/toolchain/check/testdata/operators/overloaded/bit_or.carbon index b965a282d036..94fce897edd4 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_or.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_or.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon index b27d98183aa5..327a6732341d 100644 --- a/toolchain/check/testdata/operators/overloaded/bit_xor.carbon +++ b/toolchain/check/testdata/operators/overloaded/bit_xor.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/dec.carbon b/toolchain/check/testdata/operators/overloaded/dec.carbon index 8d3048c5f1c1..c15f13ed4519 100644 --- a/toolchain/check/testdata/operators/overloaded/dec.carbon +++ b/toolchain/check/testdata/operators/overloaded/dec.carbon @@ -70,11 +70,13 @@ fn TestOp() { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc18: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc18_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_21: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface] @@ -96,7 +98,6 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %.loc22_15.1: %empty_struct_type = struct_literal () diff --git a/toolchain/check/testdata/operators/overloaded/div.carbon b/toolchain/check/testdata/operators/overloaded/div.carbon index d55dc3c3387b..ef5167fd2bd1 100644 --- a/toolchain/check/testdata/operators/overloaded/div.carbon +++ b/toolchain/check/testdata/operators/overloaded/div.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index aba611ffadae..bc531ae1a361 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -136,14 +136,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc11_17: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc11_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc11_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc11_29.2: type = converted %bool.make_type, %.loc11_29.1 [template = bool] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc11_17: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc11_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -156,14 +156,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc15_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc15_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc15_32.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc15_32.2: type = converted %bool.make_type, %.loc15_32.1 [template = bool] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc15_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc15_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -179,14 +179,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc7_28: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc7_34.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc7_34.2: type = converted %bool.make_type, %.loc7_34.1 [template = bool] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc7_18: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc7_28: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -199,14 +199,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc8_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc8_37.2: type = converted %bool.make_type, %.loc8_37.1 [template = bool] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc8_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -295,14 +295,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc6_17: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.ref.loc6_23: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc6_29.2: type = converted %bool.make_type, %.loc6_29.1 [template = bool] // CHECK:STDOUT: %a.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %D.ref.loc6_17: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %a: %D = bind_name a, %a.param // CHECK:STDOUT: %b.param: %D = value_param runtime_param1 +// CHECK:STDOUT: %D.ref.loc6_23: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b: %D = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -315,14 +315,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc14_20: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.ref.loc14_26: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_32.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_32.2: type = converted %bool.make_type, %.loc14_32.1 [template = bool] // CHECK:STDOUT: %a.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %D.ref.loc14_20: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %a: %D = bind_name a, %a.param // CHECK:STDOUT: %b.param: %D = value_param runtime_param1 +// CHECK:STDOUT: %D.ref.loc14_26: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b: %D = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -408,14 +408,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc12_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc12_30.2: type = converted %bool.make_type, %.loc12_30.1 [template = bool] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %D = value_param runtime_param1 +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b: %D = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -428,14 +428,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc26_30.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc26_30.2: type = converted %bool.make_type, %.loc26_30.1 [template = bool] // CHECK:STDOUT: %a.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %a: %D = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -451,14 +451,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_34.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc8_34.2: type = converted %bool.make_type, %.loc8_34.1 [template = bool] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc8_18: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -471,14 +471,14 @@ fn TestLhsBad(a: D, b: C) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc9_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc9_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc9_37.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc9_37.2: type = converted %bool.make_type, %.loc9_37.1 [template = bool] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc9_21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc9_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon index 32cb5bd17ee3..46b82d2a497a 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -98,8 +98,8 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %a.patt: %C = binding_pattern a // CHECK:STDOUT: %a.param_patt: %C = value_param_pattern %a.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: } // CHECK:STDOUT: %TestAddAssignNonRef.decl: %TestAddAssignNonRef.type = fn_decl @TestAddAssignNonRef [template = constants.%TestAddAssignNonRef] { @@ -108,11 +108,11 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc33_27: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc33_33: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc33_27: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc33_33: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -121,11 +121,13 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc16: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc16_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_21: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.1] @@ -139,16 +141,18 @@ fn TestAddAssignNonRef(a: C, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc19: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc19_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc19_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] -// CHECK:STDOUT: %C.ref.loc19_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc19_21: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %C.ref.loc19_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc19_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index f76473272923..361503889b22 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -83,9 +83,9 @@ fn TestRef(b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc15_17: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc15_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc15_17: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -98,12 +98,12 @@ fn TestRef(b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc23_24: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc23_30: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc23_18: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_24: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -112,8 +112,8 @@ fn TestRef(b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -141,7 +141,6 @@ fn TestRef(b: C) { // CHECK:STDOUT: // CHECK:STDOUT: fn @TestRef(%b.param_patt: %C) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc32: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.var: ref %C = var a // CHECK:STDOUT: %a: ref %C = bind_name a, %a.var // CHECK:STDOUT: %.loc32_15.1: %empty_struct_type = struct_literal () diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon index 6ea10283ce25..41b12049f7ce 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon @@ -115,12 +115,12 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_12: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %C.ref.loc23_24: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc23_12: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %D = value_param runtime_param1 +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b: %D = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -129,8 +129,8 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %b.patt: %D = binding_pattern b // CHECK:STDOUT: %b.param_patt: %D = value_param_pattern %b.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b: %D = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -144,12 +144,12 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc17_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc17_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc17_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc17_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc17_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -165,16 +165,18 @@ fn TestAssign(b: D) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc20: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc20_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] -// CHECK:STDOUT: %C.ref.loc20_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_21: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %C.ref.loc20_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc20_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] @@ -218,7 +220,6 @@ fn TestAssign(b: D) { // CHECK:STDOUT: // CHECK:STDOUT: fn @TestAssign(%b.param_patt: %D) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.var: ref %C = var a // CHECK:STDOUT: %a: ref %C = bind_name a, %a.var // CHECK:STDOUT: %.loc38_15.1: %empty_struct_type = struct_literal () diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index b6be4861d8b9..0351e99104f0 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -112,17 +112,19 @@ fn Test() { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %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: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc25: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %Sink_X.decl: %Sink_X.type = fn_decl @Sink_X [template = constants.%Sink_X] { // CHECK:STDOUT: %x.patt: %X = binding_pattern x // CHECK:STDOUT: %x.param_patt: %X = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %x.param: %X = value_param runtime_param0 +// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %x: %X = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: %Source.decl: %Source.type = fn_decl @Source [template = constants.%Source] { @@ -147,10 +149,12 @@ fn Test() { // CHECK:STDOUT: %return.patt: %X = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %X = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// 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: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %self.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16_20: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %self: %i32 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %X = out_param runtime_param1 // CHECK:STDOUT: %return: ref %X = return_slot %return.param @@ -169,10 +173,10 @@ fn Test() { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // 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: %self.param: %X = value_param runtime_param0 +// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %self: %X = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -185,8 +189,6 @@ fn Test() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @X { -// 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: %.loc12: %X.elem = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type.3] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/inc.carbon b/toolchain/check/testdata/operators/overloaded/inc.carbon index ff7d9a6b5ef8..e45cb71c94d2 100644 --- a/toolchain/check/testdata/operators/overloaded/inc.carbon +++ b/toolchain/check/testdata/operators/overloaded/inc.carbon @@ -70,11 +70,13 @@ fn TestOp() { // CHECK:STDOUT: %Op.decl: %Op.type.1 = fn_decl @Op.1 [template = constants.%Op.1] { // CHECK:STDOUT: %self.patt: %ptr.1 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.1 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc18: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc18_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] // CHECK:STDOUT: %self.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_21: type = splice_block %ptr [template = constants.%ptr.1] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.1 = bind_name self, %self.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface] @@ -96,7 +98,6 @@ fn TestOp() { // CHECK:STDOUT: // CHECK:STDOUT: fn @TestOp() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: %.loc22_15.1: %empty_struct_type = struct_literal () diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index 55f0e87a0dd2..d3bf0975fabd 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -127,9 +127,6 @@ let x: i32 = c[0]; // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%SubscriptType.1, constants.%ElementType.1)> [template = constants.%IndexWith.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, %SubscriptType.decl [template = constants.%SubscriptType.1] -// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, %ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %IndexWith.type { @@ -141,12 +138,12 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.patt: %ElementType.1 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ElementType.1 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%C.ref [template = constants.%C] -// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, file.%SubscriptType.decl [template = constants.%SubscriptType.1] // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%C.ref [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: %SubscriptType.1 = value_param runtime_param1 +// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, file.%SubscriptType.decl [template = constants.%SubscriptType.1] // CHECK:STDOUT: %subscript: %SubscriptType.1 = bind_name subscript, %subscript.param // CHECK:STDOUT: %return.param: ref %ElementType.1 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %ElementType.1 = return_slot %return.param @@ -285,14 +282,6 @@ let x: i32 = c[0]; // CHECK:STDOUT: %i32.loc4_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%i32, constants.%i32)> [template = constants.%IndexWith.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc10_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc10_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_17.1: %tuple.type.1 = tuple_literal (%i32.loc10_9, %i32.loc10_14) -// CHECK:STDOUT: %.loc10_17.2: type = converted %.loc10_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl.1: %.loc4_15.2 as %IndexWith.type { @@ -304,14 +293,16 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.1.%.loc4_15.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %int_32.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc5_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc5_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %self.param: %tuple.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.1.%.loc4_15.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %self: %tuple.type.2 = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: %i32 = value_param runtime_param1 +// CHECK:STDOUT: %.loc5: type = splice_block %i32.loc5_32 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc5_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %subscript: %i32 = bind_name subscript, %subscript.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -419,8 +410,6 @@ let x: i32 = c[0]; // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%SubscriptType.1, constants.%ElementType.1)> [template = constants.%IndexWith.type.3] // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, %ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: impl @impl: %C.ref as %IndexWith.type { @@ -432,12 +421,12 @@ let x: i32 = c[0]; // CHECK:STDOUT: %return.patt: %ElementType.1 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ElementType.1 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%C.ref [template = constants.%C] -// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, file.%SubscriptType.decl [template = constants.%SubscriptType.1] // CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, file.%ElementType.decl [template = constants.%ElementType.1] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%C.ref [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: %SubscriptType.1 = value_param runtime_param1 +// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, file.%SubscriptType.decl [template = constants.%SubscriptType.1] // CHECK:STDOUT: %subscript: %SubscriptType.1 = bind_name subscript, %subscript.param // CHECK:STDOUT: %return.param: ref %ElementType.1 = out_param runtime_param2 // CHECK:STDOUT: %return: ref %ElementType.1 = return_slot %return.param @@ -533,9 +522,6 @@ let x: i32 = c[0]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {} {} -// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [template = constants.%C] -// 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: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { diff --git a/toolchain/check/testdata/operators/overloaded/left_shift.carbon b/toolchain/check/testdata/operators/overloaded/left_shift.carbon index 044e03779f16..c4f303a181ee 100644 --- a/toolchain/check/testdata/operators/overloaded/left_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/left_shift.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/mod.carbon b/toolchain/check/testdata/operators/overloaded/mod.carbon index f73b6d63b750..de66d0dedf23 100644 --- a/toolchain/check/testdata/operators/overloaded/mod.carbon +++ b/toolchain/check/testdata/operators/overloaded/mod.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/mul.carbon b/toolchain/check/testdata/operators/overloaded/mul.carbon index f013f13526c6..32679475c919 100644 --- a/toolchain/check/testdata/operators/overloaded/mul.carbon +++ b/toolchain/check/testdata/operators/overloaded/mul.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/negate.carbon b/toolchain/check/testdata/operators/overloaded/negate.carbon index 8c0efa78ea09..907f48a5bae6 100644 --- a/toolchain/check/testdata/operators/overloaded/negate.carbon +++ b/toolchain/check/testdata/operators/overloaded/negate.carbon @@ -68,9 +68,9 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc23_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -84,9 +84,9 @@ fn TestOp(a: C) -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_23: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param1 // CHECK:STDOUT: %return: ref %C = return_slot %return.param diff --git a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon index e97041aa4223..35d3b87ba85d 100644 --- a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon @@ -191,16 +191,18 @@ fn F() { ()[()]; } // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc6_15.1: @At.1.%IndexWith.type (%IndexWith.type.2) = specific_constant @IndexWith.%Self.1, @IndexWith(constants.%SubscriptType) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @At.1.%IndexWith.type (%IndexWith.type.2) = name_ref Self, %.loc6_15.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc6_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_15.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc6_15.2: type = converted %Self.ref, %Self.as_type.loc6_15.2 [symbolic = %Self.as_type.loc6_15.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, @IndexWith.%SubscriptType.loc5_26.1 [symbolic = %SubscriptType (constants.%SubscriptType)] // CHECK:STDOUT: %.loc6_51.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc6_51.2: type = converted %.loc6_51.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %self.param: @At.1.%Self.as_type.loc6_15.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_15.3: type = splice_block %.loc6_15.2 [symbolic = %Self.as_type.loc6_15.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %.loc6_15.1: @At.1.%IndexWith.type (%IndexWith.type.2) = specific_constant @IndexWith.%Self.1, @IndexWith(constants.%SubscriptType) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @At.1.%IndexWith.type (%IndexWith.type.2) = name_ref Self, %.loc6_15.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc6_15.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc6_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc6_15.2: type = converted %Self.ref, %Self.as_type.loc6_15.2 [symbolic = %Self.as_type.loc6_15.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @At.1.%Self.as_type.loc6_15.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: @At.1.%SubscriptType (%SubscriptType) = value_param runtime_param1 +// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, @IndexWith.%SubscriptType.loc5_26.1 [symbolic = %SubscriptType (constants.%SubscriptType)] // CHECK:STDOUT: %subscript: @At.1.%SubscriptType (%SubscriptType) = bind_name subscript, %subscript.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param @@ -223,14 +225,16 @@ fn F() { ()[()]; } // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc9_7.2 [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_33.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_33.2: type = converted %.loc10_33.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %.loc10_40.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc10_40.2: type = converted %.loc10_40.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %self.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc9_7.2 [template = constants.%empty_tuple.type] // CHECK:STDOUT: %self: %empty_tuple.type = bind_name self, %self.param // CHECK:STDOUT: %subscript.param: %empty_tuple.type = value_param runtime_param1 +// CHECK:STDOUT: %.loc10_33.3: type = splice_block %.loc10_33.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc10_33.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_33.2: type = converted %.loc10_33.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %subscript: %empty_tuple.type = bind_name subscript, %subscript.param // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param2 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index 25ca32ecca90..c031b4f32103 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -140,14 +140,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc13_16: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc13_22: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc13_28.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc13_28.2: type = converted %bool.make_type, %.loc13_28.1 [template = bool] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc13_16: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc13_22: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -160,14 +160,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc17_21: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc17_27: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc17_33.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc17_33.2: type = converted %bool.make_type, %.loc17_33.1 [template = bool] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc17_21: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc17_27: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -180,14 +180,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc21_19: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc21_31.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc21_31.2: type = converted %bool.make_type, %.loc21_31.1 [template = bool] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc21_19: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc21_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -200,14 +200,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc25_24: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc25_30: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc25_36.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc25_36.2: type = converted %bool.make_type, %.loc25_36.1 [template = bool] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc25_24: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc25_30: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -223,14 +223,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc7_17: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc7_27: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc7_33.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc7_33.2: type = converted %bool.make_type, %.loc7_33.1 [template = bool] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc7_17: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc7_27: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -243,14 +243,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc8_29: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc8_39: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc8_45.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc8_45.2: type = converted %bool.make_type, %.loc8_45.1 [template = bool] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc8_29: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc8_39: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -263,14 +263,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc9_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc9_30: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc9_36.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc9_36.2: type = converted %bool.make_type, %.loc9_36.1 [template = bool] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc9_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc9_30: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -283,14 +283,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc10_32: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc10_42: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc10_48.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc10_48.2: type = converted %bool.make_type, %.loc10_48.1 [template = bool] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc10_32: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc10_42: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -415,14 +415,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc6_16: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.ref.loc6_22: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc6_28.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc6_28.2: type = converted %bool.make_type, %.loc6_28.1 [template = bool] // CHECK:STDOUT: %a.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %D.ref.loc6_16: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %a: %D = bind_name a, %a.param // CHECK:STDOUT: %b.param: %D = value_param runtime_param1 +// CHECK:STDOUT: %D.ref.loc6_22: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b: %D = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -435,14 +435,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc14_21: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.ref.loc14_27: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc14_33.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc14_33.2: type = converted %bool.make_type, %.loc14_33.1 [template = bool] // CHECK:STDOUT: %a.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %D.ref.loc14_21: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %a: %D = bind_name a, %a.param // CHECK:STDOUT: %b.param: %D = value_param runtime_param1 +// CHECK:STDOUT: %D.ref.loc14_27: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b: %D = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -455,14 +455,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc22_19: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.ref.loc22_25: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc22_31.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc22_31.2: type = converted %bool.make_type, %.loc22_31.1 [template = bool] // CHECK:STDOUT: %a.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %D.ref.loc22_19: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %a: %D = bind_name a, %a.param // CHECK:STDOUT: %b.param: %D = value_param runtime_param1 +// CHECK:STDOUT: %D.ref.loc22_25: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b: %D = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param @@ -475,14 +475,14 @@ fn TestGreaterEqual(a: D, b: D) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %D.ref.loc30_24: type = name_ref D, file.%D.decl [template = constants.%D] -// CHECK:STDOUT: %D.ref.loc30_30: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] // CHECK:STDOUT: %.loc30_36.1: type = value_of_initializer %bool.make_type [template = bool] // CHECK:STDOUT: %.loc30_36.2: type = converted %bool.make_type, %.loc30_36.1 [template = bool] // CHECK:STDOUT: %a.param: %D = value_param runtime_param0 +// CHECK:STDOUT: %D.ref.loc30_24: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %a: %D = bind_name a, %a.param // CHECK:STDOUT: %b.param: %D = value_param runtime_param1 +// CHECK:STDOUT: %D.ref.loc30_30: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %b: %D = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref bool = out_param runtime_param2 // CHECK:STDOUT: %return: ref bool = return_slot %return.param diff --git a/toolchain/check/testdata/operators/overloaded/right_shift.carbon b/toolchain/check/testdata/operators/overloaded/right_shift.carbon index 5220ab523649..7ac3e88ea90b 100644 --- a/toolchain/check/testdata/operators/overloaded/right_shift.carbon +++ b/toolchain/check/testdata/operators/overloaded/right_shift.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/operators/overloaded/sub.carbon b/toolchain/check/testdata/operators/overloaded/sub.carbon index 9eb83cb4f16c..f786b3edf782 100644 --- a/toolchain/check/testdata/operators/overloaded/sub.carbon +++ b/toolchain/check/testdata/operators/overloaded/sub.carbon @@ -94,12 +94,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc26_26: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc26_14: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a: %C = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc26_20: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -110,12 +110,14 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %b.patt: %C = binding_pattern b // CHECK:STDOUT: %b.param_patt: %C = value_param_pattern %b.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %a.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc30: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc30_18: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %a: %ptr.2 = bind_name a, %a.param // CHECK:STDOUT: %b.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc30_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %b: %C = bind_name b, %b.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -129,12 +131,12 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %C.ref.loc18_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %C.ref.loc18_15: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc18_25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param2 // CHECK:STDOUT: %return: ref %C = return_slot %return.param @@ -150,16 +152,18 @@ fn TestAssign(a: C*, b: C) { // CHECK:STDOUT: %Op.decl: %Op.type.3 = fn_decl @Op.3 [template = constants.%Op.3] { // CHECK:STDOUT: %self.patt: %ptr.2 = binding_pattern self // CHECK:STDOUT: %self.param_patt: %ptr.2 = value_param_pattern %self.patt, runtime_param0 -// CHECK:STDOUT: %.loc23: auto = addr_pattern %self.param_patt +// CHECK:STDOUT: %.loc23_9: auto = addr_pattern %self.param_patt // CHECK:STDOUT: %other.patt: %C = binding_pattern other // CHECK:STDOUT: %other.param_patt: %C = value_param_pattern %other.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] -// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %self.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc23_21: type = splice_block %ptr [template = constants.%ptr.2] { +// CHECK:STDOUT: %C.ref.loc23_20: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: %ptr.2 = bind_name self, %self.param // CHECK:STDOUT: %other.param: %C = value_param runtime_param1 +// CHECK:STDOUT: %C.ref.loc23_31: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %other: %C = bind_name other, %other.param // CHECK:STDOUT: } // CHECK:STDOUT: %interface: = interface_witness (%Op.decl) [template = constants.%interface.2] diff --git a/toolchain/check/testdata/package_expr/fail_not_found.carbon b/toolchain/check/testdata/package_expr/fail_not_found.carbon index 19ce199b5f41..edb9ba8bb07d 100644 --- a/toolchain/check/testdata/package_expr/fail_not_found.carbon +++ b/toolchain/check/testdata/package_expr/fail_not_found.carbon @@ -43,8 +43,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// 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: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] diff --git a/toolchain/check/testdata/package_expr/syntax.carbon b/toolchain/check/testdata/package_expr/syntax.carbon index 9db92b049de9..89c0013b3f93 100644 --- a/toolchain/check/testdata/package_expr/syntax.carbon +++ b/toolchain/check/testdata/package_expr/syntax.carbon @@ -72,12 +72,8 @@ fn Main() { // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } @@ -135,8 +131,6 @@ fn Main() { // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %x.var: ref %i32 = var x // CHECK:STDOUT: %x: ref %i32 = bind_name x, %x.var // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} @@ -144,8 +138,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// 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: %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] @@ -155,8 +147,6 @@ fn Main() { // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_1) [template = constants.%int_1.2] // CHECK:STDOUT: %.loc7: init %i32 = converted %int_1, %int.convert_checked [template = constants.%int_1.2] // CHECK:STDOUT: assign %x.var, %.loc7 -// 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: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: %package.ref: = name_ref package, package [template = package] diff --git a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon index 6a905185ff06..af6e9abb3b1a 100644 --- a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon +++ b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon @@ -81,8 +81,6 @@ import library "var"; // CHECK:STDOUT: .Foo = %Foo // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %Foo.var: ref %i32 = var Foo // CHECK:STDOUT: %Foo: ref %i32 = bind_name Foo, %Foo.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/fail_import_type_error.carbon b/toolchain/check/testdata/packages/fail_import_type_error.carbon index 430e758ca9b1..b7c29c241b1c 100644 --- a/toolchain/check/testdata/packages/fail_import_type_error.carbon +++ b/toolchain/check/testdata/packages/fail_import_type_error.carbon @@ -61,19 +61,12 @@ var d: i32 = d_ref; // CHECK:STDOUT: .d_ref = %d_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %x.ref.loc8: = name_ref x, [template = ] // CHECK:STDOUT: %a_ref.var: ref = var a_ref // CHECK:STDOUT: %a_ref: ref = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %x.ref.loc13: = name_ref x, [template = ] -// CHECK:STDOUT: %.loc13: = struct_literal (%x.ref.loc13) // CHECK:STDOUT: %b_ref.var: ref = var b_ref // CHECK:STDOUT: %b_ref: ref = bind_name b_ref, %b_ref.var -// CHECK:STDOUT: %x.ref.loc18: = name_ref x, [template = ] -// CHECK:STDOUT: %.loc18: = tuple_literal (%x.ref.loc18) // CHECK:STDOUT: %c_ref.var: ref = var c_ref // CHECK:STDOUT: %c_ref: ref = bind_name c_ref, %c_ref.var -// CHECK:STDOUT: %x.ref.loc22: = name_ref x, [template = ] -// CHECK:STDOUT: %ptr: type = ptr_type [template = ] // CHECK:STDOUT: %d_ref.var: ref = var d_ref // CHECK:STDOUT: %d_ref: ref = bind_name d_ref, %d_ref.var // CHECK:STDOUT: } @@ -112,20 +105,12 @@ var d: i32 = d_ref; // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc6: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc6: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var -// 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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// 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: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var -// 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: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon b/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon index cb7514c415c5..08bb03e9f6d4 100644 --- a/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon +++ b/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon @@ -38,8 +38,6 @@ var a: () = A(); // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc7_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc7_9.2: type = converted %.loc7_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon index 27424c5b306a..ef1d30a75e25 100644 --- a/toolchain/check/testdata/packages/implicit_imports_prelude.carbon +++ b/toolchain/check/testdata/packages/implicit_imports_prelude.carbon @@ -52,8 +52,6 @@ var b: i32 = a; // CHECK:STDOUT: .a = %a // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %a.var: ref %i32 = var a // CHECK:STDOUT: %a: ref %i32 = bind_name a, %a.var // CHECK:STDOUT: } @@ -95,8 +93,6 @@ var b: i32 = a; // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/loaded_global.carbon b/toolchain/check/testdata/packages/loaded_global.carbon index 8255163b023a..15a6302ed4f0 100644 --- a/toolchain/check/testdata/packages/loaded_global.carbon +++ b/toolchain/check/testdata/packages/loaded_global.carbon @@ -89,12 +89,8 @@ var package_b: () = package.B(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var -// CHECK:STDOUT: %.loc6_17.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_17.2: type = converted %.loc6_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %package_a.var: ref %empty_tuple.type = var package_a // CHECK:STDOUT: %package_a: ref %empty_tuple.type = bind_name package_a, %package_a.var // CHECK:STDOUT: } @@ -163,12 +159,8 @@ var package_b: () = package.B(); // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc6_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %.loc8_17.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc8_17.2: type = converted %.loc8_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %package_b.var: ref %empty_tuple.type = var package_b // CHECK:STDOUT: %package_b: ref %empty_tuple.type = bind_name package_b, %package_b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon index 14ad3b0108fe..d016884689cd 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon @@ -209,14 +209,12 @@ alias C = Other.C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5: %C.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .x = %.loc5_8 +// CHECK:STDOUT: .x = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -388,7 +386,6 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_import // CHECK:STDOUT: import Other//base // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//base, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//base, loc6_1, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//base, inst14 [no loc], unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//base, loc5_8, unloaded @@ -400,8 +397,6 @@ alias C = Other.C; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -444,7 +439,6 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_import_copy // CHECK:STDOUT: import Other//base // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//base, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//base, loc6_1, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//base, inst14 [no loc], unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//base, loc5_8, unloaded @@ -456,8 +450,6 @@ alias C = Other.C; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -500,7 +492,6 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_import // CHECK:STDOUT: import Other//base // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//base, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//base, loc6_1, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//base, inst14 [no loc], unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//base, loc5_8, unloaded @@ -512,8 +503,6 @@ alias C = Other.C; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -554,7 +543,6 @@ alias C = Other.C; // CHECK:STDOUT: .C = %import_ref.1 // CHECK:STDOUT: import Other//export_name // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst20 [indirect], loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name, inst21 [indirect], unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name, inst22 [indirect], unloaded @@ -566,8 +554,6 @@ alias C = Other.C; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -609,7 +595,6 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_name // CHECK:STDOUT: import Other//export_name_copy // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst20 [indirect], loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name, inst21 [indirect], unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name, inst22 [indirect], unloaded @@ -621,8 +606,6 @@ alias C = Other.C; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -663,7 +646,6 @@ alias C = Other.C; // CHECK:STDOUT: .C = %import_ref.1 // CHECK:STDOUT: import Other//export_name_indirect // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name_indirect, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name_indirect, inst20 [indirect], loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name_indirect, inst21 [indirect], unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name_indirect, inst22 [indirect], unloaded @@ -675,8 +657,6 @@ alias C = Other.C; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -723,7 +703,6 @@ alias C = Other.C; // CHECK:STDOUT: import Other//export_name_indirect // CHECK:STDOUT: import Other//base // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//export_name, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.2: = import_ref Other//export_name, inst20 [indirect], loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//export_name, inst21 [indirect], unloaded // CHECK:STDOUT: %import_ref.4 = import_ref Other//export_name, inst22 [indirect], unloaded @@ -735,8 +714,6 @@ alias C = Other.C; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon index e86958d20aad..99da6839b6bb 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon @@ -257,9 +257,11 @@ fn UseF() { Other.F(); } // CHECK:STDOUT: %x.patt: %empty_tuple.type = binding_pattern x // CHECK:STDOUT: %x.param_patt: %empty_tuple.type = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.param: %empty_tuple.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc4_10.3: type = splice_block %.loc4_10.2 [template = constants.%empty_tuple.type] { +// CHECK:STDOUT: %.loc4_10.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: } // CHECK:STDOUT: %x: %empty_tuple.type = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/export_import.carbon b/toolchain/check/testdata/packages/no_prelude/export_import.carbon index a66d289a5162..f644783d06b7 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_import.carbon @@ -188,14 +188,12 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5: %C.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .x = %.loc5_8 +// CHECK:STDOUT: .x = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -294,7 +292,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -348,7 +345,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -397,7 +393,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -446,7 +441,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -495,7 +489,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -544,7 +537,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -593,7 +585,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -642,7 +633,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -702,7 +692,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -753,7 +742,6 @@ var indirect_c: C = {.x = ()}; // CHECK:STDOUT: .indirect_c = %indirect_c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %indirect_c.var: ref %C = var indirect_c // CHECK:STDOUT: %indirect_c: ref %C = bind_name indirect_c, %indirect_c.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon b/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon index 1a4a0455904d..00db5e93e78b 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon @@ -137,26 +137,22 @@ var d: D = {.y = ()}; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5: %C.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .x = %.loc5_8 +// CHECK:STDOUT: .x = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %.loc9_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_11.2: type = converted %.loc9_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_8: %D.elem = field_decl y, element0 [template] +// CHECK:STDOUT: %.loc9: %D.elem = field_decl y, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%D -// CHECK:STDOUT: .y = %.loc9_8 +// CHECK:STDOUT: .y = %.loc9 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -278,7 +274,6 @@ var d: D = {.y = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -327,7 +322,6 @@ var d: D = {.y = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -376,7 +370,6 @@ var d: D = {.y = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -418,7 +411,6 @@ var d: D = {.y = ()}; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %D.ref: = name_ref D, [template = ] // CHECK:STDOUT: %d.var: ref = var d // CHECK:STDOUT: %d: ref = bind_name d, %d.var // CHECK:STDOUT: } @@ -455,7 +447,6 @@ var d: D = {.y = ()}; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -514,10 +505,8 @@ var d: D = {.y = ()}; // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%D] // CHECK:STDOUT: %d.var: ref %D = var d // CHECK:STDOUT: %d: ref %D = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/export_name.carbon b/toolchain/check/testdata/packages/no_prelude/export_name.carbon index 8294c49126f1..8572c1bc5ee4 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_name.carbon @@ -227,26 +227,22 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl x, element0 [template] +// CHECK:STDOUT: %.loc5: %C.elem = field_decl x, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.x [template = constants.%complete_type.1] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .x = %.loc5_8 +// CHECK:STDOUT: .x = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @NSC { -// CHECK:STDOUT: %.loc10_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_11.2: type = converted %.loc10_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc10_8: %NSC.elem = field_decl y, element0 [template] +// CHECK:STDOUT: %.loc10: %NSC.elem = field_decl y, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.y [template = constants.%complete_type.2] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%NSC -// CHECK:STDOUT: .y = %.loc10_8 +// CHECK:STDOUT: .y = %.loc10 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: @@ -397,7 +393,6 @@ private export C; // CHECK:STDOUT: %NS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//export, NSC, loaded [template = constants.%NSC] // CHECK:STDOUT: %import_ref.4: = import_ref Main//export, inst23 [indirect], loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//export, inst24 [indirect], unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//export, inst25 [indirect], unloaded @@ -414,11 +409,8 @@ private export C; // CHECK:STDOUT: .nsc = %nsc // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] -// CHECK:STDOUT: %NSC.ref: type = name_ref NSC, imports.%import_ref.3 [template = constants.%NSC] // CHECK:STDOUT: %nsc.var: ref %NSC = var nsc // CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } @@ -479,7 +471,6 @@ private export C; // CHECK:STDOUT: %NS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//export_export, NSC, loaded [template = constants.%NSC] // CHECK:STDOUT: %import_ref.4: = import_ref Main//export_export, inst23 [indirect], loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//export_export, inst24 [indirect], unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//export_export, inst25 [indirect], unloaded @@ -497,11 +488,8 @@ private export C; // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] -// CHECK:STDOUT: %NSC.ref: type = name_ref NSC, imports.%import_ref.3 [template = constants.%NSC] // CHECK:STDOUT: %nsc.var: ref %NSC = var nsc // CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } @@ -562,7 +550,6 @@ private export C; // CHECK:STDOUT: %NS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//export_export, NSC, loaded [template = constants.%NSC] // CHECK:STDOUT: %import_ref.4: = import_ref Main//export_export, inst23 [indirect], loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//export_export, inst24 [indirect], unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//export_export, inst25 [indirect], unloaded @@ -579,11 +566,8 @@ private export C; // CHECK:STDOUT: .nsc = %nsc // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] -// CHECK:STDOUT: %NSC.ref: type = name_ref NSC, imports.%import_ref.3 [template = constants.%NSC] // CHECK:STDOUT: %nsc.var: ref %NSC = var nsc // CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } @@ -720,7 +704,6 @@ private export C; // CHECK:STDOUT: %NS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//base, NSC, loaded [template = constants.%NSC] // CHECK:STDOUT: %import_ref.4: = import_ref Main//base, loc6_1, loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//base, inst14 [no loc], unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//base, loc5_8, unloaded @@ -737,11 +720,8 @@ private export C; // CHECK:STDOUT: .nsc = %nsc // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] -// CHECK:STDOUT: %NSC.ref: type = name_ref NSC, imports.%import_ref.3 [template = constants.%NSC] // CHECK:STDOUT: %nsc.var: ref %NSC = var nsc // CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } @@ -802,7 +782,6 @@ private export C; // CHECK:STDOUT: %NS: = namespace %import_ref.2, [template] { // CHECK:STDOUT: .NSC = %import_ref.3 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.3: type = import_ref Main//export, NSC, loaded [template = constants.%NSC] // CHECK:STDOUT: %import_ref.4: = import_ref Main//export, inst23 [indirect], loaded [template = constants.%complete_type.1] // CHECK:STDOUT: %import_ref.5 = import_ref Main//export, inst24 [indirect], unloaded // CHECK:STDOUT: %import_ref.6 = import_ref Main//export, inst25 [indirect], unloaded @@ -819,11 +798,8 @@ private export C; // CHECK:STDOUT: .nsc = %nsc // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var -// CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] -// CHECK:STDOUT: %NSC.ref: type = name_ref NSC, imports.%import_ref.3 [template = constants.%NSC] // CHECK:STDOUT: %nsc.var: ref %NSC = var nsc // CHECK:STDOUT: %nsc: ref %NSC = bind_name nsc, %nsc.var // CHECK:STDOUT: } @@ -938,7 +914,6 @@ private export C; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.1 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon b/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon index c87722e43572..f4afdd4fa7d9 100644 --- a/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon +++ b/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon @@ -51,14 +51,12 @@ export C.n; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %.loc5_11.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc5_8: %C.elem = field_decl n, element0 [template] +// CHECK:STDOUT: %.loc5: %C.elem = field_decl n, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n [template = constants.%complete_type] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C -// CHECK:STDOUT: .n = %.loc5_8 +// CHECK:STDOUT: .n = %.loc5 // CHECK:STDOUT: complete_type_witness = %complete_type // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon b/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon index 208c57afc123..b0f69140e255 100644 --- a/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon +++ b/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon @@ -347,10 +347,8 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %C1.ref: type = name_ref C1, imports.%import_ref.1 [template = constants.%C1] // CHECK:STDOUT: %c1.var: ref %C1 = var c1 // CHECK:STDOUT: %c1: ref %C1 = bind_name c1, %c1.var -// CHECK:STDOUT: %C2.ref: type = name_ref C2, imports.%import_ref.2 [template = constants.%C2] // CHECK:STDOUT: %c2.var: ref %C2 = var c2 // CHECK:STDOUT: %c2: ref %C2 = bind_name c2, %c2.var // CHECK:STDOUT: } @@ -415,7 +413,6 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %C1.ref: type = name_ref C1, imports.%import_ref.1 [template = constants.%C1] // CHECK:STDOUT: %c1.var: ref %C1 = var c1 // CHECK:STDOUT: %c1: ref %C1 = bind_name c1, %c1.var // CHECK:STDOUT: } @@ -465,7 +462,6 @@ import Other library "o1"; // CHECK:STDOUT: %NS: = namespace %import_ref.1, [template] { // CHECK:STDOUT: .C = %import_ref.2 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.2: type = import_ref Main//use_ns, C, loaded [template = constants.%C] // CHECK:STDOUT: %import_ref.3: = import_ref Main//ns, loc5_13, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.4 = import_ref Main//ns, inst15 [no loc], unloaded // CHECK:STDOUT: } @@ -477,8 +473,6 @@ import Other library "o1"; // CHECK:STDOUT: } // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import -// CHECK:STDOUT: %NS.ref: = name_ref NS, imports.%NS [template = imports.%NS] -// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%import_ref.2 [template = constants.%C] // CHECK:STDOUT: %c.var: ref %C = var c // CHECK:STDOUT: %c: ref %C = bind_name c, %c.var // CHECK:STDOUT: } @@ -531,10 +525,8 @@ import Other library "o1"; // CHECK:STDOUT: import Other//o2 // CHECK:STDOUT: import Other//o1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//o1, O1, loaded [template = constants.%O1] // CHECK:STDOUT: %import_ref.2: = import_ref Other//o1, loc4_11, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//o1, inst14 [no loc], unloaded -// CHECK:STDOUT: %import_ref.4: type = import_ref Other//o2, O2, loaded [template = constants.%O2] // CHECK:STDOUT: %import_ref.5: = import_ref Other//o2, loc4_11, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.6 = import_ref Other//o2, inst14 [no loc], unloaded // CHECK:STDOUT: } @@ -548,12 +540,8 @@ import Other library "o1"; // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref.loc6: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %O1.ref: type = name_ref O1, imports.%import_ref.1 [template = constants.%O1] // CHECK:STDOUT: %o1.var: ref %O1 = var o1 // CHECK:STDOUT: %o1: ref %O1 = bind_name o1, %o1.var -// CHECK:STDOUT: %Other.ref.loc7: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %O2.ref: type = name_ref O2, imports.%import_ref.4 [template = constants.%O2] // CHECK:STDOUT: %o2.var: ref %O2 = var o2 // CHECK:STDOUT: %o2: ref %O2 = bind_name o2, %o2.var // CHECK:STDOUT: } @@ -612,7 +600,6 @@ import Other library "o1"; // CHECK:STDOUT: .O1 = %import_ref.1 // CHECK:STDOUT: import Other//o1 // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: type = import_ref Other//o1, O1, loaded [template = constants.%O1] // CHECK:STDOUT: %import_ref.2: = import_ref Other//o1, loc4_11, loaded [template = constants.%complete_type] // CHECK:STDOUT: %import_ref.3 = import_ref Other//o1, inst14 [no loc], unloaded // CHECK:STDOUT: } @@ -625,8 +612,6 @@ import Other library "o1"; // CHECK:STDOUT: %default.import.loc2_6.1 = import // CHECK:STDOUT: %default.import.loc2_6.2 = import // CHECK:STDOUT: %Other.import = import Other -// CHECK:STDOUT: %Other.ref: = name_ref Other, imports.%Other [template = imports.%Other] -// CHECK:STDOUT: %O1.ref: type = name_ref O1, imports.%import_ref.1 [template = constants.%O1] // CHECK:STDOUT: %o1.var: ref %O1 = var o1 // CHECK:STDOUT: %o1: ref %O1 = bind_name o1, %o1.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon b/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon index 8c3afc2103a9..2eb622c3b77f 100644 --- a/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon +++ b/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon @@ -88,14 +88,12 @@ var n: {} = i32; // CHECK:STDOUT: --- fail_missing_prelude.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %n.var: ref = var n // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } @@ -109,7 +107,6 @@ var n: {} = i32; // CHECK:STDOUT: --- fail_missing_prelude_member.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -124,7 +121,6 @@ var n: {} = i32; // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %n.var: ref = var n // CHECK:STDOUT: %n: ref = bind_name n, %n.var // CHECK:STDOUT: } @@ -154,12 +150,12 @@ var n: {} = i32; // CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_8.1 [symbolic = %T.loc4_8.2 (constants.%T)] // CHECK:STDOUT: %.loc4_29.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc4_29.2: type = converted %.loc4_29.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc4_8.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc4_8.2 (constants.%T)] // CHECK:STDOUT: %N.param: @Int.%T.loc4_8.2 (%T) = value_param runtime_param +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc4_8.1 [symbolic = %T.loc4_8.2 (constants.%T)] // CHECK:STDOUT: %N.loc4_18.1: @Int.%T.loc4_8.2 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc4_18.2 (constants.%N)] // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param @@ -217,8 +213,6 @@ var n: {} = i32; // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc6_9.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc6_9.2: type = converted %.loc6_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %n.var: ref %empty_struct_type = var n // CHECK:STDOUT: %n: ref %empty_struct_type = bind_name n, %n.var // CHECK:STDOUT: } @@ -287,18 +281,16 @@ var n: {} = i32; // CHECK:STDOUT: %return.patt: %empty_tuple.type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_tuple.type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_8.1 [symbolic = %T.loc8_8.2 (constants.%T)] // CHECK:STDOUT: %.loc8_29.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc8_29.2: type = converted %.loc8_29.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_8.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_8.2 (constants.%T)] // CHECK:STDOUT: %N.param: @Int.%T.loc8_8.2 (%T) = value_param runtime_param +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_8.1 [symbolic = %T.loc8_8.2 (constants.%T)] // CHECK:STDOUT: %N.loc8_18.1: @Int.%T.loc8_8.2 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc8_18.2 (constants.%N)] // CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc10_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_9.2: type = converted %.loc10_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %n.var: ref %empty_tuple.type = var n // CHECK:STDOUT: %n: ref %empty_tuple.type = bind_name n, %n.var // CHECK:STDOUT: } @@ -376,18 +368,16 @@ var n: {} = i32; // CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_13.1 [symbolic = %T.loc7_13.2 (constants.%T)] // CHECK:STDOUT: %.loc7_34.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc7_34.2: type = converted %.loc7_34.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_13.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_13.2 (constants.%T)] // CHECK:STDOUT: %N.param: @Int.%T.loc7_13.2 (%T) = value_param runtime_param +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_13.1 [symbolic = %T.loc7_13.2 (constants.%T)] // CHECK:STDOUT: %N.loc7_23.1: @Int.%T.loc7_13.2 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc7_23.2 (constants.%N)] // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9_9.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc9_9.2: type = converted %.loc9_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %n.var: ref %empty_struct_type = var n // CHECK:STDOUT: %n: ref %empty_struct_type = bind_name n, %n.var // CHECK:STDOUT: } @@ -456,8 +446,6 @@ var n: {} = i32; // CHECK:STDOUT: .n = %n // CHECK:STDOUT: } // CHECK:STDOUT: %Core.decl: type = class_decl @Core [template = constants.%Core] {} {} -// CHECK:STDOUT: %.loc12_9.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %n.var: ref %empty_struct_type = var n // CHECK:STDOUT: %n: ref %empty_struct_type = bind_name n, %n.var // CHECK:STDOUT: } @@ -471,12 +459,12 @@ var n: {} = i32; // CHECK:STDOUT: %return.patt: %empty_struct_type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %empty_struct_type = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_10.2 [symbolic = %T.loc6_10.1 (constants.%T)] // CHECK:STDOUT: %.loc6_31.1: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc6_31.2: type = converted %.loc6_31.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc6_10.2: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc6_10.1 (constants.%T)] // CHECK:STDOUT: %N.param: @Int.%T.loc6_10.1 (%T) = value_param runtime_param +// CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_10.2 [symbolic = %T.loc6_10.1 (constants.%T)] // CHECK:STDOUT: %N.loc6_20.2: @Int.%T.loc6_10.1 (%T) = bind_symbolic_name N, 1, %N.param [symbolic = %N.loc6_20.1 (constants.%N)] // CHECK:STDOUT: %return.param: ref %empty_struct_type = out_param runtime_param0 // CHECK:STDOUT: %return: ref %empty_struct_type = return_slot %return.param diff --git a/toolchain/check/testdata/pointer/address_of_deref.carbon b/toolchain/check/testdata/pointer/address_of_deref.carbon index e8236d23694d..a1945dfa5597 100644 --- a/toolchain/check/testdata/pointer/address_of_deref.carbon +++ b/toolchain/check/testdata/pointer/address_of_deref.carbon @@ -50,8 +50,8 @@ fn F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -59,8 +59,6 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// 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: %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] diff --git a/toolchain/check/testdata/pointer/address_of_lvalue.carbon b/toolchain/check/testdata/pointer/address_of_lvalue.carbon index 1938ea3be140..0ca2d59cd08f 100644 --- a/toolchain/check/testdata/pointer/address_of_lvalue.carbon +++ b/toolchain/check/testdata/pointer/address_of_lvalue.carbon @@ -44,7 +44,6 @@ fn F() { // 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] // CHECK:STDOUT: %ptr.2: type = ptr_type %i32 [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%int_1.2, %int_2.2) [template] @@ -71,11 +70,6 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc12_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc12_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %s.var: ref %struct_type.a.b.1 = var s // CHECK:STDOUT: %s: ref %struct_type.a.b.1 = bind_name s, %s.var // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] @@ -98,41 +92,23 @@ fn F() { // CHECK:STDOUT: %.loc12_46.8: init %struct_type.a.b.1 = struct_init (%.loc12_46.4, %.loc12_46.7) to %s.var [template = constants.%struct] // CHECK:STDOUT: %.loc12_47: init %struct_type.a.b.1 = converted %.loc12_46.1, %.loc12_46.8 [template = constants.%struct] // CHECK:STDOUT: assign %s.var, %.loc12_47 -// CHECK:STDOUT: %int_32.loc14_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_24: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] -// CHECK:STDOUT: %ptr.loc14: type = ptr_type %struct_type.a.b.1 [template = constants.%ptr.1] // CHECK:STDOUT: %p.var: ref %ptr.1 = var p // CHECK:STDOUT: %p: ref %ptr.1 = bind_name p, %p.var // CHECK:STDOUT: %s.ref.loc14: ref %struct_type.a.b.1 = name_ref s, %s // CHECK:STDOUT: %addr.loc14: %ptr.1 = addr_of %s.ref.loc14 // CHECK:STDOUT: assign %p.var, %addr.loc14 -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc15: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %q.var: ref %ptr.2 = var q // CHECK:STDOUT: %q: ref %ptr.2 = bind_name q, %q.var // CHECK:STDOUT: %s.ref.loc15: ref %struct_type.a.b.1 = name_ref s, %s // CHECK:STDOUT: %.loc15: ref %i32 = struct_access %s.ref.loc15, element0 // CHECK:STDOUT: %addr.loc15: %ptr.2 = addr_of %.loc15 // CHECK:STDOUT: assign %q.var, %addr.loc15 -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc16: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %r.var: ref %ptr.2 = var r // CHECK:STDOUT: %r: ref %ptr.2 = bind_name r, %r.var // CHECK:STDOUT: %s.ref.loc16: ref %struct_type.a.b.1 = name_ref s, %s // CHECK:STDOUT: %.loc16: ref %i32 = struct_access %s.ref.loc16, element1 // CHECK:STDOUT: %addr.loc16: %ptr.2 = addr_of %.loc16 // CHECK:STDOUT: assign %r.var, %addr.loc16 -// CHECK:STDOUT: %int_32.loc18_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc18_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_19.1: %tuple.type.1 = tuple_literal (%i32.loc18_11, %i32.loc18_16) -// CHECK:STDOUT: %.loc18_19.2: type = converted %.loc18_19.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %t.var: ref %tuple.type.2 = var t // CHECK:STDOUT: %t: ref %tuple.type.2 = bind_name t, %t.var // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] @@ -155,9 +131,6 @@ fn F() { // CHECK:STDOUT: %.loc18_28.6: init %tuple.type.2 = tuple_init (%.loc18_28.3, %.loc18_28.5) to %t.var [template = constants.%tuple] // CHECK:STDOUT: %.loc18_29: init %tuple.type.2 = converted %.loc18_28.1, %.loc18_28.6 [template = constants.%tuple] // CHECK:STDOUT: assign %t.var, %.loc18_29 -// 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: %ptr.loc19: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %t0.var: ref %ptr.2 = var t0 // CHECK:STDOUT: %t0: ref %ptr.2 = bind_name t0, %t0.var // CHECK:STDOUT: %t.ref.loc19: ref %tuple.type.2 = name_ref t, %t @@ -165,9 +138,6 @@ fn F() { // CHECK:STDOUT: %tuple.elem0.loc19: ref %i32 = tuple_access %t.ref.loc19, element0 // CHECK:STDOUT: %addr.loc19: %ptr.2 = addr_of %tuple.elem0.loc19 // CHECK:STDOUT: assign %t0.var, %addr.loc19 -// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc20: type = ptr_type %i32 [template = constants.%ptr.2] // CHECK:STDOUT: %t1.var: ref %ptr.2 = var t1 // CHECK:STDOUT: %t1: ref %ptr.2 = bind_name t1, %t1.var // CHECK:STDOUT: %t.ref.loc20: ref %tuple.type.2 = name_ref t, %t diff --git a/toolchain/check/testdata/pointer/arrow.carbon b/toolchain/check/testdata/pointer/arrow.carbon index bbcea4d407e8..04e9d8d695c3 100644 --- a/toolchain/check/testdata/pointer/arrow.carbon +++ b/toolchain/check/testdata/pointer/arrow.carbon @@ -57,9 +57,11 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: %ptr.patt: %ptr.1 = binding_pattern ptr // CHECK:STDOUT: %ptr.param_patt: %ptr.1 = value_param_pattern %ptr.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr.loc16_14: type = ptr_type %C [template = constants.%ptr.1] // CHECK:STDOUT: %ptr.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc16: type = splice_block %ptr.loc16_14 [template = constants.%ptr.1] { +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %ptr.loc16_14: type = ptr_type %C [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %ptr.loc16_8: %ptr.1 = bind_name ptr, %ptr.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -69,12 +71,10 @@ fn Foo(ptr: C*) { // CHECK:STDOUT: %self.patt: %C = binding_pattern self // CHECK:STDOUT: %self.param_patt: %C = value_param_pattern %self.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %self.param: %C = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %self: %C = bind_name self, %self.param // CHECK:STDOUT: } -// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] -// CHECK:STDOUT: %ptr: type = ptr_type %C [template = constants.%ptr.1] // CHECK:STDOUT: %.loc13: %C.elem = field_decl field, element0 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.field [template = constants.%complete_type] // CHECK:STDOUT: diff --git a/toolchain/check/testdata/pointer/basic.carbon b/toolchain/check/testdata/pointer/basic.carbon index d7995fe7d9fe..fccad22cad27 100644 --- a/toolchain/check/testdata/pointer/basic.carbon +++ b/toolchain/check/testdata/pointer/basic.carbon @@ -52,8 +52,8 @@ fn F() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -61,8 +61,6 @@ fn F() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// 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: %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] @@ -72,9 +70,6 @@ fn F() -> i32 { // CHECK:STDOUT: %int.convert_checked: init %i32 = call %Convert.specific_fn(%int_0) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc12: init %i32 = converted %int_0, %int.convert_checked [template = constants.%int_0.2] // CHECK:STDOUT: assign %n.var, %.loc12 -// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %p.var: ref %ptr = var p // CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var // CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index 2748d4f5e238..ef9fad1bb387 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -193,9 +193,11 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %param.patt: %i32 = binding_pattern param // CHECK:STDOUT: %param.param_patt: %i32 = value_param_pattern %param.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc95: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc95: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %param.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc95: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %param: %i32 = bind_name param, %param.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -285,9 +287,6 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: // CHECK:STDOUT: fn @AddressOfParam(%param.param_patt: %i32) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc99: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc99: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.7] // CHECK:STDOUT: %param_addr.var: ref %ptr.7 = var param_addr // CHECK:STDOUT: %param_addr: ref %ptr.7 = bind_name param_addr, %param_addr.var // CHECK:STDOUT: %param.ref: %i32 = name_ref param, %param diff --git a/toolchain/check/testdata/pointer/fail_deref_error.carbon b/toolchain/check/testdata/pointer/fail_deref_error.carbon index a396b0f7dad5..51b40e66aa84 100644 --- a/toolchain/check/testdata/pointer/fail_deref_error.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_error.carbon @@ -40,10 +40,6 @@ let n2: i32 = undeclared->foo; // CHECK:STDOUT: .n2 = @__global_init.%n2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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: } // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { diff --git a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon index 59e46091f029..a3ed1a193a9e 100644 --- a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon @@ -71,9 +71,11 @@ fn Deref(n: i32) { // CHECK:STDOUT: %n.patt: %i32 = binding_pattern n // CHECK:STDOUT: %n.param_patt: %i32 = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %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: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32 [template = constants.%i32] { +// 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: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_deref_type.carbon b/toolchain/check/testdata/pointer/fail_deref_type.carbon index 949b3b0639d9..85f431b0af84 100644 --- a/toolchain/check/testdata/pointer/fail_deref_type.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_type.carbon @@ -24,8 +24,6 @@ var p2: i32->foo; // CHECK:STDOUT: --- fail_deref_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -43,15 +41,8 @@ var p2: i32->foo; // CHECK:STDOUT: .p2 = %p2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %.loc18: ref = deref %i32.loc18 // CHECK:STDOUT: %p.var: ref = var p // CHECK:STDOUT: %p: ref = bind_name p, %p.var -// 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: %.loc22: ref = deref %i32.loc22 -// CHECK:STDOUT: %foo.ref: = name_ref foo, [template = ] // CHECK:STDOUT: %p2.var: ref = var p2 // CHECK:STDOUT: %p2: ref = bind_name p2, %p2.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon index 54e9aa51a3ca..7526c805e070 100644 --- a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon @@ -50,15 +50,17 @@ fn ConstMismatch(p: const {}*) -> const ({}*) { // CHECK:STDOUT: %return.patt: %const.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %const.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc11_28: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc11_21: type = converted %.loc11_28, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %const.loc11_21: type = const_type %empty_struct_type [template = constants.%const.1] -// CHECK:STDOUT: %ptr.loc11_29: type = ptr_type %const.1 [template = constants.%ptr.1] // CHECK:STDOUT: %.loc11_43: %empty_struct_type = struct_literal () // CHECK:STDOUT: %.loc11_44: type = converted %.loc11_43, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %ptr.loc11_44: type = ptr_type %empty_struct_type [template = constants.%ptr.2] // CHECK:STDOUT: %const.loc11_35: type = const_type %ptr.2 [template = constants.%const.2] // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_29: type = splice_block %ptr.loc11_29 [template = constants.%ptr.1] { +// CHECK:STDOUT: %.loc11_28: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc11_21: type = converted %.loc11_28, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %const.loc11_21: type = const_type %empty_struct_type [template = constants.%const.1] +// CHECK:STDOUT: %ptr.loc11_29: type = ptr_type %const.1 [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %const.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %const.2 = return_slot %return.param diff --git a/toolchain/check/testdata/pointer/import.carbon b/toolchain/check/testdata/pointer/import.carbon index 3018624adfec..5761bc7bab67 100644 --- a/toolchain/check/testdata/pointer/import.carbon +++ b/toolchain/check/testdata/pointer/import.carbon @@ -53,13 +53,8 @@ var a: i32* = a_ref; // CHECK:STDOUT: .a_ref = %a_ref // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %a_orig.var: ref %i32 = var a_orig // CHECK:STDOUT: %a_orig: ref %i32 = bind_name a_orig, %a_orig.var -// CHECK:STDOUT: %int_32.loc5: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %a_ref.var: ref %ptr = var a_ref // CHECK:STDOUT: %a_ref: ref %ptr = bind_name a_ref, %a_ref.var // CHECK:STDOUT: } @@ -107,9 +102,6 @@ var a: i32* = a_ref; // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// 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: %ptr: type = ptr_type %i32 [template = constants.%ptr] // CHECK:STDOUT: %a.var: ref %ptr = var a // CHECK:STDOUT: %a: ref %ptr = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/pointer/nested_const.carbon b/toolchain/check/testdata/pointer/nested_const.carbon index 81a95ce749b0..a76b1e3d43bf 100644 --- a/toolchain/check/testdata/pointer/nested_const.carbon +++ b/toolchain/check/testdata/pointer/nested_const.carbon @@ -47,17 +47,19 @@ fn F(p: const (const (const i32*)*)) -> const i32 { // CHECK:STDOUT: %return.patt: %const.1 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %const.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %const.loc12_23: type = const_type %i32 [template = constants.%const.1] -// CHECK:STDOUT: %ptr.loc12_32: type = ptr_type %const.1 [template = constants.%ptr.1] -// CHECK:STDOUT: %const.loc12_16: type = const_type %ptr.1 [template = constants.%const.2] -// CHECK:STDOUT: %ptr.loc12_34: type = ptr_type %const.2 [template = constants.%ptr.2] -// CHECK:STDOUT: %const.loc12_9: type = const_type %ptr.2 [template = constants.%const.3] // CHECK:STDOUT: %int_32.loc12_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc12_47: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc12_41: type = const_type %i32 [template = constants.%const.1] // CHECK:STDOUT: %p.param: %const.3 = value_param runtime_param0 +// CHECK:STDOUT: %.loc12: type = splice_block %const.loc12_9 [template = constants.%const.3] { +// CHECK:STDOUT: %int_32.loc12_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc12_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %const.loc12_23: type = const_type %i32 [template = constants.%const.1] +// CHECK:STDOUT: %ptr.loc12_32: type = ptr_type %const.1 [template = constants.%ptr.1] +// CHECK:STDOUT: %const.loc12_16: type = const_type %ptr.1 [template = constants.%const.2] +// CHECK:STDOUT: %ptr.loc12_34: type = ptr_type %const.2 [template = constants.%ptr.2] +// CHECK:STDOUT: %const.loc12_9: type = const_type %ptr.2 [template = constants.%const.3] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %const.3 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %const.1 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %const.1 = return_slot %return.param diff --git a/toolchain/check/testdata/pointer/types.carbon b/toolchain/check/testdata/pointer/types.carbon index 8700887e6d7a..2a1757100e39 100644 --- a/toolchain/check/testdata/pointer/types.carbon +++ b/toolchain/check/testdata/pointer/types.carbon @@ -51,13 +51,15 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: %return.patt: %ptr.1 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr.loc11_14: type = ptr_type %i32 [template = constants.%ptr.1] // CHECK:STDOUT: %int_32.loc11_20: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %ptr.loc11_23: type = ptr_type %i32 [template = constants.%ptr.1] // CHECK:STDOUT: %p.param: %ptr.1 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %ptr.loc11_14 [template = constants.%ptr.1] { +// CHECK:STDOUT: %int_32.loc11_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %ptr.loc11_14: type = ptr_type %i32 [template = constants.%ptr.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.1 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.1 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.1 = return_slot %return.param @@ -68,15 +70,17 @@ fn ConstPtr(p: const i32*) -> (const i32)* { // CHECK:STDOUT: %return.patt: %ptr.2 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %ptr.2 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %const.loc15_16: type = const_type %i32 [template = constants.%const] -// CHECK:STDOUT: %ptr.loc15_25: type = ptr_type %const [template = constants.%ptr.2] // CHECK:STDOUT: %int_32.loc15_38: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc15_38: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %const.loc15_32: type = const_type %i32 [template = constants.%const] // CHECK:STDOUT: %ptr.loc15_42: type = ptr_type %const [template = constants.%ptr.2] // CHECK:STDOUT: %p.param: %ptr.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc15: type = splice_block %ptr.loc15_25 [template = constants.%ptr.2] { +// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %const.loc15_16: type = const_type %i32 [template = constants.%const] +// CHECK:STDOUT: %ptr.loc15_25: type = ptr_type %const [template = constants.%ptr.2] +// CHECK:STDOUT: } // CHECK:STDOUT: %p: %ptr.2 = bind_name p, %p.param // CHECK:STDOUT: %return.param: ref %ptr.2 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %ptr.2 = return_slot %return.param diff --git a/toolchain/check/testdata/return/code_after_return_value.carbon b/toolchain/check/testdata/return/code_after_return_value.carbon index 3f9d17e36279..7f00bf9e0705 100644 --- a/toolchain/check/testdata/return/code_after_return_value.carbon +++ b/toolchain/check/testdata/return/code_after_return_value.carbon @@ -61,12 +61,14 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] // 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: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc11_9.3: type = splice_block %.loc11_9.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_9.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc11_9.2: type = converted %bool.make_type, %.loc11_9.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param 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 facaa2f2f069..a498ef33bee6 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -86,8 +86,8 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -96,18 +96,14 @@ fn G() -> C { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc24: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// CHECK:STDOUT: %int_32.loc23_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc23_16: %C.elem = field_decl a, element0 [template] -// CHECK:STDOUT: %int_32.loc23_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %.loc23_28: %C.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.4] // CHECK:STDOUT: @@ -120,8 +116,6 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %i32 { // CHECK:STDOUT: !entry: -// 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: %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] @@ -137,7 +131,6 @@ fn G() -> C { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %return.param_patt: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc25: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %c: ref %C = bind_name c, %return // CHECK:STDOUT: %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] diff --git a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon index 67376a18bbc8..08478b66afd4 100644 --- a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon @@ -65,10 +65,8 @@ fn ForgotReturnType() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Procedure() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_20.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_20.2: type = converted %.loc12_20.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %v: %empty_tuple.type = bind_name v, -// CHECK:STDOUT: %.loc12_25: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc12: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: assign , // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -100,8 +98,6 @@ fn ForgotReturnType() { // CHECK:STDOUT: // CHECK:STDOUT: fn @ForgotReturnType() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc11_20.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_20.2: type = converted %.loc11_20.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %v: %empty_tuple.type = bind_name v, // CHECK:STDOUT: %.loc11_25: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: assign , diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index e28c88a73518..87d743bd61cb 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -83,8 +83,8 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -92,8 +92,8 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -105,8 +105,6 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: if %true br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// 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: %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] @@ -116,8 +114,6 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %Convert.specific_fn.loc13(%int_0.loc13) [template = constants.%int_0.2] // CHECK:STDOUT: %.loc13: init %i32 = converted %int_0.loc13, %int.convert_checked.loc13 [template = constants.%int_0.2] // CHECK:STDOUT: assign %v.var, %.loc13 -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%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] @@ -146,8 +142,6 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: if %true.loc27 br !if.then.loc27 else br !if.else.loc27 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc27: -// 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: %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] @@ -161,8 +155,6 @@ fn DifferentScopes() -> i32 { // CHECK:STDOUT: if %true.loc29 br !if.then.loc29 else br !if.else.loc29 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc29: -// 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: %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] diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index 90c2af009b35..2cace038a360 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -26,9 +26,6 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %Mismatch.type: type = fn_type @Mismatch [template] // CHECK:STDOUT: %Mismatch: %Mismatch.type = struct_value () [template] -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %float: f64 = float_literal 0 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -60,10 +57,6 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Mismatch() -> %i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc18_19.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc18_19.2: type = converted %float.make_type, %.loc18_19.1 [template = f64] // CHECK:STDOUT: %v: f64 = bind_name v, // CHECK:STDOUT: %float: f64 = float_literal 0 [template = constants.%float] // CHECK:STDOUT: assign , diff --git a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon index b733e0aff3b4..773f23ce8f26 100644 --- a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon +++ b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon @@ -112,11 +112,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: type = return_slot_pattern // CHECK:STDOUT: %return.param_patt: type = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] -// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc6_22.2: type = converted %int_literal.make_type, %.loc6_22.1 [template = Core.IntLiteral] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %.loc6_22.3: type = splice_block %.loc6_22.2 [template = Core.IntLiteral] { +// CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [template = constants.%IntLiteral] +// CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc6_22.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc6_22.2: type = converted %int_literal.make_type, %.loc6_22.1 [template = Core.IntLiteral] +// CHECK:STDOUT: } // CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param // CHECK:STDOUT: %return.param: ref type = out_param runtime_param1 // CHECK:STDOUT: %return: ref type = return_slot %return.param @@ -162,12 +164,14 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: @Convert.1.%T (%T) = return_slot_pattern // CHECK:STDOUT: %return.param_patt: @Convert.1.%T (%T) = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc9_20.1: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.ref: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc9_20.1 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %Self.as_type.loc9_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_20.1 (constants.%Self.as_type)] -// CHECK:STDOUT: %.loc9_20.2: type = converted %Self.ref, %Self.as_type.loc9_20.2 [symbolic = %Self.as_type.loc9_20.1 (constants.%Self.as_type)] // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc8_22.1 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %self.param: @Convert.1.%Self.as_type.loc9_20.1 (%Self.as_type) = value_param runtime_param0 +// CHECK:STDOUT: %.loc9_20.3: type = splice_block %.loc9_20.2 [symbolic = %Self.as_type.loc9_20.1 (constants.%Self.as_type)] { +// CHECK:STDOUT: %.loc9_20.1: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.ref: @Convert.1.%ImplicitAs.type (%ImplicitAs.type.2) = name_ref Self, %.loc9_20.1 [symbolic = %Self (constants.%Self)] +// CHECK:STDOUT: %Self.as_type.loc9_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc9_20.1 (constants.%Self.as_type)] +// CHECK:STDOUT: %.loc9_20.2: type = converted %Self.ref, %Self.as_type.loc9_20.2 [symbolic = %Self.as_type.loc9_20.1 (constants.%Self.as_type)] +// CHECK:STDOUT: } // CHECK:STDOUT: %self: @Convert.1.%Self.as_type.loc9_20.1 (%Self.as_type) = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref @Convert.1.%T (%T) = out_param runtime_param1 // CHECK:STDOUT: %return: ref @Convert.1.%T (%T) = return_slot %return.param @@ -188,12 +192,12 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %i32.builtin = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32.builtin = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc12_17.2 [template = Core.IntLiteral] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc13_31.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc13_31.2: type = converted %int.make_type_signed, %.loc13_31.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%.loc12_17.2 [template = Core.IntLiteral] // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param @@ -376,7 +380,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: import Core//default // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: %ImplicitAs.type.1 = import_ref Core//default, ImplicitAs, loaded [template = constants.%ImplicitAs.generic] -// CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst48 [no loc], unloaded +// CHECK:STDOUT: %import_ref.3 = import_ref Core//default, inst49 [no loc], unloaded // CHECK:STDOUT: %import_ref.4: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Core//default, loc9_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.5: @ImplicitAs.%Convert.type (%Convert.type.1) = import_ref Core//default, Convert, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.1)] // CHECK:STDOUT: %import_ref.6 = import_ref Core//default, loc9_32, unloaded @@ -397,11 +401,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %N.patt.loc6_9.1: %i32.builtin = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: %i32.builtin = value_param_pattern %N.patt.loc6_9.1, runtime_param [symbolic = %N.patt.loc6_9.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc6_13.2: type = converted %int.make_type_signed, %.loc6_13.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %N.param: %i32.builtin = value_param runtime_param +// CHECK:STDOUT: %.loc6_13.3: type = splice_block %.loc6_13.2 [template = constants.%i32.builtin] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc6_13.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc6_13.2: type = converted %int.make_type_signed, %.loc6_13.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc6_9.1: %i32.builtin = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_9.2 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: type = class_decl @D [template = constants.%D] {} {} @@ -559,9 +565,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%C [template = constants.%C.2] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.2 = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.2.%C [template = constants.%C.2] // CHECK:STDOUT: %self: %C.2 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -580,9 +586,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%C [template = constants.%C.3] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.3 = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.3.%C [template = constants.%C.3] // CHECK:STDOUT: %self: %C.3 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -601,9 +607,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%C [template = constants.%C.4] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.4 = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.4.%C [template = constants.%C.4] // CHECK:STDOUT: %self: %C.4 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -622,9 +628,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.5.%C [template = constants.%C.5] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.5 = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.5.%C [template = constants.%C.5] // CHECK:STDOUT: %self: %C.5 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -643,9 +649,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.6.%C [template = constants.%C.6] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.6 = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.6.%C [template = constants.%C.6] // CHECK:STDOUT: %self: %C.6 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -664,9 +670,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.7.%C [template = constants.%C.7] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.7 = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.7.%C [template = constants.%C.7] // CHECK:STDOUT: %self: %C.7 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -685,9 +691,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8.%C [template = constants.%C.8] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.8 = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.8.%C [template = constants.%C.8] // CHECK:STDOUT: %self: %C.8 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -706,9 +712,9 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.9.%C [template = constants.%C.9] // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %self.param: %C.9 = value_param runtime_param0 +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.9.%C [template = constants.%C.9] // CHECK:STDOUT: %self: %C.9 = bind_name self, %self.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param @@ -736,15 +742,7 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @D { -// CHECK:STDOUT: %int_32.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call constants.%Int(%int_32.loc7_18) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc7_16: %D.elem = field_decl n, element0 [template] -// CHECK:STDOUT: %int_32.loc7_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call constants.%Int(%int_32.loc7_30) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_30, %.loc7_30.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %.loc7_28: %D.elem = field_decl m, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.n.m.1 [template = constants.%complete_type.2] // CHECK:STDOUT: @@ -1137,13 +1135,13 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.2: type = import_ref P//library, D, loaded [template = constants.%D] // CHECK:STDOUT: %import_ref.3: = import_ref P//library, loc7_35, loaded [template = constants.%complete_type.1] -// CHECK:STDOUT: %import_ref.4 = import_ref P//library, inst46 [no loc], unloaded +// CHECK:STDOUT: %import_ref.4 = import_ref P//library, inst47 [no loc], unloaded // CHECK:STDOUT: %import_ref.5 = import_ref P//library, loc7_16, unloaded // CHECK:STDOUT: %import_ref.6 = import_ref P//library, loc7_28, unloaded // CHECK:STDOUT: %import_ref.7: %C.type = import_ref P//library, C, loaded [template = constants.%C.generic] // CHECK:STDOUT: %import_ref.8: = import_ref P//library, loc6_19, loaded [template = constants.%complete_type.2] -// CHECK:STDOUT: %import_ref.9 = import_ref P//library, inst41 [no loc], unloaded -// CHECK:STDOUT: %import_ref.11 = import_ref Core//default, inst48 [no loc], unloaded +// CHECK:STDOUT: %import_ref.9 = import_ref P//library, inst42 [no loc], unloaded +// CHECK:STDOUT: %import_ref.11 = import_ref Core//default, inst49 [no loc], unloaded // CHECK:STDOUT: %import_ref.12: @ImplicitAs.%Convert.assoc_type (%Convert.assoc_type.1) = import_ref Core//default, loc9_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.3)] // CHECK:STDOUT: %import_ref.13 = import_ref Core//default, Convert, unloaded // CHECK:STDOUT: %import_ref.14 = import_ref Core//default, loc9_32, unloaded @@ -1191,13 +1189,15 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %return.patt: %D = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %D = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] -// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32.builtin] // CHECK:STDOUT: %P.ref.loc7: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %D.ref: type = name_ref D, imports.%import_ref.2 [template = constants.%D] // CHECK:STDOUT: %n.param: %i32.builtin = value_param runtime_param0 +// CHECK:STDOUT: %.loc7_10.3: type = splice_block %.loc7_10.2 [template = constants.%i32.builtin] { +// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32.builtin] +// CHECK:STDOUT: %.loc7_10.2: type = converted %int.make_type_signed, %.loc7_10.1 [template = constants.%i32.builtin] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32.builtin = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %D = out_param runtime_param1 // CHECK:STDOUT: %return: ref %D = return_slot %return.param diff --git a/toolchain/check/testdata/return/returned_var.carbon b/toolchain/check/testdata/return/returned_var.carbon index 6e0bae13ebf1..a13e24ea4391 100644 --- a/toolchain/check/testdata/return/returned_var.carbon +++ b/toolchain/check/testdata/return/returned_var.carbon @@ -78,7 +78,7 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %C = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %C = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %C.ref.loc16: type = name_ref C, file.%C.decl [template = constants.%C] +// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %return.param: ref %C = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C = return_slot %return.param // CHECK:STDOUT: } @@ -86,19 +86,15 @@ fn G() -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: class @C { -// 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: %.loc12: %C.elem = field_decl a, element0 [template] -// 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: %.loc13: %C.elem = field_decl b, element1 [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %struct_type.a.b.1 [template = constants.%complete_type.3] // CHECK:STDOUT: @@ -111,7 +107,6 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %return.param_patt: %C { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %C.ref.loc17: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %result: ref %C = bind_name result, %return // 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] @@ -138,8 +133,6 @@ fn G() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() -> %i32 { // CHECK:STDOUT: !entry: -// 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: %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] diff --git a/toolchain/check/testdata/return/returned_var_scope.carbon b/toolchain/check/testdata/return/returned_var_scope.carbon index 6776faa597e0..ece1b5332b3c 100644 --- a/toolchain/check/testdata/return/returned_var_scope.carbon +++ b/toolchain/check/testdata/return/returned_var_scope.carbon @@ -74,8 +74,8 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %return.param: ref %i32 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param // CHECK:STDOUT: } @@ -85,12 +85,14 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: %return.patt: %i32 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %i32 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc21_25.2: type = converted %bool.make_type, %.loc21_25.1 [template = bool] -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// 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: %b.param: bool = value_param runtime_param0 +// CHECK:STDOUT: %.loc21_25.3: type = splice_block %.loc21_25.2 [template = bool] { +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc21_25.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc21_25.2: type = converted %bool.make_type, %.loc21_25.1 [template = bool] +// CHECK:STDOUT: } // CHECK:STDOUT: %b: bool = bind_name b, %b.param // CHECK:STDOUT: %return.param: ref %i32 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %i32 = return_slot %return.param @@ -103,8 +105,6 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: if %true.loc12 br !if.then.loc12 else br !if.else.loc12 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc12: -// 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: %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] @@ -121,8 +121,6 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: if %true.loc15 br !if.then.loc15 else br !if.else.loc15 // CHECK:STDOUT: // CHECK:STDOUT: !if.then.loc15: -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%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] @@ -151,8 +149,6 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: if %b.ref br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %int_32.loc23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%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] @@ -166,8 +162,6 @@ fn EnclosingButAfter(b: bool) -> i32 { // CHECK:STDOUT: return %.loc23_18 // CHECK:STDOUT: // CHECK:STDOUT: !if.else: -// 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: %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] diff --git a/toolchain/check/testdata/struct/fail_assign_empty.carbon b/toolchain/check/testdata/struct/fail_assign_empty.carbon index 9182423b385f..285bd994a813 100644 --- a/toolchain/check/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_empty.carbon @@ -36,9 +36,6 @@ var x: {.a: i32} = {}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon index 719a4c227964..29fe517c24e1 100644 --- a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon @@ -34,8 +34,6 @@ var x: {} = {.a = 1}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc14_9.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc14_9.2: type = converted %.loc14_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %x.var: ref %empty_struct_type = var x // CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_duplicate_name.carbon b/toolchain/check/testdata/struct/fail_duplicate_name.carbon index 82e44977a043..ce8779863d80 100644 --- a/toolchain/check/testdata/struct/fail_duplicate_name.carbon +++ b/toolchain/check/testdata/struct/fail_duplicate_name.carbon @@ -103,22 +103,8 @@ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %int_32.loc27_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc27_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc27_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc27_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// 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: %int_32.loc45: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc45: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.2] // CHECK:STDOUT: %x.var: ref %struct_type.a.2 = var x // CHECK:STDOUT: %x: ref %struct_type.a.2 = bind_name x, %x.var -// CHECK:STDOUT: %int_32.loc53_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc53_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc53_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc53_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %i32} [template = constants.%struct_type.b.c] // CHECK:STDOUT: %y.var: ref %struct_type.b.c = var y // CHECK:STDOUT: %y: ref %struct_type.b.c = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon index 8a1e0bca575b..0836172189b9 100644 --- a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon @@ -45,14 +45,8 @@ var y: {.b: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var -// CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.b: type = struct_type {.b: %i32} [template = constants.%struct_type.b.2] // CHECK:STDOUT: %y.var: ref %struct_type.b.2 = var y // CHECK:STDOUT: %y: ref %struct_type.b.2 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon index a36409840143..b4d182974b0a 100644 --- a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon @@ -37,9 +37,6 @@ var x: {.a: i32} = {.b = 1.0}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_member_access_type.carbon b/toolchain/check/testdata/struct/fail_member_access_type.carbon index 2bce5ec8c957..3667d373f617 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -17,9 +17,6 @@ var y: i32 = x.b; // CHECK:STDOUT: --- fail_member_access_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: f64} [template] // CHECK:STDOUT: %float: f64 = float_literal 4 [template] // CHECK:STDOUT: %struct: %struct_type.a = struct_value (%float) [template] @@ -43,15 +40,8 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc11_13.2: type = converted %float.make_type, %.loc11_13.1 [template = f64] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: f64} [template = constants.%struct_type.a] // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var -// 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: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index bf87dd513d7c..bc66d304324a 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -48,13 +48,8 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_too_few_values.carbon b/toolchain/check/testdata/struct/fail_too_few_values.carbon index 41a1724505b8..ac4d51608b66 100644 --- a/toolchain/check/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/check/testdata/struct/fail_too_few_values.carbon @@ -37,11 +37,6 @@ var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc14_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b] // CHECK:STDOUT: %x.var: ref %struct_type.a.b = var x // CHECK:STDOUT: %x: ref %struct_type.a.b = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_type_assign.carbon b/toolchain/check/testdata/struct/fail_type_assign.carbon index fc8191ec155d..46ae6394e651 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -39,9 +39,6 @@ var x: {.a: i32} = {.a: i32}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %x.var: ref %struct_type.a = var x // CHECK:STDOUT: %x: ref %struct_type.a = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/fail_value_as_type.carbon b/toolchain/check/testdata/struct/fail_value_as_type.carbon index 0a5725a17446..0483713922be 100644 --- a/toolchain/check/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/check/testdata/struct/fail_value_as_type.carbon @@ -19,8 +19,6 @@ var x: {.a = 1}; // CHECK:STDOUT: --- fail_value_as_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: Core.IntLiteral} [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -37,9 +35,6 @@ var x: {.a = 1}; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %.loc17_15.1: %struct_type.a = struct_literal (%int_1) -// CHECK:STDOUT: %.loc17_15.2: type = converted %.loc17_15.1, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index b0a4fbae0248..811d79f230de 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -67,7 +67,6 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // 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] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %struct_type.b.c.1: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] // CHECK:STDOUT: %struct_type.a.d.1: type = struct_type {.a: %struct_type.b.c.1, .d: %i32} [template] @@ -118,33 +117,22 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %a_ref.var: ref %struct_type.a.1 = var a_ref // CHECK:STDOUT: %a_ref: ref %struct_type.a.1 = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_32: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_32: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_36.1: %tuple.type.1 = tuple_literal (%i32.loc5_32) -// CHECK:STDOUT: %.loc5_36.2: type = converted %.loc5_36.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c.1] -// CHECK:STDOUT: %int_32.loc5_44: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_44: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c.1, .d: %i32} [template = constants.%struct_type.a.d.1] // CHECK:STDOUT: %b_ref.var: ref %struct_type.a.d.1 = var b_ref // CHECK:STDOUT: %b_ref: ref %struct_type.a.d.1 = bind_name b_ref, %b_ref.var // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %S.patt.loc8_9.1: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] // CHECK:STDOUT: %S.param_patt: %struct_type.a.b.1 = value_param_pattern %S.patt.loc8_9.1, runtime_param [symbolic = %S.patt.loc8_9.2 (constants.%S.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc8_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc8_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc8_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %S.param: %struct_type.a.b.1 = value_param runtime_param +// CHECK:STDOUT: %.loc8: type = splice_block %struct_type.a.b [template = constants.%struct_type.a.b.1] { +// CHECK:STDOUT: %int_32.loc8_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc8_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc8_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc8_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] +// CHECK:STDOUT: } // CHECK:STDOUT: %S.loc8_9.1: %struct_type.a.b.1 = bind_symbolic_name S, 0, %S.param [symbolic = %S.loc8_9.2 (constants.%S)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { @@ -258,7 +246,6 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template] // CHECK:STDOUT: %struct_type.a.d.1: type = struct_type {.a: %struct_type.b.c, .d: %i32} [template] @@ -269,18 +256,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic] -// 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.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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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.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] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct) [template] @@ -300,7 +276,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.195: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.196 = import_ref Implicit//default, inst602 [no loc], unloaded +// CHECK:STDOUT: %import_ref.196 = import_ref Implicit//default, inst603 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -317,42 +293,10 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %i32} [template = constants.%struct_type.a] // CHECK:STDOUT: %a.var: ref %struct_type.a = var a // CHECK:STDOUT: %a: ref %struct_type.a = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_28: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_28: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_32.1: %tuple.type.1 = tuple_literal (%i32.loc5_28) -// CHECK:STDOUT: %.loc5_32.2: type = converted %.loc5_32.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %struct_type.b.c: type = struct_type {.b: %i32, .c: %tuple.type.2} [template = constants.%struct_type.b.c] -// CHECK:STDOUT: %int_32.loc5_40: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_40: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.d: type = struct_type {.a: %struct_type.b.c, .d: %i32} [template = constants.%struct_type.a.d.1] // CHECK:STDOUT: %b.var: ref %struct_type.a.d.1 = var b // CHECK:STDOUT: %b: ref %struct_type.a.d.1 = bind_name b, %b.var -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] -// 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: %.loc6_25.1: %struct_type.a.b.2 = struct_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc6_25.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc6_25.1: = bound_method %int_1, %impl.elem0.loc6_25.1 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc6_25.1: = specific_function %Convert.bound.loc6_25.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc6_25.1: init %i32 = call %Convert.specific_fn.loc6_25.1(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc6_25.2: %i32 = value_of_initializer %int.convert_checked.loc6_25.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc6_25.3: %i32 = converted %int_1, %.loc6_25.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc6_25.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc6_25.2: = bound_method %int_2, %impl.elem0.loc6_25.2 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc6_25.2: = specific_function %Convert.bound.loc6_25.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc6_25.2: init %i32 = call %Convert.specific_fn.loc6_25.2(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc6_25.4: %i32 = value_of_initializer %int.convert_checked.loc6_25.2 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc6_25.5: %i32 = converted %int_2, %.loc6_25.4 [template = constants.%int_2.2] -// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc6_25.3, %.loc6_25.5) [template = constants.%struct] -// CHECK:STDOUT: %.loc6_26: %struct_type.a.b.1 = converted %.loc6_25.1, %struct [template = constants.%struct] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.2] // CHECK:STDOUT: %c.var: ref %C.2 = var c // CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var // CHECK:STDOUT: } @@ -434,9 +378,6 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %S: %struct_type.a.b = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %S.patt: %struct_type.a.b = symbolic_binding_pattern S, 0 [symbolic] -// 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.c.d: type = struct_type {.c: Core.IntLiteral, .d: Core.IntLiteral} [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] @@ -455,7 +396,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.194: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst602 [no loc], unloaded +// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst603 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -470,10 +411,6 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] -// 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: %.loc11: %struct_type.c.d = struct_literal (%int_1, %int_2) // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } @@ -526,18 +463,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %i32} [template] // CHECK:STDOUT: %S: %struct_type.a.b.1 = bind_symbolic_name S, 0 [symbolic] // CHECK:STDOUT: %S.patt: %struct_type.a.b.1 = symbolic_binding_pattern S, 0 [symbolic] -// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %struct_type.a.b.2: type = struct_type {.a: Core.IntLiteral, .b: 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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [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: %Convert.bound.2: = bound_method %int_4.1, %Convert.10 [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: %struct.1: %struct_type.a.b.1 = struct_value (%int_3.2, %int_4.2) [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%struct.1) [template] @@ -560,7 +486,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.194: = import_ref Implicit//default, loc8_34, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst602 [no loc], unloaded +// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst603 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -575,25 +501,6 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %.loc9_29.1: %struct_type.a.b.2 = struct_literal (%int_3, %int_4) -// CHECK:STDOUT: %impl.elem0.loc9_29.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc9_29.1: = bound_method %int_3, %impl.elem0.loc9_29.1 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc9_29.1: = specific_function %Convert.bound.loc9_29.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc9_29.1: init %i32 = call %Convert.specific_fn.loc9_29.1(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc9_29.2: %i32 = value_of_initializer %int.convert_checked.loc9_29.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc9_29.3: %i32 = converted %int_3, %.loc9_29.2 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc9_29.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc9_29.2: = bound_method %int_4, %impl.elem0.loc9_29.2 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc9_29.2: = specific_function %Convert.bound.loc9_29.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc9_29.2: init %i32 = call %Convert.specific_fn.loc9_29.2(%int_4) [template = constants.%int_4.2] -// CHECK:STDOUT: %.loc9_29.4: %i32 = value_of_initializer %int.convert_checked.loc9_29.2 [template = constants.%int_4.2] -// CHECK:STDOUT: %.loc9_29.5: %i32 = converted %int_4, %.loc9_29.4 [template = constants.%int_4.2] -// CHECK:STDOUT: %struct: %struct_type.a.b.1 = struct_value (%.loc9_29.3, %.loc9_29.5) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc9_30: %struct_type.a.b.1 = converted %.loc9_29.1, %struct [template = constants.%struct.1] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.2] // CHECK:STDOUT: %c_bad.var: ref %C.2 = var c_bad // CHECK:STDOUT: %c_bad: ref %C.2 = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index 22065dfc41a5..b1a9867dca1c 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -15,9 +15,6 @@ var z: i32 = y; // CHECK:STDOUT: --- member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template] -// CHECK:STDOUT: %Float.type: type = fn_type @Float [template] -// CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: f64, .b: %i32} [template] @@ -52,21 +49,10 @@ var z: i32 = y; // CHECK:STDOUT: .z = %z // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] -// CHECK:STDOUT: %.loc11_13.1: type = value_of_initializer %float.make_type [template = f64] -// CHECK:STDOUT: %.loc11_13.2: type = converted %float.make_type, %.loc11_13.1 [template = f64] -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: f64, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var -// 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: %y.var: ref %i32 = var y // CHECK:STDOUT: %y: ref %i32 = bind_name y, %y.var -// 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: %z.var: ref %i32 = var z // CHECK:STDOUT: %z: ref %i32 = bind_name z, %z.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/nested_struct_in_place.carbon b/toolchain/check/testdata/struct/nested_struct_in_place.carbon index 87ae9e4f1f64..ccb87b64c7a4 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -65,23 +65,6 @@ fn G() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_26: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_26: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_29.1: %tuple.type.1 = tuple_literal (%i32.loc14_16, %i32.loc14_21, %i32.loc14_26) -// CHECK:STDOUT: %.loc14_29.2: type = converted %.loc14_29.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %int_32.loc14_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_42: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_42: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_47: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_47: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_50.1: %tuple.type.1 = tuple_literal (%i32.loc14_37, %i32.loc14_42, %i32.loc14_47) -// CHECK:STDOUT: %.loc14_50.2: type = converted %.loc14_50.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %tuple.type.2, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %v.var: ref %struct_type.a.b.1 = var v // CHECK:STDOUT: %v: ref %struct_type.a.b.1 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14_61: %F.type = name_ref F, file.%F.decl [template = constants.%F] diff --git a/toolchain/check/testdata/struct/no_prelude/empty.carbon b/toolchain/check/testdata/struct/no_prelude/empty.carbon index c136b2bf7037..9ca51695ec90 100644 --- a/toolchain/check/testdata/struct/no_prelude/empty.carbon +++ b/toolchain/check/testdata/struct/no_prelude/empty.carbon @@ -23,12 +23,8 @@ var y: {} = x; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_9.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %x.var: ref %empty_struct_type = var x // CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_9.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %y.var: ref %empty_struct_type = var y // CHECK:STDOUT: %y: ref %empty_struct_type = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon b/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon index ff6e657f8057..89361dd98645 100644 --- a/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon +++ b/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon @@ -25,9 +25,6 @@ var x: {.a: {}} = {.b = {}}; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_14.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc14_14.2: type = converted %.loc14_14.1, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_struct_type} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon b/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon index b518bdb80249..8306852ac7b0 100644 --- a/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon @@ -24,7 +24,6 @@ var p: Incomplete* = &s.a; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %Incomplete} [template] // CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -35,12 +34,8 @@ var p: Incomplete* = &s.a; // CHECK:STDOUT: .p = %p // CHECK:STDOUT: } // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} -// CHECK:STDOUT: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %Incomplete} [template = constants.%struct_type.a] // CHECK:STDOUT: %s.var: ref = var s // CHECK:STDOUT: %s: ref = bind_name s, %s.var -// CHECK:STDOUT: %Incomplete.ref.loc21: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template = constants.%ptr] // CHECK:STDOUT: %p.var: ref %ptr = var p // CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/one_entry.carbon b/toolchain/check/testdata/struct/one_entry.carbon index 03503357507e..30dfbbe54e6f 100644 --- a/toolchain/check/testdata/struct/one_entry.carbon +++ b/toolchain/check/testdata/struct/one_entry.carbon @@ -45,14 +45,8 @@ var y: {.a: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.loc11: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.1 = bind_name x, %x.var -// 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: %struct_type.a.loc12: type = struct_type {.a: %i32} [template = constants.%struct_type.a.1] // CHECK:STDOUT: %y.var: ref %struct_type.a.1 = var y // CHECK:STDOUT: %y: ref %struct_type.a.1 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/partially_const.carbon b/toolchain/check/testdata/struct/partially_const.carbon index b6173a93ccaf..05ef1be1b068 100644 --- a/toolchain/check/testdata/struct/partially_const.carbon +++ b/toolchain/check/testdata/struct/partially_const.carbon @@ -52,8 +52,6 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %return.patt: %struct_type.a.b.c.1 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %struct_type.a.b.c.1 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] // CHECK:STDOUT: %i32.loc11_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %int_32.loc11_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] @@ -62,6 +60,10 @@ fn Make(n: i32) -> {.a: i32, .b: i32, .c: i32} { // CHECK:STDOUT: %i32.loc11_43: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [template = constants.%struct_type.a.b.c.1] // CHECK:STDOUT: %n.param: %i32 = value_param runtime_param0 +// CHECK:STDOUT: %.loc11: type = splice_block %i32.loc11_12 [template = constants.%i32] { +// CHECK:STDOUT: %int_32.loc11_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc11_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: } // CHECK:STDOUT: %n: %i32 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %struct_type.a.b.c.1 = out_param runtime_param1 // CHECK:STDOUT: %return: ref %struct_type.a.b.c.1 = return_slot %return.param diff --git a/toolchain/check/testdata/struct/reorder_fields.carbon b/toolchain/check/testdata/struct/reorder_fields.carbon index cb790a47f455..de946a0d9284 100644 --- a/toolchain/check/testdata/struct/reorder_fields.carbon +++ b/toolchain/check/testdata/struct/reorder_fields.carbon @@ -76,13 +76,13 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %return.patt: %struct_type.a.b = return_slot_pattern // CHECK:STDOUT: %return.param_patt: %struct_type.a.b = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { -// 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: %int_64.loc14: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc14: init type = call constants.%Float(%int_64.loc14) [template = f64] -// CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %float.make_type.loc14 [template = f64] -// CHECK:STDOUT: %.loc14_25.2: type = converted %float.make_type.loc14, %.loc14_25.1 [template = f64] -// CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: f64} [template = constants.%struct_type.a.b] +// 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: %int_64: Core.IntLiteral = int_value 64 [template = constants.%int_64] +// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%int_64) [template = f64] +// CHECK:STDOUT: %.loc14_25.1: type = value_of_initializer %float.make_type [template = f64] +// CHECK:STDOUT: %.loc14_25.2: type = converted %float.make_type, %.loc14_25.1 [template = f64] +// CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: %i32, .b: f64} [template = constants.%struct_type.a.b] // CHECK:STDOUT: %return.param: ref %struct_type.a.b = out_param runtime_param0 // CHECK:STDOUT: %return: ref %struct_type.a.b = return_slot %return.param // CHECK:STDOUT: } @@ -94,13 +94,6 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: // CHECK:STDOUT: fn @F() -> %return.param_patt: %struct_type.a.b { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc15: init type = call constants.%Float(%int_64.loc15) [template = f64] -// CHECK:STDOUT: %.loc15_24.1: type = value_of_initializer %float.make_type.loc15 [template = f64] -// CHECK:STDOUT: %.loc15_24.2: type = converted %float.make_type.loc15, %.loc15_24.1 [template = f64] -// CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: f64} [template = constants.%struct_type.a.b] // CHECK:STDOUT: %MakeF64.ref: %MakeF64.type = name_ref MakeF64, file.%MakeF64.decl [template = constants.%MakeF64] // CHECK:STDOUT: %MakeF64.call: init f64 = call %MakeF64.ref() // CHECK:STDOUT: %MakeI32.ref: %MakeI32.type = name_ref MakeI32, file.%MakeI32.decl [template = constants.%MakeI32] @@ -113,13 +106,6 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %struct.loc15: %struct_type.a.b = struct_value (%.loc15_62.3, %.loc15_62.5) // CHECK:STDOUT: %.loc15_63: %struct_type.a.b = converted %.loc15_62.1, %struct.loc15 // CHECK:STDOUT: %x: %struct_type.a.b = bind_name x, %.loc15_63 -// CHECK:STDOUT: %int_64.loc16: Core.IntLiteral = int_value 64 [template = constants.%int_64] -// CHECK:STDOUT: %float.make_type.loc16: init type = call constants.%Float(%int_64.loc16) [template = f64] -// CHECK:STDOUT: %.loc16_15.1: type = value_of_initializer %float.make_type.loc16 [template = f64] -// CHECK:STDOUT: %.loc16_15.2: type = converted %float.make_type.loc16, %.loc16_15.1 [template = f64] -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.b.a: type = struct_type {.b: f64, .a: %i32} [template = constants.%struct_type.b.a] // CHECK:STDOUT: %x.ref: %struct_type.a.b = name_ref x, %x // CHECK:STDOUT: %.loc16_31.1: f64 = struct_access %x.ref, element1 // CHECK:STDOUT: %.loc16_31.2: %i32 = struct_access %x.ref, element0 diff --git a/toolchain/check/testdata/struct/tuple_as_element.carbon b/toolchain/check/testdata/struct/tuple_as_element.carbon index d70c4f22c747..4b6997fab31d 100644 --- a/toolchain/check/testdata/struct/tuple_as_element.carbon +++ b/toolchain/check/testdata/struct/tuple_as_element.carbon @@ -16,7 +16,6 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %struct_type.a.b.1: type = struct_type {.a: %i32, .b: %tuple.type.2} [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] @@ -53,22 +52,8 @@ var y: {.a: i32, .b: (i32,)} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_27.1: %tuple.type.1 = tuple_literal (%i32.loc11_23) -// CHECK:STDOUT: %.loc11_27.2: type = converted %.loc11_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %struct_type.a.b.loc11: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var -// CHECK:STDOUT: %int_32.loc12_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc12_23: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_23: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_27.1: %tuple.type.1 = tuple_literal (%i32.loc12_23) -// CHECK:STDOUT: %.loc12_27.2: type = converted %.loc12_27.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %tuple.type.2} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %y.var: ref %struct_type.a.b.1 = var y // CHECK:STDOUT: %y: ref %struct_type.a.b.1 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/struct/two_entries.carbon b/toolchain/check/testdata/struct/two_entries.carbon index 5fd7c423ccd5..92af23fb75b2 100644 --- a/toolchain/check/testdata/struct/two_entries.carbon +++ b/toolchain/check/testdata/struct/two_entries.carbon @@ -54,28 +54,8 @@ var y: {.a: i32, .b: i32} = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.loc11: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] -// CHECK:STDOUT: %int_32.loc12_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc12_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] -// CHECK:STDOUT: %int_32.loc14_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %x.var: ref %struct_type.a.b.1 = var x // CHECK:STDOUT: %x: ref %struct_type.a.b.1 = bind_name x, %x.var -// CHECK:STDOUT: %int_32.loc15_13: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_13: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc15_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: %i32} [template = constants.%struct_type.a.b.1] // CHECK:STDOUT: %y.var: ref %struct_type.a.b.1 = var y // CHECK:STDOUT: %y: ref %struct_type.a.b.1 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/element_access.carbon b/toolchain/check/testdata/tuple/access/element_access.carbon index 98cac2e6fdf2..c6c7361b5d45 100644 --- a/toolchain/check/testdata/tuple/access/element_access.carbon +++ b/toolchain/check/testdata/tuple/access/element_access.carbon @@ -17,7 +17,6 @@ var c: i32 = b.0; // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -49,20 +48,10 @@ var c: i32 = b.0; // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%i32.loc11) -// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %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: %.loc12_13.1: %tuple.type.1 = tuple_literal (%i32.loc12) -// CHECK:STDOUT: %.loc12_13.2: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var -// CHECK:STDOUT: %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: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_access_error.carbon b/toolchain/check/testdata/tuple/access/fail_access_error.carbon index c8a6cbf34d4e..34865334cc09 100644 --- a/toolchain/check/testdata/tuple/access/fail_access_error.carbon +++ b/toolchain/check/testdata/tuple/access/fail_access_error.carbon @@ -19,7 +19,6 @@ var b: i32 = a.(oops); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] @@ -53,16 +52,8 @@ var b: i32 = a.(oops); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_large_index.carbon b/toolchain/check/testdata/tuple/access/fail_large_index.carbon index 8f2ca20ac609..e2769558ff39 100644 --- a/toolchain/check/testdata/tuple/access/fail_large_index.carbon +++ b/toolchain/check/testdata/tuple/access/fail_large_index.carbon @@ -25,7 +25,6 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -59,24 +58,12 @@ var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%i32.loc11) -// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %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: %.loc12_13.1: %tuple.type.1 = tuple_literal (%i32.loc12) -// CHECK:STDOUT: %.loc12_13.2: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %b.var: ref %tuple.type.2 = var b // CHECK:STDOUT: %b: ref %tuple.type.2 = bind_name b, %b.var -// CHECK:STDOUT: %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: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var -// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon index 2d6290bd0850..f358890dcb2a 100644 --- a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon @@ -19,7 +19,6 @@ var b: i32 = a.(-10); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] @@ -55,16 +54,8 @@ var b: i32 = a.(-10); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon index c58c71b7d95e..e62614306555 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon @@ -20,7 +20,6 @@ var c: i32 = a.(b); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] @@ -59,20 +58,10 @@ var c: i32 = a.(b); // CHECK:STDOUT: .c = %c // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %c.var: ref %i32 = var c // CHECK:STDOUT: %c: ref %i32 = bind_name c, %c.var // CHECK:STDOUT: } 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 d93c84e75b25..f61d58fac4f8 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -22,7 +22,6 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] @@ -57,16 +56,8 @@ var b: i32 = a.(2.6); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } 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 9ea058c14ccd..f0b214a67a69 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon @@ -68,10 +68,6 @@ fn Main() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %int_0.loc16: Core.IntLiteral = int_value 0 [template = constants.%int_0] // CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [template = constants.%int_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: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %array_type: type = array_type %int_2, %i32 [template = constants.%array_type] // CHECK:STDOUT: %non_tuple.var: ref %array_type = var non_tuple // CHECK:STDOUT: %non_tuple: ref %array_type = bind_name non_tuple, %non_tuple.var // CHECK:STDOUT: %int_5.loc18_30: Core.IntLiteral = int_value 5 [template = constants.%int_5.1] @@ -96,8 +92,6 @@ fn Main() { // CHECK:STDOUT: %.loc18_34.8: init %array_type = array_init (%.loc18_34.4, %.loc18_34.7) to %non_tuple.var [template = constants.%array] // CHECK:STDOUT: %.loc18_35: init %array_type = converted %.loc18_34.1, %.loc18_34.8 [template = constants.%array] // CHECK:STDOUT: assign %non_tuple.var, %.loc18_35 -// 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: %first.var: ref %i32 = var first // CHECK:STDOUT: %first: ref %i32 = bind_name first, %first.var // CHECK:STDOUT: %non_tuple.ref: ref %array_type = name_ref non_tuple, %non_tuple 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 4e42dbddd939..7607c1f52600 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 @@ -19,7 +19,6 @@ var b: i32 = a.2; // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_6.1: Core.IntLiteral = int_value 6 [template] @@ -54,16 +53,8 @@ var b: i32 = a.2; // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon index 6e1d4d68c4d1..1993c1859c3e 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 @@ -19,7 +19,6 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] // CHECK:STDOUT: %int_34.1: Core.IntLiteral = int_value 34 [template] @@ -56,16 +55,8 @@ var b: i32 = a.({.index = 2}.index); // CHECK:STDOUT: .b = %b // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] // CHECK:STDOUT: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/access/index_not_literal.carbon b/toolchain/check/testdata/tuple/access/index_not_literal.carbon index 6e45793f2a6c..e9a59558c22d 100644 --- a/toolchain/check/testdata/tuple/access/index_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/index_not_literal.carbon @@ -16,11 +16,8 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: --- index_not_literal.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (bool, %i32) [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] // CHECK:STDOUT: %int_34.1: Core.IntLiteral = int_value 34 [template] @@ -79,26 +76,12 @@ var d: i32 = a.({.index = 1 as i32}.index); // CHECK:STDOUT: .d = %d // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %bool.make_type.loc11: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18.1: %tuple.type.1 = tuple_literal (%bool.make_type.loc11, %i32.loc11) -// CHECK:STDOUT: %.loc11_18.2: type = value_of_initializer %bool.make_type.loc11 [template = bool] -// CHECK:STDOUT: %.loc11_18.3: type = converted %bool.make_type.loc11, %.loc11_18.2 [template = bool] -// CHECK:STDOUT: %.loc11_18.4: type = converted %.loc11_18.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %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: %b.var: ref %i32 = var b // CHECK:STDOUT: %b: ref %i32 = bind_name b, %b.var -// CHECK:STDOUT: %bool.make_type.loc13: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc13_8.1: type = value_of_initializer %bool.make_type.loc13 [template = bool] -// CHECK:STDOUT: %.loc13_8.2: type = converted %bool.make_type.loc13, %.loc13_8.1 [template = bool] // CHECK:STDOUT: %c.var: ref bool = var c // CHECK:STDOUT: %c: ref bool = bind_name c, %c.var -// 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: %d.var: ref %i32 = var d // CHECK:STDOUT: %d: ref %i32 = bind_name d, %d.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_assign_nested.carbon b/toolchain/check/testdata/tuple/fail_assign_nested.carbon index cb2450977b11..13beb1215939 100644 --- a/toolchain/check/testdata/tuple/fail_assign_nested.carbon +++ b/toolchain/check/testdata/tuple/fail_assign_nested.carbon @@ -18,8 +18,6 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%tuple.type.1, %tuple.type.1) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.3, %tuple.type.3) [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] @@ -46,20 +44,6 @@ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc14_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_18: %tuple.type.1 = tuple_literal (%i32.loc14_10, %i32.loc14_15) -// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_30: %tuple.type.1 = tuple_literal (%i32.loc14_22, %i32.loc14_27) -// CHECK:STDOUT: %.loc14_31.1: %tuple.type.2 = tuple_literal (%.loc14_18, %.loc14_30) -// CHECK:STDOUT: %.loc14_31.2: type = converted %.loc14_18, constants.%tuple.type.3 [template = constants.%tuple.type.3] -// CHECK:STDOUT: %.loc14_31.3: type = converted %.loc14_30, constants.%tuple.type.3 [template = constants.%tuple.type.3] -// CHECK:STDOUT: %.loc14_31.4: type = converted %.loc14_31.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] // CHECK:STDOUT: %x.var: ref %tuple.type.4 = var x // CHECK:STDOUT: %x: ref %tuple.type.4 = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index e90255e4e713..4eddc80f9534 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -21,7 +21,6 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %float: f64 = float_literal 65.890000000000001 [template] @@ -50,12 +49,6 @@ var x: (i32, i32) = (2, 65.89); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc17_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc17_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc17_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc17_17.1: %tuple.type.1 = tuple_literal (%i32.loc17_9, %i32.loc17_14) -// CHECK:STDOUT: %.loc17_17.2: type = converted %.loc17_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon index 4db900e89f70..680fcaad880c 100644 --- a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon @@ -24,10 +24,6 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: // CHECK:STDOUT: constants { // CHECK:STDOUT: %Incomplete: type = class_type @Incomplete [template] -// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] -// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %Incomplete) [template] // CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template] // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: } @@ -49,15 +45,8 @@ var p: Incomplete* = &t[1]; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Incomplete.decl: type = class_decl @Incomplete [template = constants.%Incomplete] {} {} -// 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: %Incomplete.ref.loc19: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %.loc19_24.1: %tuple.type.1 = tuple_literal (%i32, %Incomplete.ref.loc19) -// CHECK:STDOUT: %.loc19_24.2: type = converted %.loc19_24.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %t.var: ref = var t // CHECK:STDOUT: %t: ref = bind_name t, %t.var -// CHECK:STDOUT: %Incomplete.ref.loc21: type = name_ref Incomplete, %Incomplete.decl [template = constants.%Incomplete] -// CHECK:STDOUT: %ptr: type = ptr_type %Incomplete [template = constants.%ptr] // CHECK:STDOUT: %p.var: ref %ptr = var p // CHECK:STDOUT: %p: ref %ptr = bind_name p, %p.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_too_few_element.carbon b/toolchain/check/testdata/tuple/fail_too_few_element.carbon index 386963a35ada..09a838692fd2 100644 --- a/toolchain/check/testdata/tuple/fail_too_few_element.carbon +++ b/toolchain/check/testdata/tuple/fail_too_few_element.carbon @@ -18,7 +18,6 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -38,12 +37,6 @@ var x: (i32, i32) = (2, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%i32.loc14_9, %i32.loc14_14) -// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_type_assign.carbon b/toolchain/check/testdata/tuple/fail_type_assign.carbon index b35fd146b08e..642cdb3420fa 100644 --- a/toolchain/check/testdata/tuple/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuple/fail_type_assign.carbon @@ -40,10 +40,6 @@ var x: (i32, ) = (i32, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// 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: %.loc17_14.1: %tuple.type.1 = tuple_literal (%i32) -// CHECK:STDOUT: %.loc17_14.2: type = converted %.loc17_14.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/fail_value_as_type.carbon b/toolchain/check/testdata/tuple/fail_value_as_type.carbon index ad24527852d6..e3db2175a08d 100644 --- a/toolchain/check/testdata/tuple/fail_value_as_type.carbon +++ b/toolchain/check/testdata/tuple/fail_value_as_type.carbon @@ -19,8 +19,6 @@ var x: (1, ); // CHECK:STDOUT: --- fail_value_as_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -37,9 +35,6 @@ var x: (1, ); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %.loc17_12.1: %tuple.type = tuple_literal (%int_1) -// CHECK:STDOUT: %.loc17_12.2: type = converted %int_1, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 32a90df4b979..621d60e8b521 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -58,7 +58,6 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %int_0.1: Core.IntLiteral = int_value 0 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -70,9 +69,7 @@ var c_bad: C((3, 4)) = F(); // 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] -// CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.1, type) [template] // CHECK:STDOUT: %tuple.type.5: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.6: type = tuple_type (%tuple.type.4, %tuple.type.5) [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%tuple.type.2, %i32) [template] // CHECK:STDOUT: %tuple.type.8: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.9: type = tuple_type (%tuple.type.7, %tuple.type.8) [template] @@ -125,41 +122,23 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: .F = %F.decl // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_17.1: %tuple.type.1 = tuple_literal (%i32.loc4) -// CHECK:STDOUT: %.loc4_17.2: type = converted %.loc4_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a_ref.var: ref %tuple.type.2 = var a_ref // CHECK:STDOUT: %a_ref: ref %tuple.type.2 = bind_name a_ref, %a_ref.var -// CHECK:STDOUT: %int_32.loc5_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19: %tuple.type.1 = tuple_literal (%i32.loc5_15) -// CHECK:STDOUT: %int_32.loc5_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_25: %tuple.type.4 = tuple_literal (%.loc5_19, %i32.loc5_22) -// CHECK:STDOUT: %int_32.loc5_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_37: %tuple.type.5 = tuple_literal (%i32.loc5_29, %i32.loc5_34) -// CHECK:STDOUT: %.loc5_38.1: %tuple.type.6 = tuple_literal (%.loc5_25, %.loc5_37) -// CHECK:STDOUT: %.loc5_38.2: type = converted %.loc5_19, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc5_38.3: type = converted %.loc5_25, constants.%tuple.type.7 [template = constants.%tuple.type.7] -// CHECK:STDOUT: %.loc5_38.4: type = converted %.loc5_37, constants.%tuple.type.8 [template = constants.%tuple.type.8] -// CHECK:STDOUT: %.loc5_38.5: type = converted %.loc5_38.1, constants.%tuple.type.9 [template = constants.%tuple.type.9] // CHECK:STDOUT: %b_ref.var: ref %tuple.type.9 = var b_ref // CHECK:STDOUT: %b_ref: ref %tuple.type.9 = bind_name b_ref, %b_ref.var // CHECK:STDOUT: %C.decl: %C.type = class_decl @C [template = constants.%C.generic] { // CHECK:STDOUT: %X.patt.loc7_9.1: %tuple.type.8 = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] // CHECK:STDOUT: %X.param_patt: %tuple.type.8 = value_param_pattern %X.patt.loc7_9.1, runtime_param [symbolic = %X.patt.loc7_9.2 (constants.%X.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %int_32.loc7_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_22.1: %tuple.type.5 = tuple_literal (%i32.loc7_14, %i32.loc7_19) -// CHECK:STDOUT: %.loc7_22.2: type = converted %.loc7_22.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] // CHECK:STDOUT: %X.param: %tuple.type.8 = value_param runtime_param +// CHECK:STDOUT: %.loc7_22.3: type = splice_block %.loc7_22.2 [template = constants.%tuple.type.8] { +// CHECK:STDOUT: %int_32.loc7_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %int_32.loc7_19: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc7_19: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc7_22.1: %tuple.type.5 = tuple_literal (%i32.loc7_14, %i32.loc7_19) +// CHECK:STDOUT: %.loc7_22.2: type = converted %.loc7_22.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] +// CHECK:STDOUT: } // CHECK:STDOUT: %X.loc7_9.1: %tuple.type.8 = bind_symbolic_name X, 0, %X.param [symbolic = %X.loc7_9.2 (constants.%X)] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { @@ -284,11 +263,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] -// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.1, type) [template] -// CHECK:STDOUT: %tuple.type.4: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.5: type = tuple_type (%tuple.type.3, %tuple.type.4) [template] // CHECK:STDOUT: %tuple.type.6: type = tuple_type (%tuple.type.2, %i32) [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.8: type = tuple_type (%tuple.type.6, %tuple.type.7) [template] @@ -298,18 +273,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %complete_type.3: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %X: %tuple.type.7 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.7 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %tuple.type.10: type = tuple_type (Core.IntLiteral, 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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_1.1, %Convert.10 [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.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.7 = tuple_value (%int_1.2, %int_2.2) [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%tuple) [template] @@ -329,7 +293,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.195: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.196 = import_ref Implicit//default, inst637 [no loc], unloaded +// CHECK:STDOUT: %import_ref.196 = import_ref Implicit//default, inst638 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -346,49 +310,10 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc4: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc4: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_13.1: %tuple.type.1 = tuple_literal (%i32.loc4) -// CHECK:STDOUT: %.loc4_13.2: type = converted %.loc4_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %a.var: ref %tuple.type.2 = var a // CHECK:STDOUT: %a: ref %tuple.type.2 = bind_name a, %a.var -// CHECK:STDOUT: %int_32.loc5_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_15: %tuple.type.1 = tuple_literal (%i32.loc5_11) -// CHECK:STDOUT: %int_32.loc5_18: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_18: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_21: %tuple.type.3 = tuple_literal (%.loc5_15, %i32.loc5_18) -// CHECK:STDOUT: %int_32.loc5_25: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_25: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc5_30: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc5_30: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc5_33: %tuple.type.4 = tuple_literal (%i32.loc5_25, %i32.loc5_30) -// CHECK:STDOUT: %.loc5_34.1: %tuple.type.5 = tuple_literal (%.loc5_21, %.loc5_33) -// CHECK:STDOUT: %.loc5_34.2: type = converted %.loc5_15, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc5_34.3: type = converted %.loc5_21, constants.%tuple.type.6 [template = constants.%tuple.type.6] -// CHECK:STDOUT: %.loc5_34.4: type = converted %.loc5_33, constants.%tuple.type.7 [template = constants.%tuple.type.7] -// CHECK:STDOUT: %.loc5_34.5: type = converted %.loc5_34.1, constants.%tuple.type.8 [template = constants.%tuple.type.8] // CHECK:STDOUT: %b.var: ref %tuple.type.8 = var b // CHECK:STDOUT: %b: ref %tuple.type.8 = bind_name b, %b.var -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] -// 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: %.loc6_15.1: %tuple.type.10 = tuple_literal (%int_1, %int_2) -// CHECK:STDOUT: %impl.elem0.loc6_15.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc6_15.1: = bound_method %int_1, %impl.elem0.loc6_15.1 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc6_15.1: = specific_function %Convert.bound.loc6_15.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc6_15.1: init %i32 = call %Convert.specific_fn.loc6_15.1(%int_1) [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc6_15.2: %i32 = value_of_initializer %int.convert_checked.loc6_15.1 [template = constants.%int_1.2] -// CHECK:STDOUT: %.loc6_15.3: %i32 = converted %int_1, %.loc6_15.2 [template = constants.%int_1.2] -// CHECK:STDOUT: %impl.elem0.loc6_15.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc6_15.2: = bound_method %int_2, %impl.elem0.loc6_15.2 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc6_15.2: = specific_function %Convert.bound.loc6_15.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc6_15.2: init %i32 = call %Convert.specific_fn.loc6_15.2(%int_2) [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc6_15.4: %i32 = value_of_initializer %int.convert_checked.loc6_15.2 [template = constants.%int_2.2] -// CHECK:STDOUT: %.loc6_15.5: %i32 = converted %int_2, %.loc6_15.4 [template = constants.%int_2.2] -// CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.loc6_15.3, %.loc6_15.5) [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_16: %tuple.type.7 = converted %.loc6_15.1, %tuple [template = constants.%tuple] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple) [template = constants.%C.2] // CHECK:STDOUT: %c.var: ref %C.2 = var c // CHECK:STDOUT: %c: ref %C.2 = bind_name c, %c.var // CHECK:STDOUT: } @@ -478,10 +403,6 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] -// CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %int_2.2: %i32 = int_value 2 [template] @@ -500,7 +421,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.194: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst637 [no loc], unloaded +// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst638 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -515,11 +436,6 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] -// 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: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %.loc12: %tuple.type.2 = tuple_literal (%int_1, %int_2, %int_3) // CHECK:STDOUT: %c_bad.var: ref = var c_bad // CHECK:STDOUT: %c_bad: ref = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } @@ -572,18 +488,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %tuple.type.1: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %X: %tuple.type.1 = bind_symbolic_name X, 0 [symbolic] // CHECK:STDOUT: %X.patt: %tuple.type.1 = symbolic_binding_pattern X, 0 [symbolic] -// CHECK:STDOUT: %int_3.1: Core.IntLiteral = int_value 3 [template] -// CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (Core.IntLiteral, 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.5: = interface_witness (%Convert.10) [template] -// CHECK:STDOUT: %Convert.bound.1: = bound_method %int_3.1, %Convert.10 [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: %Convert.bound.2: = bound_method %int_4.1, %Convert.10 [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: %tuple.1: %tuple.type.1 = tuple_value (%int_3.2, %int_4.2) [template] // CHECK:STDOUT: %C.2: type = class_type @C, @C(%tuple.1) [template] @@ -606,7 +511,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: import Core//prelude/... // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.194: = import_ref Implicit//default, loc7_26, loaded [template = constants.%complete_type.3] -// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst637 [no loc], unloaded +// CHECK:STDOUT: %import_ref.195 = import_ref Implicit//default, inst638 [no loc], unloaded // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -621,25 +526,6 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C.generic] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3.1] -// CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [template = constants.%int_4.1] -// CHECK:STDOUT: %.loc10_19.1: %tuple.type.2 = tuple_literal (%int_3, %int_4) -// CHECK:STDOUT: %impl.elem0.loc10_19.1: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc10_19.1: = bound_method %int_3, %impl.elem0.loc10_19.1 [template = constants.%Convert.bound.1] -// CHECK:STDOUT: %Convert.specific_fn.loc10_19.1: = specific_function %Convert.bound.loc10_19.1, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.1] -// CHECK:STDOUT: %int.convert_checked.loc10_19.1: init %i32 = call %Convert.specific_fn.loc10_19.1(%int_3) [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc10_19.2: %i32 = value_of_initializer %int.convert_checked.loc10_19.1 [template = constants.%int_3.2] -// CHECK:STDOUT: %.loc10_19.3: %i32 = converted %int_3, %.loc10_19.2 [template = constants.%int_3.2] -// CHECK:STDOUT: %impl.elem0.loc10_19.2: %Convert.type.9 = interface_witness_access constants.%interface.5, element0 [template = constants.%Convert.10] -// CHECK:STDOUT: %Convert.bound.loc10_19.2: = bound_method %int_4, %impl.elem0.loc10_19.2 [template = constants.%Convert.bound.2] -// CHECK:STDOUT: %Convert.specific_fn.loc10_19.2: = specific_function %Convert.bound.loc10_19.2, @Convert.2(constants.%int_32) [template = constants.%Convert.specific_fn.2] -// CHECK:STDOUT: %int.convert_checked.loc10_19.2: init %i32 = call %Convert.specific_fn.loc10_19.2(%int_4) [template = constants.%int_4.2] -// CHECK:STDOUT: %.loc10_19.4: %i32 = value_of_initializer %int.convert_checked.loc10_19.2 [template = constants.%int_4.2] -// CHECK:STDOUT: %.loc10_19.5: %i32 = converted %int_4, %.loc10_19.4 [template = constants.%int_4.2] -// CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc10_19.3, %.loc10_19.5) [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc10_20: %tuple.type.1 = converted %.loc10_19.1, %tuple [template = constants.%tuple.1] -// CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.1) [template = constants.%C.2] // CHECK:STDOUT: %c_bad.var: ref %C.2 = var c_bad // CHECK:STDOUT: %c_bad: ref %C.2 = bind_name c_bad, %c_bad.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/nested_tuple.carbon b/toolchain/check/testdata/tuple/nested_tuple.carbon index 1ead3759c074..329883656d7e 100644 --- a/toolchain/check/testdata/tuple/nested_tuple.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple.carbon @@ -15,8 +15,6 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] -// CHECK:STDOUT: %tuple.type.2: type = tuple_type (%tuple.type.1, type) [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.3, %i32) [template] // CHECK:STDOUT: %int_12.1: Core.IntLiteral = int_value 12 [template] @@ -56,16 +54,6 @@ var x: ((i32, i32), i32) = ((12, 76), 6); // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_10: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_10: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_18: %tuple.type.1 = tuple_literal (%i32.loc11_10, %i32.loc11_15) -// CHECK:STDOUT: %int_32.loc11_21: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_21: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.1: %tuple.type.2 = tuple_literal (%.loc11_18, %i32.loc11_21) -// CHECK:STDOUT: %.loc11_24.2: type = converted %.loc11_18, constants.%tuple.type.3 [template = constants.%tuple.type.3] -// CHECK:STDOUT: %.loc11_24.3: type = converted %.loc11_24.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] // CHECK:STDOUT: %x.var: ref %tuple.type.4 = var x // CHECK:STDOUT: %x: ref %tuple.type.4 = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon index 3b9604201bf2..7cdbaa3cde80 100644 --- a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon @@ -29,11 +29,9 @@ fn H() { // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] -// CHECK:STDOUT: %tuple.type.3: type = tuple_type (%tuple.type.1, %tuple.type.1) [template] // CHECK:STDOUT: %tuple.type.4: type = tuple_type (%tuple.type.2, %tuple.type.2) [template] // CHECK:STDOUT: %H.type: type = fn_type @H [template] // CHECK:STDOUT: %H: %H.type = struct_value () [template] -// CHECK:STDOUT: %tuple.type.6: type = tuple_type (type, %tuple.type.1, type) [template] // CHECK:STDOUT: %tuple.type.7: type = tuple_type (%i32, %tuple.type.2, %i32) [template] // CHECK:STDOUT: %int_1.1: Core.IntLiteral = int_value 1 [template] // CHECK:STDOUT: %int_2.1: Core.IntLiteral = int_value 2 [template] @@ -90,24 +88,6 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @G() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc14_12: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_12: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_25: %tuple.type.1 = tuple_literal (%i32.loc14_12, %i32.loc14_17, %i32.loc14_22) -// CHECK:STDOUT: %int_32.loc14_29: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_29: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_34: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_34: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_39: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_39: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_42: %tuple.type.1 = tuple_literal (%i32.loc14_29, %i32.loc14_34, %i32.loc14_39) -// CHECK:STDOUT: %.loc14_43.1: %tuple.type.3 = tuple_literal (%.loc14_25, %.loc14_42) -// CHECK:STDOUT: %.loc14_43.2: type = converted %.loc14_25, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc14_43.3: type = converted %.loc14_42, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc14_43.4: type = converted %.loc14_43.1, constants.%tuple.type.4 [template = constants.%tuple.type.4] // CHECK:STDOUT: %v.var: ref %tuple.type.4 = var v // CHECK:STDOUT: %v: ref %tuple.type.4 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14_48: %F.type = name_ref F, file.%F.decl [template = constants.%F] @@ -125,20 +105,6 @@ fn H() { // CHECK:STDOUT: // CHECK:STDOUT: fn @H() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_32.loc18_11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc18_17: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_17: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc18_22: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_22: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc18_27: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_27: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_30: %tuple.type.1 = tuple_literal (%i32.loc18_17, %i32.loc18_22, %i32.loc18_27) -// CHECK:STDOUT: %int_32.loc18_33: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc18_33: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_36.1: %tuple.type.6 = tuple_literal (%i32.loc18_11, %.loc18_30, %i32.loc18_33) -// CHECK:STDOUT: %.loc18_36.2: type = converted %.loc18_30, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc18_36.3: type = converted %.loc18_36.1, constants.%tuple.type.7 [template = constants.%tuple.type.7] // CHECK:STDOUT: %v.var: ref %tuple.type.7 = var v // CHECK:STDOUT: %v: ref %tuple.type.7 = bind_name v, %v.var // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1.1] diff --git a/toolchain/check/testdata/tuple/no_prelude/empty.carbon b/toolchain/check/testdata/tuple/no_prelude/empty.carbon index ea1f690d976a..b12481d3a2f2 100644 --- a/toolchain/check/testdata/tuple/no_prelude/empty.carbon +++ b/toolchain/check/testdata/tuple/no_prelude/empty.carbon @@ -23,12 +23,8 @@ var y: () = x; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_9.2: type = converted %.loc12_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %y.var: ref %empty_tuple.type = var y // CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon b/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon index 1e21bddbc41a..df8abdb34dd2 100644 --- a/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon +++ b/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon @@ -24,10 +24,6 @@ var x: ((),) = (); // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_10: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_12.1: %tuple.type = tuple_literal (%.loc14_10) -// CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_10, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc14_12.3: type = converted %.loc14_12.1, constants.%tuple.type [template = constants.%tuple.type] // CHECK:STDOUT: %x.var: ref %tuple.type = var x // CHECK:STDOUT: %x: ref %tuple.type = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon b/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon index d5fe5553a234..434a52a04221 100644 --- a/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon @@ -24,8 +24,6 @@ var x: () = ((),); // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc14_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_9.2: type = converted %.loc14_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/one_element.carbon b/toolchain/check/testdata/tuple/one_element.carbon index 01be2b758d36..18bec3632c13 100644 --- a/toolchain/check/testdata/tuple/one_element.carbon +++ b/toolchain/check/testdata/tuple/one_element.carbon @@ -16,7 +16,6 @@ var y: (i32,) = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32) [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %tuple.type.3: type = tuple_type (Core.IntLiteral) [template] @@ -46,16 +45,8 @@ var y: (i32,) = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_13.1: %tuple.type.1 = tuple_literal (%i32.loc11) -// CHECK:STDOUT: %.loc11_13.2: type = converted %.loc11_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var -// 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: %.loc12_13.1: %tuple.type.1 = tuple_literal (%i32.loc12) -// CHECK:STDOUT: %.loc12_13.2: type = converted %.loc12_13.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %y.var: ref %tuple.type.2 = var y // CHECK:STDOUT: %y: ref %tuple.type.2 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/two_elements.carbon b/toolchain/check/testdata/tuple/two_elements.carbon index b2f6abf8d50c..a17a81c3b62b 100644 --- a/toolchain/check/testdata/tuple/two_elements.carbon +++ b/toolchain/check/testdata/tuple/two_elements.carbon @@ -19,7 +19,6 @@ var y: (i32, i32) = x; // CHECK:STDOUT: constants { // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [template] // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [template] -// CHECK:STDOUT: %tuple.type.1: type = tuple_type (type, type) [template] // CHECK:STDOUT: %tuple.type.2: type = tuple_type (%i32, %i32) [template] // CHECK:STDOUT: %int_4.1: Core.IntLiteral = int_value 4 [template] // CHECK:STDOUT: %int_102.1: Core.IntLiteral = int_value 102 [template] @@ -55,32 +54,8 @@ var y: (i32, i32) = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %int_32.loc11_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc11_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc11_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_17.1: %tuple.type.1 = tuple_literal (%i32.loc11_9, %i32.loc11_14) -// CHECK:STDOUT: %.loc11_17.2: type = converted %.loc11_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %int_32.loc12_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc12_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc12_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.1: %tuple.type.1 = tuple_literal (%i32.loc12_9, %i32.loc12_14) -// CHECK:STDOUT: %.loc12_17.2: type = converted %.loc12_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %int_32.loc14_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc14_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc14_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.1: %tuple.type.1 = tuple_literal (%i32.loc14_9, %i32.loc14_14) -// CHECK:STDOUT: %.loc14_17.2: type = converted %.loc14_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %x.var: ref %tuple.type.2 = var x // CHECK:STDOUT: %x: ref %tuple.type.2 = bind_name x, %x.var -// CHECK:STDOUT: %int_32.loc15_9: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_9: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %int_32.loc15_14: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc15_14: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_17.1: %tuple.type.1 = tuple_literal (%i32.loc15_9, %i32.loc15_14) -// CHECK:STDOUT: %.loc15_17.2: type = converted %.loc15_17.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %y.var: ref %tuple.type.2 = var y // CHECK:STDOUT: %y: ref %tuple.type.2 = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/fail_not_copyable.carbon b/toolchain/check/testdata/var/fail_not_copyable.carbon index 81726b2ea89a..7d35b861fa1e 100644 --- a/toolchain/check/testdata/var/fail_not_copyable.carbon +++ b/toolchain/check/testdata/var/fail_not_copyable.carbon @@ -57,8 +57,8 @@ fn F(x: X) { // CHECK:STDOUT: %x.patt: %X = binding_pattern x // CHECK:STDOUT: %x.param_patt: %X = value_param_pattern %x.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %X.ref.loc14: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %x.param: %X = value_param runtime_param0 +// CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %x: %X = bind_name x, %x.param // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -77,7 +77,6 @@ fn F(x: X) { // CHECK:STDOUT: %s: ref String = bind_name s, %s.var // CHECK:STDOUT: %str: String = string_literal "hello" [template = constants.%str] // CHECK:STDOUT: assign %s.var, -// CHECK:STDOUT: %X.ref.loc27: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %y.var: ref %X = var y // CHECK:STDOUT: %y: ref %X = bind_name y, %y.var // CHECK:STDOUT: %x.ref: %X = name_ref x, %x diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index f799ed7a0b96..4e44271b69f4 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -45,11 +45,9 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %int_1.loc18_10: Core.IntLiteral = int_value 1 [template = constants.%int_1] -// CHECK:STDOUT: %.loc18: type = converted %int_1.loc18_10, [template = ] // CHECK:STDOUT: %x.var: ref = var x // CHECK:STDOUT: %x: ref = bind_name x, %x.var -// CHECK:STDOUT: %int_1.loc18_14: Core.IntLiteral = int_value 1 [template = constants.%int_1] +// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [template = constants.%int_1] // CHECK:STDOUT: assign %x.var, // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon index adf88eb0e8ec..a0417fc2768e 100644 --- a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon +++ b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon @@ -8,48 +8,64 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/fail_todo_control_flow_init.carbon -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+12]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+16]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x: () = if true then () else (); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+12]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x: () = if true then () else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var x: () = if true then () else (); +// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: // CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:21: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x: () = if true then () else (); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var x: () = if true then () else (); -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+12]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+16]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x2: () = if false then () else (); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+12]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x2: () = if false then () else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var x2: () = if false then () else (); +// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: // CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:23: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x2: () = if false then () else (); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var x2: () = if false then () else (); -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:15: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+12]]:15: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var y: bool = true or false; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:15: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var y: bool = true or false; +// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: // CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:15: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var y: bool = true or false; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: var y: bool = true or false; -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+7]]:16: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+11]]:16: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var y2: bool = false or true; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+7]]:16: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] +// CHECK:STDERR: var y2: bool = false or true; +// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: // CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+3]]:16: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var y2: bool = false or true; // CHECK:STDERR: ^~~~~~~~~~~~~ @@ -60,8 +76,6 @@ var y2: bool = false or true; // CHECK:STDOUT: constants { // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [template] // CHECK:STDOUT: %true: bool = bool_literal true [template] -// CHECK:STDOUT: %Bool.type: type = fn_type @Bool [template] -// CHECK:STDOUT: %Bool: %Bool.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -81,22 +95,12 @@ var y2: bool = false or true; // CHECK:STDOUT: .y2 = %y2 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc23_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc23_9.2: type = converted %.loc23_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var -// CHECK:STDOUT: %.loc37_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc37_10.2: type = converted %.loc37_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x2.var: ref %empty_tuple.type = var x2 // CHECK:STDOUT: %x2: ref %empty_tuple.type = bind_name x2, %x2.var -// CHECK:STDOUT: %bool.make_type.loc47: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc47_8.1: type = value_of_initializer %bool.make_type.loc47 [template = bool] -// CHECK:STDOUT: %.loc47_8.2: type = converted %bool.make_type.loc47, %.loc47_8.1 [template = bool] // CHECK:STDOUT: %y.var: ref bool = var y // CHECK:STDOUT: %y: ref bool = bind_name y, %y.var -// CHECK:STDOUT: %bool.make_type.loc56: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc56_9.1: type = value_of_initializer %bool.make_type.loc56 [template = bool] -// CHECK:STDOUT: %.loc56_9.2: type = converted %bool.make_type.loc56, %.loc56_9.1 [template = bool] // CHECK:STDOUT: %y2.var: ref bool = var y2 // CHECK:STDOUT: %y2: ref bool = bind_name y2, %y2.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/decl.carbon b/toolchain/check/testdata/var/no_prelude/decl.carbon index 6fd50710afa3..853c0029dd88 100644 --- a/toolchain/check/testdata/var/no_prelude/decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/decl.carbon @@ -29,8 +29,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon b/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon index 5ca2ea03d5b8..df63de8b5b32 100644 --- a/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon +++ b/toolchain/check/testdata/var/no_prelude/decl_with_init.carbon @@ -30,8 +30,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: %.loc12_16.1: %empty_tuple.type = tuple_literal () diff --git a/toolchain/check/testdata/var/no_prelude/export_name.carbon b/toolchain/check/testdata/var/no_prelude/export_name.carbon index 545a88848440..e1bb7077ea99 100644 --- a/toolchain/check/testdata/var/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/var/no_prelude/export_name.carbon @@ -53,8 +53,6 @@ var w: () = v; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v = %v // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %v.var: ref %empty_tuple.type = var v // CHECK:STDOUT: %v: ref %empty_tuple.type = bind_name v, %v.var // CHECK:STDOUT: } @@ -94,8 +92,6 @@ var w: () = v; // CHECK:STDOUT: .w = %w // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc11_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_9.2: type = converted %.loc11_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %w.var: ref %empty_tuple.type = var w // CHECK:STDOUT: %w: ref %empty_tuple.type = bind_name w, %w.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon b/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon index 7711cf1823e8..416fbecd9a25 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon @@ -38,16 +38,12 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc13_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc13_11.2: type = converted %.loc13_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var.loc13: ref %empty_tuple.type = var x // CHECK:STDOUT: %x.loc13: ref %empty_tuple.type = bind_name x, %x.var.loc13 // CHECK:STDOUT: %.loc13_16.1: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc13_16.2: init %empty_tuple.type = tuple_init () to %x.var.loc13 [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc13_17: init %empty_tuple.type = converted %.loc13_16.1, %.loc13_16.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %x.var.loc13, %.loc13_17 -// CHECK:STDOUT: %.loc20_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc20_11.2: type = converted %.loc20_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var.loc20: ref %empty_tuple.type = var x // CHECK:STDOUT: %x.loc20: ref %empty_tuple.type = bind_name x, %x.var.loc20 // CHECK:STDOUT: %.loc20_16.1: %empty_tuple.type = tuple_literal () diff --git a/toolchain/check/testdata/var/no_prelude/fail_generic.carbon b/toolchain/check/testdata/var/no_prelude/fail_generic.carbon index 94f80ca1e786..89f7994de283 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_generic.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_generic.carbon @@ -34,8 +34,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_12.2: type = converted %.loc15_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: %empty_tuple.type = bind_symbolic_name x, %x.var [symbolic = constants.%x] // CHECK:STDOUT: %.loc15_17.1: %empty_tuple.type = tuple_literal () diff --git a/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon b/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon index 02f8b4a5f179..1c3b26c90a02 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon @@ -34,8 +34,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%empty_struct_type [template = constants.%empty_struct_type] // CHECK:STDOUT: %x.var: ref %empty_struct_type = var x // CHECK:STDOUT: %x: ref %empty_struct_type = bind_name x, %x.var // CHECK:STDOUT: %.loc15_16.1: %empty_tuple.type = tuple_literal () diff --git a/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon b/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon index 109caf7855a9..72c4c49de971 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon @@ -32,8 +32,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc15_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_11.2: type = converted %.loc15_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: %x.ref: = name_ref x, [template = ] diff --git a/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon b/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon index 0b8c74632c3b..e1ddf6f028a9 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon @@ -31,16 +31,12 @@ var y: () = x; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} -// CHECK:STDOUT: %.loc18_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc18_9.2: type = converted %.loc18_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %y.var: ref %empty_tuple.type = var y // CHECK:STDOUT: %y: ref %empty_tuple.type = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon index 0423bd01a922..8646141c3322 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon @@ -54,20 +54,12 @@ abstract var e: (); // CHECK:STDOUT: .d = %d // CHECK:STDOUT: .e = %e // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc15_19.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_19.2: type = converted %.loc15_19.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %b.var: ref %empty_tuple.type = var b // CHECK:STDOUT: %b: ref %empty_tuple.type = bind_name b, %b.var -// CHECK:STDOUT: %.loc24_27.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc24_27.2: type = converted %.loc24_27.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %c.var: ref %empty_tuple.type = var c // CHECK:STDOUT: %c: ref %empty_tuple.type = bind_name c, %c.var -// CHECK:STDOUT: %.loc37_29.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc37_29.2: type = converted %.loc37_29.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %d.var: ref %empty_tuple.type = var d // CHECK:STDOUT: %d: ref %empty_tuple.type = bind_name d, %d.var -// CHECK:STDOUT: %.loc42_18.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc42_18.2: type = converted %.loc42_18.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %e.var: ref %empty_tuple.type = var e // CHECK:STDOUT: %e: ref %empty_tuple.type = bind_name e, %e.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon b/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon index 85c8c309a068..9c790d7c2d59 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon @@ -39,12 +39,8 @@ var A: () = (); // CHECK:STDOUT: .A = %A.loc11 // CHECK:STDOUT: } // CHECK:STDOUT: %A.loc11: = namespace [template] {} -// CHECK:STDOUT: %.loc20_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc20_9.2: type = converted %.loc20_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %A.var.loc20: ref %empty_tuple.type = var A // CHECK:STDOUT: %A.loc20: ref %empty_tuple.type = bind_name A, %A.var.loc20 -// CHECK:STDOUT: %.loc28_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc28_9.2: type = converted %.loc28_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %A.var.loc28: ref %empty_tuple.type = var A // CHECK:STDOUT: %A.loc28: ref %empty_tuple.type = bind_name A, %A.var.loc28 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/global_decl.carbon b/toolchain/check/testdata/var/no_prelude/global_decl.carbon index 01e8dcc73ddd..47d49e559419 100644 --- a/toolchain/check/testdata/var/no_prelude/global_decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_decl.carbon @@ -21,9 +21,6 @@ var x: {.v: ()}; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] // CHECK:STDOUT: %x.var: ref %struct_type.v = var x // CHECK:STDOUT: %x: ref %struct_type.v = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/global_decl_with_init.carbon b/toolchain/check/testdata/var/no_prelude/global_decl_with_init.carbon index 492213c01171..f8849b5cf501 100644 --- a/toolchain/check/testdata/var/no_prelude/global_decl_with_init.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_decl_with_init.carbon @@ -23,9 +23,6 @@ var x: {.v: ()} = {.v = ()}; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] // CHECK:STDOUT: %x.var: ref %struct_type.v = var x // CHECK:STDOUT: %x: ref %struct_type.v = bind_name x, %x.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/global_lookup.carbon b/toolchain/check/testdata/var/no_prelude/global_lookup.carbon index 73efcf10599e..c9c70cea3b05 100644 --- a/toolchain/check/testdata/var/no_prelude/global_lookup.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_lookup.carbon @@ -25,14 +25,8 @@ var y: {.v: ()} = x; // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.v.loc11: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] // CHECK:STDOUT: %x.var: ref %struct_type.v = var x // CHECK:STDOUT: %x: ref %struct_type.v = bind_name x, %x.var -// CHECK:STDOUT: %.loc12_14.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_14.2: type = converted %.loc12_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.v.loc12: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] // CHECK:STDOUT: %y.var: ref %struct_type.v = var y // CHECK:STDOUT: %y: ref %struct_type.v = bind_name y, %y.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon b/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon index 4f2fd135abd9..0056295ebbe7 100644 --- a/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon +++ b/toolchain/check/testdata/var/no_prelude/global_lookup_in_scope.carbon @@ -30,9 +30,6 @@ fn Main() { // CHECK:STDOUT: .x = %x // CHECK:STDOUT: .Main = %Main.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc11_14.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_14.2: type = converted %.loc11_14.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] // CHECK:STDOUT: %x.var: ref %struct_type.v = var x // CHECK:STDOUT: %x: ref %struct_type.v = bind_name x, %x.var // CHECK:STDOUT: %Main.decl: %Main.type = fn_decl @Main [template = constants.%Main] {} {} @@ -40,9 +37,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_16.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_16.2: type = converted %.loc14_16.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %struct_type.v: type = struct_type {.v: %empty_tuple.type} [template = constants.%struct_type.v] // CHECK:STDOUT: %y.var: ref %struct_type.v = var y // CHECK:STDOUT: %y: ref %struct_type.v = bind_name y, %y.var // CHECK:STDOUT: %x.ref: ref %struct_type.v = name_ref x, file.%x diff --git a/toolchain/check/testdata/var/no_prelude/import.carbon b/toolchain/check/testdata/var/no_prelude/import.carbon index cff135b7b45f..7fe3dba5e930 100644 --- a/toolchain/check/testdata/var/no_prelude/import.carbon +++ b/toolchain/check/testdata/var/no_prelude/import.carbon @@ -31,8 +31,6 @@ var a: () = a_ref; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .a_ref = %a_ref // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_13.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_13.2: type = converted %.loc4_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a_ref.var: ref %empty_tuple.type = var a_ref // CHECK:STDOUT: %a_ref: ref %empty_tuple.type = bind_name a_ref, %a_ref.var // CHECK:STDOUT: } @@ -64,8 +62,6 @@ var a: () = a_ref; // CHECK:STDOUT: } // CHECK:STDOUT: %Implicit.import = import Implicit // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_9.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_9.2: type = converted %.loc4_9.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %a.var: ref %empty_tuple.type = var a // CHECK:STDOUT: %a: ref %empty_tuple.type = bind_name a, %a.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/import_access.carbon b/toolchain/check/testdata/var/no_prelude/import_access.carbon index f392ab220d7a..e8aa4dc69cdc 100644 --- a/toolchain/check/testdata/var/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/var/no_prelude/import_access.carbon @@ -62,8 +62,6 @@ var v2: () = Test.v; // CHECK:STDOUT: package: = namespace [template] { // CHECK:STDOUT: .v [private] = %v // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc4_17.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_17.2: type = converted %.loc4_17.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %v.var: ref %empty_tuple.type = var v // CHECK:STDOUT: %v: ref %empty_tuple.type = bind_name v, %v.var // CHECK:STDOUT: } @@ -95,8 +93,6 @@ var v2: () = Test.v; // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc4_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc4_10.2: type = converted %.loc4_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %v2.var: ref %empty_tuple.type = var v2 // CHECK:STDOUT: %v2: ref %empty_tuple.type = bind_name v2, %v2.var // CHECK:STDOUT: } @@ -121,8 +117,6 @@ var v2: () = Test.v; // CHECK:STDOUT: .v2 = %v2 // CHECK:STDOUT: } // CHECK:STDOUT: %default.import = import -// CHECK:STDOUT: %.loc10_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_10.2: type = converted %.loc10_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %v2.var: ref %empty_tuple.type = var v2 // CHECK:STDOUT: %v2: ref %empty_tuple.type = bind_name v2, %v2.var // CHECK:STDOUT: } @@ -152,8 +146,6 @@ var v2: () = Test.v; // CHECK:STDOUT: .v2 = %v2 // CHECK:STDOUT: } // CHECK:STDOUT: %Test.import = import Test -// CHECK:STDOUT: %.loc9_10.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_10.2: type = converted %.loc9_10.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %v2.var: ref %empty_tuple.type = var v2 // CHECK:STDOUT: %v2: ref %empty_tuple.type = bind_name v2, %v2.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/var/no_prelude/lookup.carbon b/toolchain/check/testdata/var/no_prelude/lookup.carbon index 94f57d850efc..4b0d15249052 100644 --- a/toolchain/check/testdata/var/no_prelude/lookup.carbon +++ b/toolchain/check/testdata/var/no_prelude/lookup.carbon @@ -31,8 +31,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc12_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc12_11.2: type = converted %.loc12_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: %.loc12_16.1: %empty_tuple.type = tuple_literal () diff --git a/toolchain/check/testdata/var/no_prelude/shadowing.carbon b/toolchain/check/testdata/var/no_prelude/shadowing.carbon index 6137bed2d9b5..17e20e98c0b2 100644 --- a/toolchain/check/testdata/var/no_prelude/shadowing.carbon +++ b/toolchain/check/testdata/var/no_prelude/shadowing.carbon @@ -44,8 +44,6 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Main() { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc14_12.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc14_12.2: type = converted %.loc14_12.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %NS.var: ref %empty_tuple.type = var NS // CHECK:STDOUT: %NS: ref %empty_tuple.type = bind_name NS, %NS.var // CHECK:STDOUT: %.loc14_17.1: %empty_tuple.type = tuple_literal () @@ -57,8 +55,6 @@ fn Main() { // CHECK:STDOUT: %.loc15_9.2: init %empty_tuple.type = tuple_init () to %NS.ref [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc15_6: init %empty_tuple.type = converted %.loc15_9.1, %.loc15_9.2 [template = constants.%empty_tuple] // CHECK:STDOUT: assign %NS.ref, %.loc15_6 -// CHECK:STDOUT: %.loc17_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc17_11.2: type = converted %.loc17_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var.loc17: ref %empty_tuple.type = var x // CHECK:STDOUT: %x.loc17: ref %empty_tuple.type = bind_name x, %x.var.loc17 // CHECK:STDOUT: %.loc17_16.1: %empty_tuple.type = tuple_literal () @@ -69,8 +65,6 @@ fn Main() { // CHECK:STDOUT: if %true br !if.then else br !if.else // CHECK:STDOUT: // CHECK:STDOUT: !if.then: -// CHECK:STDOUT: %.loc19_13.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc19_13.2: type = converted %.loc19_13.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var.loc19: ref %empty_tuple.type = var x // CHECK:STDOUT: %x.loc19: ref %empty_tuple.type = bind_name x, %x.var.loc19 // CHECK:STDOUT: %.loc19_18.1: %empty_tuple.type = tuple_literal () diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 0fa5cd0d04c0..5b5f0e1072dc 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -173,52 +173,58 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %U.patt.loc11_15.1: %I_where.type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_15.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: %I_where.type = value_param_pattern %U.patt.loc11_15.1, runtime_param [symbolic = %U.patt.loc11_15.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.loc11_37: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_21: type = where_expr %.Self [template = constants.%I_where.type] { -// CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc11_37 -// CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %I_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc11_21.2: type = splice_block %.loc11_21.1 [template = constants.%I_where.type] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.loc11_37: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_21.1: type = where_expr %.Self [template = constants.%I_where.type] { +// CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc11_37 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc11_15.1: %I_where.type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc11_15.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %Impls.decl: %Impls.type = fn_decl @Impls [template = constants.%Impls] { // CHECK:STDOUT: %V.patt.loc13_10.1: %J_where.type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc13_10.2 (constants.%V.patt)] // CHECK:STDOUT: %V.param_patt: %J_where.type = value_param_pattern %V.patt.loc13_10.1, runtime_param [symbolic = %V.patt.loc13_10.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = constants.%.Self.as_type.1] -// CHECK:STDOUT: %.loc13_22: type = converted %.Self.ref, %.Self.as_type [symbolic = constants.%.Self.as_type.1] -// CHECK:STDOUT: %.loc13_16: type = where_expr %.Self [template = constants.%J_where.type] { -// CHECK:STDOUT: requirement_impls %.loc13_22, %I.ref -// CHECK:STDOUT: } // CHECK:STDOUT: %V.param: %J_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc13_16.2: type = splice_block %.loc13_16.1 [template = constants.%J_where.type] { +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic = constants.%.Self.as_type.1] +// CHECK:STDOUT: %.loc13_22: type = converted %.Self.ref, %.Self.as_type [symbolic = constants.%.Self.as_type.1] +// CHECK:STDOUT: %.loc13_16.1: type = where_expr %.Self [template = constants.%J_where.type] { +// CHECK:STDOUT: requirement_impls %.loc13_22, %I.ref +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %V.loc13_10.1: %J_where.type = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc13_10.2 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %And.decl: %And.type = fn_decl @And [template = constants.%And] { // CHECK:STDOUT: %W.patt.loc15_8.1: %I_where.type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc15_8.2 (constants.%W.patt)] // CHECK:STDOUT: %W.param_patt: %I_where.type = value_param_pattern %W.patt.loc15_8.1, runtime_param [symbolic = %W.patt.loc15_8.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref.loc15_20: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] -// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref.loc15_20 [symbolic = constants.%.Self.as_type.2] -// CHECK:STDOUT: %.loc15_20: type = converted %.Self.ref.loc15_20, %.Self.as_type [symbolic = constants.%.Self.as_type.2] -// CHECK:STDOUT: %.Self.ref.loc15_38: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %Member.ref: %assoc_type.1 = name_ref Member, @I.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref.loc15_38 [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %.loc15_50: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc15_14: type = where_expr %.Self [template = constants.%I_where.type] { -// CHECK:STDOUT: requirement_impls %.loc15_20, %J.ref -// CHECK:STDOUT: requirement_equivalent %impl.elem0, %.loc15_50 -// CHECK:STDOUT: } // CHECK:STDOUT: %W.param: %I_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc15_14.2: type = splice_block %.loc15_14.1 [template = constants.%I_where.type] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref.loc15_20: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref.loc15_20 [symbolic = constants.%.Self.as_type.2] +// CHECK:STDOUT: %.loc15_20: type = converted %.Self.ref.loc15_20, %.Self.as_type [symbolic = constants.%.Self.as_type.2] +// CHECK:STDOUT: %.Self.ref.loc15_38: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %Member.ref: %assoc_type.1 = name_ref Member, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref.loc15_38 [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %.loc15_50: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc15_14.1: type = where_expr %.Self [template = constants.%I_where.type] { +// CHECK:STDOUT: requirement_impls %.loc15_20, %J.ref +// CHECK:STDOUT: requirement_equivalent %impl.elem0, %.loc15_50 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %W.loc15_8.1: %I_where.type = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc15_8.2 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -235,7 +241,6 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.2] // CHECK:STDOUT: %Member: type = assoc_const_decl Member [template] // CHECK:STDOUT: %assoc0: %assoc_type.1 = assoc_entity element0, %Member [template = constants.%assoc0] -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] // CHECK:STDOUT: %Second: %J.type = assoc_const_decl Second [template] // CHECK:STDOUT: %assoc1: %assoc_type.2 = assoc_entity element1, %Second [template = constants.%assoc1] // CHECK:STDOUT: @@ -327,19 +332,21 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %W.patt.loc11_24.1: %K_where.type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc11_24.2 (constants.%W.patt)] // CHECK:STDOUT: %W.param_patt: %K_where.type = value_param_pattern %W.patt.loc11_24.1, runtime_param [symbolic = %W.patt.loc11_24.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] -// CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %Associated.ref: %assoc_type = name_ref Associated, @K.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: %L.type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [template = constants.%M.type] -// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic = constants.%as_type] -// CHECK:STDOUT: %.loc11_36: type = converted %impl.elem0, %as_type [symbolic = constants.%as_type] -// CHECK:STDOUT: %.loc11_30: type = where_expr %.Self [template = constants.%K_where.type] { -// CHECK:STDOUT: requirement_impls %.loc11_36, %M.ref -// CHECK:STDOUT: } // CHECK:STDOUT: %W.param: %K_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc11_30.2: type = splice_block %.loc11_30.1 [template = constants.%K_where.type] { +// CHECK:STDOUT: %K.ref: type = name_ref K, file.%K.decl [template = constants.%K.type] +// CHECK:STDOUT: %.Self: %K.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %K.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %Associated.ref: %assoc_type = name_ref Associated, @K.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: %L.type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %M.ref: type = name_ref M, file.%M.decl [template = constants.%M.type] +// CHECK:STDOUT: %as_type: type = facet_access_type %impl.elem0 [symbolic = constants.%as_type] +// CHECK:STDOUT: %.loc11_36: type = converted %impl.elem0, %as_type [symbolic = constants.%as_type] +// CHECK:STDOUT: %.loc11_30.1: type = where_expr %.Self [template = constants.%K_where.type] { +// CHECK:STDOUT: requirement_impls %.loc11_36, %M.ref +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %W.loc11_24.1: %K_where.type = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc11_24.2 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -362,7 +369,6 @@ fn NotEmptyStruct() { // CHECK:STDOUT: // CHECK:STDOUT: interface @K { // CHECK:STDOUT: %Self: %K.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self.3] -// CHECK:STDOUT: %L.ref: type = name_ref L, file.%L.decl [template = constants.%L.type] // CHECK:STDOUT: %Associated: %L.type = assoc_const_decl Associated [template] // CHECK:STDOUT: %assoc0: %assoc_type = assoc_entity element0, %Associated [template = constants.%assoc0] // CHECK:STDOUT: @@ -414,13 +420,15 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %U.patt.loc11_17.1: %type_where = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: %type_where = value_param_pattern %U.patt.loc11_17.1, runtime_param [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] -// CHECK:STDOUT: %.loc11_32: type = converted %int_7, [template = ] -// CHECK:STDOUT: %.loc11_26: type = where_expr %.Self [template = constants.%type_where] { -// CHECK:STDOUT: requirement_impls , type -// CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %type_where = value_param runtime_param +// CHECK:STDOUT: %.loc11_26.2: type = splice_block %.loc11_26.1 [template = constants.%type_where] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] +// CHECK:STDOUT: %.loc11_32: type = converted %int_7, [template = ] +// CHECK:STDOUT: %.loc11_26.1: type = where_expr %.Self [template = constants.%type_where] { +// CHECK:STDOUT: requirement_impls , type +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc11_17.1: %type_where = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc11_17.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -467,14 +475,16 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %U.patt.loc11_17.1: %type_where = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: %type_where = value_param_pattern %U.patt.loc11_17.1, runtime_param [symbolic = %U.patt.loc11_17.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] -// CHECK:STDOUT: %.loc11_44: type = converted %int_7, [template = ] -// CHECK:STDOUT: %.loc11_26: type = where_expr %.Self [template = constants.%type_where] { -// CHECK:STDOUT: requirement_impls %.Self.ref, -// CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %type_where = value_param runtime_param +// CHECK:STDOUT: %.loc11_26.2: type = splice_block %.loc11_26.1 [template = constants.%type_where] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [template = constants.%int_7] +// CHECK:STDOUT: %.loc11_44: type = converted %int_7, [template = ] +// CHECK:STDOUT: %.loc11_26.1: type = where_expr %.Self [template = constants.%type_where] { +// CHECK:STDOUT: requirement_impls %.Self.ref, +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc11_17.1: %type_where = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc11_17.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -522,14 +532,16 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %U.patt.loc8_24.1: %type_where = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_24.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: %type_where = value_param_pattern %U.patt.loc8_24.1, runtime_param [symbolic = %U.patt.loc8_24.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// 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: %.loc8: type = where_expr %.Self [template = constants.%type_where] { -// CHECK:STDOUT: requirement_impls %.Self.ref, -// CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %type_where = value_param runtime_param +// CHECK:STDOUT: %.loc8_33.2: type = splice_block %.loc8_33.1 [template = constants.%type_where] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// 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: %.loc8_33.1: type = where_expr %.Self [template = constants.%type_where] { +// CHECK:STDOUT: requirement_impls %.Self.ref, +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc8_24.1: %type_where = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc8_24.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -609,14 +621,16 @@ fn NotEmptyStruct() { // CHECK:STDOUT: %Y.patt.loc26_16.1: %J_where.type = symbolic_binding_pattern Y, 0 [symbolic = %Y.patt.loc26_16.2 (constants.%Y.patt)] // CHECK:STDOUT: %Y.param_patt: %J_where.type = value_param_pattern %Y.patt.loc26_16.1, runtime_param [symbolic = %Y.patt.loc26_16.2 (constants.%Y.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, imports.%import_ref.1 [template = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.loc26_38: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc26_22: type = where_expr %.Self [template = constants.%J_where.type] { -// CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc26_38 -// CHECK:STDOUT: } // CHECK:STDOUT: %Y.param: %J_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc26_22.2: type = splice_block %.loc26_22.1 [template = constants.%J_where.type] { +// CHECK:STDOUT: %J.ref: type = name_ref J, imports.%import_ref.1 [template = constants.%J.type] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.loc26_38: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc26_22.1: type = where_expr %.Self [template = constants.%J_where.type] { +// CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc26_38 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %Y.loc26_16.1: %J_where.type = bind_symbolic_name Y, 0, %Y.param [symbolic = %Y.loc26_16.2 (constants.%Y)] // CHECK:STDOUT: } // CHECK:STDOUT: %NotEmptyStruct.decl: %NotEmptyStruct.type = fn_decl @NotEmptyStruct [template = constants.%NotEmptyStruct] {} {} diff --git a/toolchain/check/testdata/where_expr/designator.carbon b/toolchain/check/testdata/where_expr/designator.carbon index 6ca1952b0fc2..a7bf9ed2b936 100644 --- a/toolchain/check/testdata/where_expr/designator.carbon +++ b/toolchain/check/testdata/where_expr/designator.carbon @@ -135,44 +135,50 @@ class D { // CHECK:STDOUT: %T.patt.loc8_15.1: %I_where.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: %I_where.type = value_param_pattern %T.patt.loc8_15.1, runtime_param [symbolic = %T.patt.loc8_15.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.loc8_37: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc8_21: type = where_expr %.Self [template = constants.%I_where.type] { -// CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc8_37 -// CHECK:STDOUT: } // CHECK:STDOUT: %T.param: %I_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc8_21.2: type = splice_block %.loc8_21.1 [template = constants.%I_where.type] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.loc8_37: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc8_21.1: type = where_expr %.Self [template = constants.%I_where.type] { +// CHECK:STDOUT: requirement_equivalent %.Self.ref, %.loc8_37 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_15.1: %I_where.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_15.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: %PeriodMember.decl: %PeriodMember.type = fn_decl @PeriodMember [template = constants.%PeriodMember] { // CHECK:STDOUT: %U.patt.loc10_17.1: %I_where.type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc10_17.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: %I_where.type = value_param_pattern %U.patt.loc10_17.1, runtime_param [symbolic = %U.patt.loc10_17.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %Member.ref: %assoc_type = name_ref Member, @I.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %.loc10_41: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc10_23: type = where_expr %.Self [template = constants.%I_where.type] { -// CHECK:STDOUT: requirement_equivalent %impl.elem0, %.loc10_41 -// CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %I_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc10_23.2: type = splice_block %.loc10_23.1 [template = constants.%I_where.type] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %Member.ref: %assoc_type = name_ref Member, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %.loc10_41: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc10_23.1: type = where_expr %.Self [template = constants.%I_where.type] { +// CHECK:STDOUT: requirement_equivalent %impl.elem0, %.loc10_41 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %U.loc10_17.1: %I_where.type = bind_symbolic_name U, 0, %U.param [symbolic = %U.loc10_17.2 (constants.%U)] // CHECK:STDOUT: } // CHECK:STDOUT: %TypeSelfImpls.decl: %TypeSelfImpls.type = fn_decl @TypeSelfImpls [template = constants.%TypeSelfImpls] { // CHECK:STDOUT: %V.patt.loc12_18.1: %type_where = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc12_18.2 (constants.%V.patt)] // CHECK:STDOUT: %V.param_patt: %type_where = value_param_pattern %V.patt.loc12_18.1, runtime_param [symbolic = %V.patt.loc12_18.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %.loc12: type = where_expr %.Self [template = constants.%type_where] { -// CHECK:STDOUT: requirement_impls %.Self.ref, %I.ref -// CHECK:STDOUT: } // CHECK:STDOUT: %V.param: %type_where = value_param runtime_param +// CHECK:STDOUT: %.loc12_27.2: type = splice_block %.loc12_27.1 [template = constants.%type_where] { +// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.loc12_27.1: type = where_expr %.Self [template = constants.%type_where] { +// CHECK:STDOUT: requirement_impls %.Self.ref, %I.ref +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %V.loc12_18.1: %type_where = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc12_18.2 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -257,15 +263,17 @@ class D { // CHECK:STDOUT: %W.patt.loc12_19.1: = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc12_19.2 (constants.%W.patt)] // CHECK:STDOUT: %W.param_patt: = value_param_pattern %W.patt.loc12_19.1, runtime_param [symbolic = %W.patt.loc12_19.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %Mismatch.ref: = name_ref Mismatch, [template = ] -// CHECK:STDOUT: %.loc12_44: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc12_25: type = where_expr %.Self [template = ] { -// CHECK:STDOUT: requirement_rewrite %Mismatch.ref, -// CHECK:STDOUT: } // CHECK:STDOUT: %W.param: = value_param runtime_param +// CHECK:STDOUT: %.loc12_25.2: type = splice_block %.loc12_25.1 [template = ] { +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %Mismatch.ref: = name_ref Mismatch, [template = ] +// CHECK:STDOUT: %.loc12_44: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc12_25.1: type = where_expr %.Self [template = ] { +// CHECK:STDOUT: requirement_rewrite %Mismatch.ref, +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %W: = bind_symbolic_name W, 0, %W.param [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -325,8 +333,6 @@ class D { // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() -> %empty_tuple.type { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc5_11.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc5_11.2: type = converted %.loc5_11.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %x.var: ref %empty_tuple.type = var x // CHECK:STDOUT: %x: ref %empty_tuple.type = bind_name x, %x.var // CHECK:STDOUT: %.Self.ref: = name_ref .Self, [template = ] diff --git a/toolchain/check/testdata/where_expr/dot_self_index.carbon b/toolchain/check/testdata/where_expr/dot_self_index.carbon index a16ae3d9813a..1085478c39dc 100644 --- a/toolchain/check/testdata/where_expr/dot_self_index.carbon +++ b/toolchain/check/testdata/where_expr/dot_self_index.carbon @@ -100,23 +100,25 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %V.patt.loc18_43.1: type = symbolic_binding_pattern V, 1 [symbolic = %V.patt.loc18_43.2 (constants.%V.patt)] // CHECK:STDOUT: %V.param_patt: type = value_param_pattern %V.patt.loc18_43.1, runtime_param [symbolic = %V.patt.loc18_43.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %Empty.ref: %Empty.type.1 = name_ref Empty, file.%Empty.decl [template = constants.%Empty.generic] -// CHECK:STDOUT: %T.ref.loc18_25: type = name_ref T, %T.loc18_6.1 [symbolic = %T.loc18_6.2 (constants.%T)] -// CHECK:STDOUT: %Empty.type.loc18_26.1: type = facet_type <@Empty, @Empty(constants.%T)> [symbolic = %Empty.type.loc18_26.2 (constants.%Empty.type.3)] -// CHECK:STDOUT: %.Self.1: @H.%Empty.type.loc18_26.2 (%Empty.type.3) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.1)] -// CHECK:STDOUT: %.Self.ref: @H.%Empty.type.loc18_26.2 (%Empty.type.3) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.1)] -// CHECK:STDOUT: %.loc18_34: @H.%assoc_type (%assoc_type.2) = specific_constant @Empty.%assoc0.loc12_15.1, @Empty(constants.%T) [symbolic = %assoc0 (constants.%assoc0.2)] -// CHECK:STDOUT: %A.ref: @H.%assoc_type (%assoc_type.2) = name_ref A, %.loc18_34 [symbolic = %assoc0 (constants.%assoc0.2)] -// CHECK:STDOUT: %.Self.as_wit.loc18_34.1: = facet_access_witness %.Self.ref [symbolic = %.Self.as_wit.loc18_34.2 (constants.%.Self.as_wit.1)] -// CHECK:STDOUT: %impl.elem0.loc18_34.1: type = interface_witness_access %.Self.as_wit.loc18_34.1, element0 [symbolic = %impl.elem0.loc18_34.2 (constants.%impl.elem0.1)] -// CHECK:STDOUT: %T.ref.loc18_39: type = name_ref T, %T.loc18_6.1 [symbolic = %T.loc18_6.2 (constants.%T)] -// CHECK:STDOUT: %ptr.loc18_40.1: type = ptr_type %T [symbolic = %ptr.loc18_40.2 (constants.%ptr.1)] -// CHECK:STDOUT: %.loc18_28: type = where_expr %.Self.1 [symbolic = %Empty_where.type (constants.%Empty_where.type.1)] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc18_34.1, %ptr.loc18_40.1 -// CHECK:STDOUT: } // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc18_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc18_6.2 (constants.%T)] // CHECK:STDOUT: %U.param: @H.%Empty_where.type (%Empty_where.type.1) = value_param runtime_param0 +// CHECK:STDOUT: %.loc18_28.2: type = splice_block %.loc18_28.1 [symbolic = %Empty_where.type (constants.%Empty_where.type.1)] { +// CHECK:STDOUT: %Empty.ref: %Empty.type.1 = name_ref Empty, file.%Empty.decl [template = constants.%Empty.generic] +// CHECK:STDOUT: %T.ref.loc18_25: type = name_ref T, %T.loc18_6.1 [symbolic = %T.loc18_6.2 (constants.%T)] +// CHECK:STDOUT: %Empty.type.loc18_26.1: type = facet_type <@Empty, @Empty(constants.%T)> [symbolic = %Empty.type.loc18_26.2 (constants.%Empty.type.3)] +// CHECK:STDOUT: %.Self.1: @H.%Empty.type.loc18_26.2 (%Empty.type.3) = bind_symbolic_name .Self [symbolic = %.Self.2 (constants.%.Self.1)] +// CHECK:STDOUT: %.Self.ref: @H.%Empty.type.loc18_26.2 (%Empty.type.3) = name_ref .Self, %.Self.1 [symbolic = %.Self.2 (constants.%.Self.1)] +// CHECK:STDOUT: %.loc18_34: @H.%assoc_type (%assoc_type.2) = specific_constant @Empty.%assoc0.loc12_15.1, @Empty(constants.%T) [symbolic = %assoc0 (constants.%assoc0.2)] +// CHECK:STDOUT: %A.ref: @H.%assoc_type (%assoc_type.2) = name_ref A, %.loc18_34 [symbolic = %assoc0 (constants.%assoc0.2)] +// CHECK:STDOUT: %.Self.as_wit.loc18_34.1: = facet_access_witness %.Self.ref [symbolic = %.Self.as_wit.loc18_34.2 (constants.%.Self.as_wit.1)] +// CHECK:STDOUT: %impl.elem0.loc18_34.1: type = interface_witness_access %.Self.as_wit.loc18_34.1, element0 [symbolic = %impl.elem0.loc18_34.2 (constants.%impl.elem0.1)] +// CHECK:STDOUT: %T.ref.loc18_39: type = name_ref T, %T.loc18_6.1 [symbolic = %T.loc18_6.2 (constants.%T)] +// CHECK:STDOUT: %ptr.loc18_40.1: type = ptr_type %T [symbolic = %ptr.loc18_40.2 (constants.%ptr.1)] +// CHECK:STDOUT: %.loc18_28.1: type = where_expr %.Self.1 [symbolic = %Empty_where.type (constants.%Empty_where.type.1)] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc18_34.1, %ptr.loc18_40.1 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %U: @H.%Empty_where.type (%Empty_where.type.1) = bind_name U, %U.param // CHECK:STDOUT: %V.param: type = value_param runtime_param // CHECK:STDOUT: %V.loc18_43.1: type = bind_symbolic_name V, 1, %V.param [symbolic = %V.loc18_43.2 (constants.%V)] @@ -125,23 +127,25 @@ fn G(U: Empty(i32) where .A = i32*) { // CHECK:STDOUT: %U.patt: %Empty_where.type.2 = binding_pattern U // CHECK:STDOUT: %U.param_patt: %Empty_where.type.2 = value_param_pattern %U.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %Empty.ref: %Empty.type.1 = name_ref Empty, file.%Empty.decl [template = constants.%Empty.generic] -// CHECK:STDOUT: %int_32.loc20_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %Empty.type: type = facet_type <@Empty, @Empty(constants.%i32)> [template = constants.%Empty.type.4] -// CHECK:STDOUT: %.Self: %Empty.type.4 = bind_symbolic_name .Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %.Self.ref: %Empty.type.4 = name_ref .Self, %.Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %.loc20_26: %assoc_type.3 = specific_constant @Empty.%assoc0.loc12_15.1, @Empty(constants.%i32) [template = constants.%assoc0.3] -// CHECK:STDOUT: %A.ref: %assoc_type.3 = name_ref A, %.loc20_26 [template = constants.%assoc0.3] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit.2] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0.2] -// CHECK:STDOUT: %int_32.loc20_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc20_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] -// CHECK:STDOUT: %.loc20_20: type = where_expr %.Self [template = constants.%Empty_where.type.2] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr -// CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %Empty_where.type.2 = value_param runtime_param0 +// CHECK:STDOUT: %.loc20_20.2: type = splice_block %.loc20_20.1 [template = constants.%Empty_where.type.2] { +// CHECK:STDOUT: %Empty.ref: %Empty.type.1 = name_ref Empty, file.%Empty.decl [template = constants.%Empty.generic] +// CHECK:STDOUT: %int_32.loc20_15: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc20_15: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %Empty.type: type = facet_type <@Empty, @Empty(constants.%i32)> [template = constants.%Empty.type.4] +// CHECK:STDOUT: %.Self: %Empty.type.4 = bind_symbolic_name .Self [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %.Self.ref: %Empty.type.4 = name_ref .Self, %.Self [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %.loc20_26: %assoc_type.3 = specific_constant @Empty.%assoc0.loc12_15.1, @Empty(constants.%i32) [template = constants.%assoc0.3] +// CHECK:STDOUT: %A.ref: %assoc_type.3 = name_ref A, %.loc20_26 [template = constants.%assoc0.3] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit.2] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0.2] +// CHECK:STDOUT: %int_32.loc20_31: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc20_31: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %ptr: type = ptr_type %i32 [template = constants.%ptr.2] +// CHECK:STDOUT: %.loc20_20.1: type = where_expr %.Self [template = constants.%Empty_where.type.2] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %ptr +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %U: %Empty_where.type.2 = bind_name U, %U.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/where_expr/equal_rewrite.carbon b/toolchain/check/testdata/where_expr/equal_rewrite.carbon index d14074f101cf..7937a6e4567c 100644 --- a/toolchain/check/testdata/where_expr/equal_rewrite.carbon +++ b/toolchain/check/testdata/where_expr/equal_rewrite.carbon @@ -255,18 +255,20 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %T.patt.loc8_10.1: %N_where.type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_10.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: %N_where.type = value_param_pattern %T.patt.loc8_10.1, runtime_param [symbolic = %T.patt.loc8_10.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %N.ref: type = name_ref N, file.%N.decl [template = constants.%N.type] -// CHECK:STDOUT: %.Self: %N.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %N.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %P.ref: %assoc_type = name_ref P, @N.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %.loc8_28.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc8_16: type = where_expr %.Self [template = constants.%N_where.type] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_28.2 -// CHECK:STDOUT: } // CHECK:STDOUT: %T.param: %N_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc8_16.2: type = splice_block %.loc8_16.1 [template = constants.%N_where.type] { +// CHECK:STDOUT: %N.ref: type = name_ref N, file.%N.decl [template = constants.%N.type] +// CHECK:STDOUT: %.Self: %N.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %N.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %P.ref: %assoc_type = name_ref P, @N.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %.loc8_28.1: %empty_struct_type = struct_literal () +// CHECK:STDOUT: %.loc8_28.2: type = converted %.loc8_28.1, constants.%empty_struct_type [template = constants.%empty_struct_type] +// CHECK:STDOUT: %.loc8_16.1: type = where_expr %.Self [template = constants.%N_where.type] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc8_28.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %T.loc8_10.1: %N_where.type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_10.2 (constants.%T)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -339,29 +341,31 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %D.patt.loc9_18.1: %A_where.type.2 = symbolic_binding_pattern D, 0 [symbolic = %D.patt.loc9_18.2 (constants.%D.patt)] // CHECK:STDOUT: %D.param_patt: %A_where.type.2 = value_param_pattern %D.patt.loc9_18.1, runtime_param [symbolic = %D.patt.loc9_18.2 (constants.%D.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A.type] -// CHECK:STDOUT: %.Self.1: %A.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref.loc9_31: %A.type = name_ref .Self, %.Self.1 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %B.ref: %assoc_type = name_ref B, @A.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit.loc9_31: = facet_access_witness %.Self.ref.loc9_31 [symbolic = constants.%.Self.as_wit.1] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit.loc9_31, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc9_36.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc9_36.2: type = converted %bool.make_type, %.loc9_36.1 [template = bool] -// CHECK:STDOUT: %.loc9_25: type = where_expr %.Self.1 [template = constants.%A_where.type.1] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_36.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: %.Self.2: %A_where.type.1 = bind_symbolic_name .Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %.Self.ref.loc9_48: %A_where.type.1 = name_ref .Self, %.Self.2 [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %C.ref: %assoc_type = name_ref C, @A.%assoc1 [template = constants.%assoc1] -// CHECK:STDOUT: %.Self.as_wit.loc9_48: = facet_access_witness %.Self.ref.loc9_48 [symbolic = constants.%.Self.as_wit.2] -// CHECK:STDOUT: %impl.elem1: type = interface_witness_access %.Self.as_wit.loc9_48, element1 [symbolic = constants.%impl.elem1] -// CHECK:STDOUT: %.loc9_54.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_54.2: type = converted %.loc9_54.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_42: type = where_expr %.Self.2 [template = constants.%A_where.type.2] { -// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc9_54.2 -// CHECK:STDOUT: } // CHECK:STDOUT: %D.param: %A_where.type.2 = value_param runtime_param +// CHECK:STDOUT: %.loc9_42.2: type = splice_block %.loc9_42.1 [template = constants.%A_where.type.2] { +// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A.type] +// CHECK:STDOUT: %.Self.1: %A.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %.Self.ref.loc9_31: %A.type = name_ref .Self, %.Self.1 [symbolic = constants.%.Self.1] +// CHECK:STDOUT: %B.ref: %assoc_type = name_ref B, @A.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit.loc9_31: = facet_access_witness %.Self.ref.loc9_31 [symbolic = constants.%.Self.as_wit.1] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit.loc9_31, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc9_36.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc9_36.2: type = converted %bool.make_type, %.loc9_36.1 [template = bool] +// CHECK:STDOUT: %.loc9_25: type = where_expr %.Self.1 [template = constants.%A_where.type.1] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_36.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: %.Self.2: %A_where.type.1 = bind_symbolic_name .Self [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %.Self.ref.loc9_48: %A_where.type.1 = name_ref .Self, %.Self.2 [symbolic = constants.%.Self.2] +// CHECK:STDOUT: %C.ref: %assoc_type = name_ref C, @A.%assoc1 [template = constants.%assoc1] +// CHECK:STDOUT: %.Self.as_wit.loc9_48: = facet_access_witness %.Self.ref.loc9_48 [symbolic = constants.%.Self.as_wit.2] +// CHECK:STDOUT: %impl.elem1: type = interface_witness_access %.Self.as_wit.loc9_48, element1 [symbolic = constants.%impl.elem1] +// CHECK:STDOUT: %.loc9_54.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_54.2: type = converted %.loc9_54.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_42.1: type = where_expr %.Self.2 [template = constants.%A_where.type.2] { +// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc9_54.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %D.loc9_18.1: %A_where.type.2 = bind_symbolic_name D, 0, %D.param [symbolic = %D.loc9_18.2 (constants.%D)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -445,61 +449,67 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %G.patt.loc8_15.1: %E_where.type = symbolic_binding_pattern G, 0 [symbolic = %G.patt.loc8_15.2 (constants.%G.patt)] // CHECK:STDOUT: %G.param_patt: %E_where.type = value_param_pattern %G.patt.loc8_15.1, runtime_param [symbolic = %G.patt.loc8_15.2 (constants.%G.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [template = constants.%E.type] -// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %F.ref: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// 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: %.loc8: type = where_expr %.Self [template = constants.%E_where.type] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 -// CHECK:STDOUT: } // CHECK:STDOUT: %G.param: %E_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc8_21.2: type = splice_block %.loc8_21.1 [template = constants.%E_where.type] { +// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [template = constants.%E.type] +// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %F.ref: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// 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: %.loc8_21.1: type = where_expr %.Self [template = constants.%E_where.type] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %G.loc8_15.1: %E_where.type = bind_symbolic_name G, 0, %G.param [symbolic = %G.loc8_15.2 (constants.%G)] // CHECK:STDOUT: } // CHECK:STDOUT: %RepeatedRewrite.decl: %RepeatedRewrite.type = fn_decl @RepeatedRewrite [template = constants.%RepeatedRewrite] { // CHECK:STDOUT: %H.patt.loc10_20.1: %E_where.type = symbolic_binding_pattern H, 0 [symbolic = %H.patt.loc10_20.2 (constants.%H.patt)] // CHECK:STDOUT: %H.param_patt: %E_where.type = value_param_pattern %H.patt.loc10_20.1, runtime_param [symbolic = %H.patt.loc10_20.2 (constants.%H.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [template = constants.%E.type] -// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc10_32: %E.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %F.ref.loc10_32: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit.loc10_32: = facet_access_witness %.Self.ref.loc10_32 [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0.loc10_32: type = interface_witness_access %.Self.as_wit.loc10_32, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %int_32.loc10_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.Self.ref.loc10_45: %E.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %F.ref.loc10_45: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit.loc10_45: = facet_access_witness %.Self.ref.loc10_45 [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0.loc10_45: type = interface_witness_access %.Self.as_wit.loc10_45, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %int_32.loc10_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] -// CHECK:STDOUT: %i32.loc10_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] -// CHECK:STDOUT: %.loc10: type = where_expr %.Self [template = constants.%E_where.type] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_32, %i32.loc10_37 -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_45, %i32.loc10_50 -// CHECK:STDOUT: } // CHECK:STDOUT: %H.param: %E_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc10_26.2: type = splice_block %.loc10_26.1 [template = constants.%E_where.type] { +// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [template = constants.%E.type] +// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc10_32: %E.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %F.ref.loc10_32: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit.loc10_32: = facet_access_witness %.Self.ref.loc10_32 [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0.loc10_32: type = interface_witness_access %.Self.as_wit.loc10_32, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %int_32.loc10_37: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc10_37: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.Self.ref.loc10_45: %E.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %F.ref.loc10_45: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit.loc10_45: = facet_access_witness %.Self.ref.loc10_45 [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0.loc10_45: type = interface_witness_access %.Self.as_wit.loc10_45, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %int_32.loc10_50: Core.IntLiteral = int_value 32 [template = constants.%int_32] +// CHECK:STDOUT: %i32.loc10_50: type = class_type @Int, @Int(constants.%int_32) [template = constants.%i32] +// CHECK:STDOUT: %.loc10_26.1: type = where_expr %.Self [template = constants.%E_where.type] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_32, %i32.loc10_37 +// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc10_45, %i32.loc10_50 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %H.loc10_20.1: %E_where.type = bind_symbolic_name H, 0, %H.param [symbolic = %H.loc10_20.2 (constants.%H)] // CHECK:STDOUT: } // CHECK:STDOUT: %OneRewriteAgain.decl: %OneRewriteAgain.type = fn_decl @OneRewriteAgain [template = constants.%OneRewriteAgain] { // CHECK:STDOUT: %I.patt.loc14_20.1: %E_where.type = symbolic_binding_pattern I, 0 [symbolic = %I.patt.loc14_20.2 (constants.%I.patt)] // CHECK:STDOUT: %I.param_patt: %E_where.type = value_param_pattern %I.patt.loc14_20.1, runtime_param [symbolic = %I.patt.loc14_20.2 (constants.%I.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [template = constants.%E.type] -// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %F.ref: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// 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: %.loc14: type = where_expr %.Self [template = constants.%E_where.type] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 -// CHECK:STDOUT: } // CHECK:STDOUT: %I.param: %E_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc14_26.2: type = splice_block %.loc14_26.1 [template = constants.%E_where.type] { +// CHECK:STDOUT: %E.ref: type = name_ref E, file.%E.decl [template = constants.%E.type] +// CHECK:STDOUT: %.Self: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %E.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %F.ref: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// 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: %.loc14_26.1: type = where_expr %.Self [template = constants.%E_where.type] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %I.loc14_20.1: %E_where.type = bind_symbolic_name I, 0, %I.param [symbolic = %I.loc14_20.2 (constants.%I)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -648,52 +658,56 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %M.patt.loc9_17.1: %J_where.type = symbolic_binding_pattern M, 0 [symbolic = %M.patt.loc9_17.2 (constants.%M.patt)] // CHECK:STDOUT: %M.param_patt: %J_where.type = value_param_pattern %M.patt.loc9_17.1, runtime_param [symbolic = %M.patt.loc9_17.2 (constants.%M.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc9_29: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %K.ref: %assoc_type = name_ref K, @J.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit.loc9_29: = facet_access_witness %.Self.ref.loc9_29 [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit.loc9_29, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %.loc9_35.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_35.2: type = converted %.loc9_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.Self.ref.loc9_41: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %L.ref: %assoc_type = name_ref L, @J.%assoc1 [template = constants.%assoc1] -// CHECK:STDOUT: %.Self.as_wit.loc9_41: = facet_access_witness %.Self.ref.loc9_41 [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem1: type = interface_witness_access %.Self.as_wit.loc9_41, element1 [symbolic = constants.%impl.elem1] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc9_46.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc9_46.2: type = converted %bool.make_type, %.loc9_46.1 [template = bool] -// CHECK:STDOUT: %.loc9_23: type = where_expr %.Self [template = constants.%J_where.type] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_35.2 -// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc9_46.2 -// CHECK:STDOUT: } // CHECK:STDOUT: %M.param: %J_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc9_23.2: type = splice_block %.loc9_23.1 [template = constants.%J_where.type] { +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc9_29: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %K.ref: %assoc_type = name_ref K, @J.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit.loc9_29: = facet_access_witness %.Self.ref.loc9_29 [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit.loc9_29, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %.loc9_35.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_35.2: type = converted %.loc9_35.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.Self.ref.loc9_41: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %L.ref: %assoc_type = name_ref L, @J.%assoc1 [template = constants.%assoc1] +// CHECK:STDOUT: %.Self.as_wit.loc9_41: = facet_access_witness %.Self.ref.loc9_41 [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem1: type = interface_witness_access %.Self.as_wit.loc9_41, element1 [symbolic = constants.%impl.elem1] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc9_46.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc9_46.2: type = converted %bool.make_type, %.loc9_46.1 [template = bool] +// CHECK:STDOUT: %.loc9_23.1: type = where_expr %.Self [template = constants.%J_where.type] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_35.2 +// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc9_46.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %M.loc9_17.1: %J_where.type = bind_symbolic_name M, 0, %M.param [symbolic = %M.loc9_17.2 (constants.%M)] // CHECK:STDOUT: } // CHECK:STDOUT: %Reversed.decl: %Reversed.type = fn_decl @Reversed [template = constants.%Reversed] { // CHECK:STDOUT: %N.patt.loc11_13.1: %J_where.type = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc11_13.2 (constants.%N.patt)] // CHECK:STDOUT: %N.param_patt: %J_where.type = value_param_pattern %N.patt.loc11_13.1, runtime_param [symbolic = %N.patt.loc11_13.2 (constants.%N.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] -// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref.loc11_25: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %L.ref: %assoc_type = name_ref L, @J.%assoc1 [template = constants.%assoc1] -// CHECK:STDOUT: %.Self.as_wit.loc11_25: = facet_access_witness %.Self.ref.loc11_25 [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem1: type = interface_witness_access %.Self.as_wit.loc11_25, element1 [symbolic = constants.%impl.elem1] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc11_30.2: type = converted %bool.make_type, %.loc11_30.1 [template = bool] -// CHECK:STDOUT: %.Self.ref.loc11_39: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %K.ref: %assoc_type = name_ref K, @J.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit.loc11_39: = facet_access_witness %.Self.ref.loc11_39 [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit.loc11_39, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %.loc11_45.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_45.2: type = converted %.loc11_45.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_19: type = where_expr %.Self [template = constants.%J_where.type] { -// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc11_30.2 -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc11_45.2 -// CHECK:STDOUT: } // CHECK:STDOUT: %N.param: %J_where.type = value_param runtime_param +// CHECK:STDOUT: %.loc11_19.2: type = splice_block %.loc11_19.1 [template = constants.%J_where.type] { +// CHECK:STDOUT: %J.ref: type = name_ref J, file.%J.decl [template = constants.%J.type] +// CHECK:STDOUT: %.Self: %J.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref.loc11_25: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %L.ref: %assoc_type = name_ref L, @J.%assoc1 [template = constants.%assoc1] +// CHECK:STDOUT: %.Self.as_wit.loc11_25: = facet_access_witness %.Self.ref.loc11_25 [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem1: type = interface_witness_access %.Self.as_wit.loc11_25, element1 [symbolic = constants.%impl.elem1] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc11_30.2: type = converted %bool.make_type, %.loc11_30.1 [template = bool] +// CHECK:STDOUT: %.Self.ref.loc11_39: %J.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %K.ref: %assoc_type = name_ref K, @J.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit.loc11_39: = facet_access_witness %.Self.ref.loc11_39 [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit.loc11_39, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %.loc11_45.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_45.2: type = converted %.loc11_45.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_19.1: type = where_expr %.Self [template = constants.%J_where.type] { +// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc11_30.2 +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc11_45.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %N.loc11_13.1: %J_where.type = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc11_13.2 (constants.%N)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -809,37 +823,41 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %Q.patt.loc8_16.1: %O_where.type.1 = symbolic_binding_pattern Q, 0 [symbolic = %Q.patt.loc8_16.2 (constants.%Q.patt)] // CHECK:STDOUT: %Q.param_patt: %O_where.type.1 = value_param_pattern %Q.patt.loc8_16.1, runtime_param [symbolic = %Q.patt.loc8_16.2 (constants.%Q.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %O.ref: type = name_ref O, file.%O.decl [template = constants.%O.type] -// CHECK:STDOUT: %.Self: %O.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %O.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %P.ref: %assoc_type = name_ref P, @O.%assoc0 [template = constants.%assoc0.1] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// 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: %.loc8: type = where_expr %.Self [template = constants.%O_where.type.1] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 -// CHECK:STDOUT: } // CHECK:STDOUT: %Q.param: %O_where.type.1 = value_param runtime_param +// CHECK:STDOUT: %.loc8_22.2: type = splice_block %.loc8_22.1 [template = constants.%O_where.type.1] { +// CHECK:STDOUT: %O.ref: type = name_ref O, file.%O.decl [template = constants.%O.type] +// CHECK:STDOUT: %.Self: %O.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %O.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %P.ref: %assoc_type = name_ref P, @O.%assoc0 [template = constants.%assoc0.1] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// 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: %.loc8_22.1: type = where_expr %.Self [template = constants.%O_where.type.1] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %i32 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %Q.loc8_16.1: %O_where.type.1 = bind_symbolic_name Q, 0, %Q.param [symbolic = %Q.loc8_16.2 (constants.%Q)] // CHECK:STDOUT: } // CHECK:STDOUT: %WithBool.decl: %WithBool.type = fn_decl @WithBool [template = constants.%WithBool] { // CHECK:STDOUT: %R.patt.loc10_13.1: %O_where.type.2 = symbolic_binding_pattern R, 0 [symbolic = %R.patt.loc10_13.2 (constants.%R.patt)] // CHECK:STDOUT: %R.param_patt: %O_where.type.2 = value_param_pattern %R.patt.loc10_13.1, runtime_param [symbolic = %R.patt.loc10_13.2 (constants.%R.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %O.ref: type = name_ref O, file.%O.decl [template = constants.%O.type] -// CHECK:STDOUT: %.Self: %O.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %O.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %P.ref: %assoc_type = name_ref P, @O.%assoc0 [template = constants.%assoc0.1] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc10_30.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc10_30.2: type = converted %bool.make_type, %.loc10_30.1 [template = bool] -// CHECK:STDOUT: %.loc10_19: type = where_expr %.Self [template = constants.%O_where.type.2] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_30.2 -// CHECK:STDOUT: } // CHECK:STDOUT: %R.param: %O_where.type.2 = value_param runtime_param +// CHECK:STDOUT: %.loc10_19.2: type = splice_block %.loc10_19.1 [template = constants.%O_where.type.2] { +// CHECK:STDOUT: %O.ref: type = name_ref O, file.%O.decl [template = constants.%O.type] +// CHECK:STDOUT: %.Self: %O.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %O.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %P.ref: %assoc_type = name_ref P, @O.%assoc0 [template = constants.%assoc0.1] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc10_30.1: type = value_of_initializer %bool.make_type [template = bool] +// CHECK:STDOUT: %.loc10_30.2: type = converted %bool.make_type, %.loc10_30.1 [template = bool] +// CHECK:STDOUT: %.loc10_19.1: type = where_expr %.Self [template = constants.%O_where.type.2] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc10_30.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %R.loc10_13.1: %O_where.type.2 = bind_symbolic_name R, 0, %R.param [symbolic = %R.loc10_13.2 (constants.%R)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -938,36 +956,40 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %V.patt.loc9_10.1: %S_where.type.1 = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc9_10.2 (constants.%V.patt)] // CHECK:STDOUT: %V.param_patt: %S_where.type.1 = value_param_pattern %V.patt.loc9_10.1, runtime_param [symbolic = %V.patt.loc9_10.2 (constants.%V.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %S.ref: type = name_ref S, file.%S.decl [template = constants.%S.type] -// CHECK:STDOUT: %.Self: %S.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %S.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @S.%assoc0 [template = constants.%assoc0.1] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %.loc9_28.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_28.2: type = converted %.loc9_28.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_16: type = where_expr %.Self [template = constants.%S_where.type.1] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_28.2 -// CHECK:STDOUT: } // CHECK:STDOUT: %V.param: %S_where.type.1 = value_param runtime_param +// CHECK:STDOUT: %.loc9_16.2: type = splice_block %.loc9_16.1 [template = constants.%S_where.type.1] { +// CHECK:STDOUT: %S.ref: type = name_ref S, file.%S.decl [template = constants.%S.type] +// CHECK:STDOUT: %.Self: %S.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %S.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @S.%assoc0 [template = constants.%assoc0.1] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %.loc9_28.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc9_28.2: type = converted %.loc9_28.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_16.1: type = where_expr %.Self [template = constants.%S_where.type.1] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, %.loc9_28.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %V.loc9_10.1: %S_where.type.1 = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc9_10.2 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %WithU.decl: %WithU.type = fn_decl @WithU [template = constants.%WithU] { // CHECK:STDOUT: %W.patt.loc11_10.1: %S_where.type.2 = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc11_10.2 (constants.%W.patt)] // CHECK:STDOUT: %W.param_patt: %S_where.type.2 = value_param_pattern %W.patt.loc11_10.1, runtime_param [symbolic = %W.patt.loc11_10.2 (constants.%W.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %S.ref: type = name_ref S, file.%S.decl [template = constants.%S.type] -// CHECK:STDOUT: %.Self: %S.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %S.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %U.ref: %assoc_type = name_ref U, @S.%assoc1 [template = constants.%assoc1] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem1: type = interface_witness_access %.Self.as_wit, element1 [symbolic = constants.%impl.elem1] -// CHECK:STDOUT: %.loc11_28.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc11_28.2: type = converted %.loc11_28.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc11_16: type = where_expr %.Self [template = constants.%S_where.type.2] { -// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc11_28.2 -// CHECK:STDOUT: } // CHECK:STDOUT: %W.param: %S_where.type.2 = value_param runtime_param +// CHECK:STDOUT: %.loc11_16.2: type = splice_block %.loc11_16.1 [template = constants.%S_where.type.2] { +// CHECK:STDOUT: %S.ref: type = name_ref S, file.%S.decl [template = constants.%S.type] +// CHECK:STDOUT: %.Self: %S.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %S.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %U.ref: %assoc_type = name_ref U, @S.%assoc1 [template = constants.%assoc1] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem1: type = interface_witness_access %.Self.as_wit, element1 [symbolic = constants.%impl.elem1] +// CHECK:STDOUT: %.loc11_28.1: %empty_tuple.type = tuple_literal () +// CHECK:STDOUT: %.loc11_28.2: type = converted %.loc11_28.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc11_16.1: type = where_expr %.Self [template = constants.%S_where.type.2] { +// CHECK:STDOUT: requirement_rewrite %impl.elem1, %.loc11_28.2 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %W.loc11_10.1: %S_where.type.2 = bind_symbolic_name W, 0, %W.param [symbolic = %W.loc11_10.2 (constants.%W)] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1181,18 +1203,20 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %X.patt.loc16_24.1: = symbolic_binding_pattern X, 0 [symbolic = %X.patt.loc16_24.2 (constants.%X.patt)] // CHECK:STDOUT: %X.param_patt: = value_param_pattern %X.patt.loc16_24.1, runtime_param [symbolic = %X.patt.loc16_24.2 (constants.%X.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %Member.ref: %assoc_type = name_ref Member, @I.%assoc0 [template = constants.%assoc0.1] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] -// CHECK:STDOUT: %.loc16_46: type = converted %int_2, [template = ] -// CHECK:STDOUT: %.loc16_30: type = where_expr %.Self [template = ] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0, -// CHECK:STDOUT: } // CHECK:STDOUT: %X.param: = value_param runtime_param +// CHECK:STDOUT: %.loc16_30.2: type = splice_block %.loc16_30.1 [template = ] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %Member.ref: %assoc_type = name_ref Member, @I.%assoc0 [template = constants.%assoc0.1] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [template = constants.%int_2] +// CHECK:STDOUT: %.loc16_46: type = converted %int_2, [template = ] +// CHECK:STDOUT: %.loc16_30.1: type = where_expr %.Self [template = ] { +// CHECK:STDOUT: requirement_rewrite %impl.elem0, +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %X: = bind_symbolic_name X, 0, %X.param [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -1227,7 +1251,6 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %empty_struct_type: type = struct_type {} [template] // CHECK:STDOUT: %complete_type: = complete_type_witness %empty_struct_type [template] // CHECK:STDOUT: %interface: = interface_witness () [template] -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic] // CHECK:STDOUT: %type_where: type = facet_type [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -1253,12 +1276,6 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: %D.ref: type = name_ref D, file.%D.decl [template = constants.%D] // CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [template = constants.%A.type] // CHECK:STDOUT: } -// CHECK:STDOUT: %.Self: type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %A.ref: type = name_ref A, %A.decl [template = constants.%A.type] -// CHECK:STDOUT: %.loc15: type = where_expr %.Self [template = constants.%type_where] { -// CHECK:STDOUT: requirement_impls %.Self.ref, %A.ref -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @A { @@ -1343,59 +1360,6 @@ let K: (E where .F = .Self.G) = bool; // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %E.decl: type = interface_decl @E [template = constants.%E.type] {} {} -// CHECK:STDOUT: %E.ref.loc18: type = name_ref E, %E.decl [template = constants.%E.type] -// CHECK:STDOUT: %.Self.1: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref.loc18_17: %E.type = name_ref .Self, %.Self.1 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %F.ref.loc18: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0.1] -// CHECK:STDOUT: %.Self.as_wit.loc18_17: = facet_access_witness %.Self.ref.loc18_17 [symbolic = constants.%.Self.as_wit.1] -// CHECK:STDOUT: %impl.elem0.loc18: type = interface_witness_access %.Self.as_wit.loc18_17, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc18_22.1: type = value_of_initializer %bool.make_type [template = bool] -// CHECK:STDOUT: %.loc18_22.2: type = converted %bool.make_type, %.loc18_22.1 [template = bool] -// CHECK:STDOUT: %.Self.ref.loc18_31: %E.type = name_ref .Self, %.Self.1 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %G.ref.loc18: %assoc_type = name_ref G, @E.%assoc1 [template = constants.%assoc1] -// CHECK:STDOUT: %.Self.as_wit.loc18_31: = facet_access_witness %.Self.ref.loc18_31 [symbolic = constants.%.Self.as_wit.1] -// CHECK:STDOUT: %impl.elem1.loc18: type = interface_witness_access %.Self.as_wit.loc18_31, element1 [symbolic = constants.%impl.elem1.1] -// CHECK:STDOUT: %.loc18_37.1: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc18_37.2: type = converted %.loc18_37.1, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc18_11: type = where_expr %.Self.1 [template = constants.%E_where.type.1] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc18, %.loc18_22.2 -// CHECK:STDOUT: requirement_rewrite %impl.elem1.loc18, %.loc18_37.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: %E.ref.loc27: type = name_ref E, %E.decl [template = constants.%E.type] -// CHECK:STDOUT: %.Self.2: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref.loc27_18: %E.type = name_ref .Self, %.Self.2 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %F.ref.loc27: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0.1] -// CHECK:STDOUT: %.Self.as_wit.loc27_18: = facet_access_witness %.Self.ref.loc27_18 [symbolic = constants.%.Self.as_wit.1] -// CHECK:STDOUT: %impl.elem0.loc27: type = interface_witness_access %.Self.as_wit.loc27_18, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %.loc27_24.1: %empty_struct_type = struct_literal () -// CHECK:STDOUT: %.loc27_24.2: type = converted %.loc27_24.1, constants.%empty_struct_type [template = constants.%empty_struct_type] -// CHECK:STDOUT: %.loc27_12: type = where_expr %.Self.2 [template = constants.%E_where.type.2] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc27, %.loc27_24.2 -// CHECK:STDOUT: } -// CHECK:STDOUT: %.Self.3: %E_where.type.2 = bind_symbolic_name .Self [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %.Self.ref.loc27_33: %E_where.type.2 = name_ref .Self, %.Self.3 [symbolic = constants.%.Self.2] -// CHECK:STDOUT: %G.ref.loc27: %assoc_type = name_ref G, @E.%assoc1 [template = constants.%assoc1] -// CHECK:STDOUT: %.Self.as_wit.loc27_33: = facet_access_witness %.Self.ref.loc27_33 [symbolic = constants.%.Self.as_wit.2] -// CHECK:STDOUT: %impl.elem1.loc27: type = interface_witness_access %.Self.as_wit.loc27_33, element1 [symbolic = constants.%impl.elem1.2] -// 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: %.loc27_27: type = where_expr %.Self.3 [template = constants.%E_where.type.3] { -// CHECK:STDOUT: requirement_rewrite %impl.elem1.loc27, %i32 -// CHECK:STDOUT: } -// CHECK:STDOUT: %E.ref.loc35: type = name_ref E, %E.decl [template = constants.%E.type] -// CHECK:STDOUT: %.Self.4: %E.type = bind_symbolic_name .Self [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %.Self.ref.loc35_17: %E.type = name_ref .Self, %.Self.4 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %F.ref.loc35: %assoc_type = name_ref F, @E.%assoc0 [template = constants.%assoc0.1] -// CHECK:STDOUT: %.Self.as_wit.loc35_17: = facet_access_witness %.Self.ref.loc35_17 [symbolic = constants.%.Self.as_wit.1] -// CHECK:STDOUT: %impl.elem0.loc35: type = interface_witness_access %.Self.as_wit.loc35_17, element0 [symbolic = constants.%impl.elem0] -// CHECK:STDOUT: %.Self.ref.loc35_22: %E.type = name_ref .Self, %.Self.4 [symbolic = constants.%.Self.1] -// CHECK:STDOUT: %G.ref.loc35: %assoc_type = name_ref G, @E.%assoc1 [template = constants.%assoc1] -// CHECK:STDOUT: %.Self.as_wit.loc35_27: = facet_access_witness %.Self.ref.loc35_22 [symbolic = constants.%.Self.as_wit.1] -// CHECK:STDOUT: %impl.elem1.loc35: type = interface_witness_access %.Self.as_wit.loc35_27, element1 [symbolic = constants.%impl.elem1.1] -// CHECK:STDOUT: %.loc35: type = where_expr %.Self.4 [template = constants.%E_where.type.4] { -// CHECK:STDOUT: requirement_rewrite %impl.elem0.loc35, %impl.elem1.loc35 -// CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: interface @E { diff --git a/toolchain/check/testdata/where_expr/fail_not_facet.carbon b/toolchain/check/testdata/where_expr/fail_not_facet.carbon index d9ea24d531b0..8b5722043f57 100644 --- a/toolchain/check/testdata/where_expr/fail_not_facet.carbon +++ b/toolchain/check/testdata/where_expr/fail_not_facet.carbon @@ -68,15 +68,17 @@ var v: e where .x = 3; // CHECK:STDOUT: %T.patt.loc8_6.1: = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: = value_param_pattern %T.patt.loc8_6.1, runtime_param [symbolic = %T.patt.loc8_6.2 (constants.%T.patt)] // CHECK:STDOUT: } { -// 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: %.Self: = bind_symbolic_name .Self [template = ] -// CHECK:STDOUT: %.Self.ref: = name_ref .Self, %.Self [template = ] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc8: type = where_expr %.Self [template = ] { -// CHECK:STDOUT: requirement_equivalent %.Self.ref, %bool.make_type -// CHECK:STDOUT: } // CHECK:STDOUT: %T.param: = value_param runtime_param +// CHECK:STDOUT: %.loc8_14.2: type = splice_block %.loc8_14.1 [template = ] { +// 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: %.Self: = bind_symbolic_name .Self [template = ] +// CHECK:STDOUT: %.Self.ref: = name_ref .Self, %.Self [template = ] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc8_14.1: type = where_expr %.Self [template = ] { +// CHECK:STDOUT: requirement_equivalent %.Self.ref, %bool.make_type +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %T: = bind_symbolic_name T, 0, %T.param [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -119,14 +121,16 @@ var v: e where .x = 3; // CHECK:STDOUT: %U.patt.loc8_6.1: = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc8_6.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: = value_param_pattern %U.patt.loc8_6.1, runtime_param [symbolic = %U.patt.loc8_6.2 (constants.%U.patt)] // CHECK:STDOUT: } { -// CHECK:STDOUT: %NOT_DECLARED.ref: = name_ref NOT_DECLARED, [template = ] -// CHECK:STDOUT: %.Self: = bind_symbolic_name .Self [template = ] -// CHECK:STDOUT: %.Self.ref: = name_ref .Self, %.Self [template = ] -// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] -// CHECK:STDOUT: %.loc8: type = where_expr %.Self [template = ] { -// CHECK:STDOUT: requirement_equivalent %.Self.ref, %bool.make_type -// CHECK:STDOUT: } // CHECK:STDOUT: %U.param: = value_param runtime_param +// CHECK:STDOUT: %.loc8_23.2: type = splice_block %.loc8_23.1 [template = ] { +// CHECK:STDOUT: %NOT_DECLARED.ref: = name_ref NOT_DECLARED, [template = ] +// CHECK:STDOUT: %.Self: = bind_symbolic_name .Self [template = ] +// CHECK:STDOUT: %.Self.ref: = name_ref .Self, %.Self [template = ] +// CHECK:STDOUT: %bool.make_type: init type = call constants.%Bool() [template = bool] +// CHECK:STDOUT: %.loc8_23.1: type = where_expr %.Self [template = ] { +// CHECK:STDOUT: requirement_equivalent %.Self.ref, %bool.make_type +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %U: = bind_symbolic_name U, 0, %U.param [template = ] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -144,7 +148,6 @@ var v: e where .x = 3; // CHECK:STDOUT: --- fail_var.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { @@ -160,14 +163,6 @@ var v: e where .x = 3; // CHECK:STDOUT: .v = %v // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %e.ref: = name_ref e, [template = ] -// CHECK:STDOUT: %.Self: = bind_symbolic_name .Self [template = ] -// CHECK:STDOUT: %.Self.ref: = name_ref .Self, %.Self [template = ] -// CHECK:STDOUT: %x.ref: = name_ref x, [template = ] -// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [template = constants.%int_3] -// CHECK:STDOUT: %.loc7: type = where_expr %.Self [template = ] { -// CHECK:STDOUT: requirement_rewrite %x.ref, -// CHECK:STDOUT: } // CHECK:STDOUT: %v.var: ref = var v // CHECK:STDOUT: %v: ref = bind_name v, %v.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/where_expr/non_generic.carbon b/toolchain/check/testdata/where_expr/non_generic.carbon index b60be9a0466f..9993cd2251df 100644 --- a/toolchain/check/testdata/where_expr/non_generic.carbon +++ b/toolchain/check/testdata/where_expr/non_generic.carbon @@ -50,18 +50,20 @@ fn NotGenericF(U: I where .T == i32) {} // CHECK:STDOUT: %U.patt: %I_where.type = binding_pattern U // CHECK:STDOUT: %U.param_patt: %I_where.type = value_param_pattern %U.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] -// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self] -// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @I.%assoc0 [template = constants.%assoc0] -// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] -// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] -// 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: %.loc14: type = where_expr %.Self [template = constants.%I_where.type] { -// CHECK:STDOUT: requirement_equivalent %impl.elem0, %i32 -// CHECK:STDOUT: } // CHECK:STDOUT: %U.param: %I_where.type = value_param runtime_param0 +// CHECK:STDOUT: %.loc14_21.2: type = splice_block %.loc14_21.1 [template = constants.%I_where.type] { +// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] +// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic = constants.%.Self] +// CHECK:STDOUT: %T.ref: %assoc_type = name_ref T, @I.%assoc0 [template = constants.%assoc0] +// CHECK:STDOUT: %.Self.as_wit: = facet_access_witness %.Self.ref [symbolic = constants.%.Self.as_wit] +// CHECK:STDOUT: %impl.elem0: type = interface_witness_access %.Self.as_wit, element0 [symbolic = constants.%impl.elem0] +// 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: %.loc14_21.1: type = where_expr %.Self [template = constants.%I_where.type] { +// CHECK:STDOUT: requirement_equivalent %impl.elem0, %i32 +// CHECK:STDOUT: } +// CHECK:STDOUT: } // CHECK:STDOUT: %U: %I_where.type = bind_name U, %U.param // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/sem_ir/file.h b/toolchain/sem_ir/file.h index 9aaf1b163bb9..024ff6c74c40 100644 --- a/toolchain/sem_ir/file.h +++ b/toolchain/sem_ir/file.h @@ -35,6 +35,23 @@ namespace Carbon::SemIR { +// An expression that may contain control flow, represented as a +// single-entry/single-exit region. `block_ids` are the blocks that are part of +// evaluation of the expression, and `result_id` represents the result of +// evaluating the expression. `block_ids` consists of all blocks that are +// dominated by `block_ids.front()` and post-dominated by `block_ids.back()`, +// and should be in lexical order. `result_id` will be in `block_ids.back()` or +// some block that dominates it. +// +// `block_ids` cannot be empty. If it has a single element, then the region +// should be used via a `SpliceBlock` inst. Otherwise, the region should be used +// by branching to the entry block, and the last inst in the exit block will +// likewise be a branch. +struct ExprRegion { + llvm::SmallVector block_ids; + InstId result_id; +}; + // Provides semantic analysis on a Parse::Tree. class File : public Printable { public: @@ -166,6 +183,11 @@ class File : public Printable { auto constants() -> ConstantStore& { return constants_; } auto constants() const -> const ConstantStore& { return constants_; } + auto expr_regions() -> ValueStore& { return expr_regions_; } + auto expr_regions() const -> const ValueStore& { + return expr_regions_; + } + auto top_inst_block_id() const -> InstBlockId { return top_inst_block_id_; } auto set_top_inst_block_id(InstBlockId block_id) -> void { top_inst_block_id_ = block_id; @@ -272,6 +294,10 @@ class File : public Printable { // Descriptions of types used in this file. TypeStore types_ = TypeStore(this); + + // Single-entry/single-exit regions that are referenced as units, e.g. because + // they represent expressions. + ValueStore expr_regions_; }; // The expression category of a sem_ir instruction. See /docs/design/values.md diff --git a/toolchain/sem_ir/id_kind.h b/toolchain/sem_ir/id_kind.h index 2ed5889ec94f..7c86f6b1c771 100644 --- a/toolchain/sem_ir/id_kind.h +++ b/toolchain/sem_ir/id_kind.h @@ -142,7 +142,7 @@ using IdKind = TypeEnum< InstId, AbsoluteInstId, AnyRawId, ConstantId, EntityNameId, CompileTimeBindIndex, RuntimeParamIndex, FacetTypeId, FunctionId, ClassId, InterfaceId, ImplId, GenericId, SpecificId, ImportIRId, ImportIRInstId, - LocId, BoolValue, IntKind, NameId, NameScopeId, InstBlockId, + LocId, BoolValue, IntKind, NameId, NameScopeId, InstBlockId, ExprRegionId, StructTypeFieldsId, TypeId, TypeBlockId, ElementIndex, LibraryNameId, FloatKind>; diff --git a/toolchain/sem_ir/ids.h b/toolchain/sem_ir/ids.h index 8d98d7097896..6a9b60c62e26 100644 --- a/toolchain/sem_ir/ids.h +++ b/toolchain/sem_ir/ids.h @@ -29,6 +29,7 @@ struct ImportIRInst; struct Impl; struct Interface; struct StructTypeField; +struct ExprRegion; struct TypeInfo; // The ID of an instruction. @@ -551,6 +552,20 @@ constexpr InstBlockId InstBlockId::GlobalInit = InstBlockId(3); constexpr InstBlockId InstBlockId::Invalid = InstBlockId(InvalidIndex); constexpr InstBlockId InstBlockId::Unreachable = InstBlockId(InvalidIndex - 1); +// TODO: Move this out of sem_ir and into check, if we don't wind up using it +// in the SemIR for expression patterns. +struct ExprRegionId : public IdBase { + static constexpr llvm::StringLiteral Label = "region"; + using ValueType = ExprRegion; + + // An explicitly invalid ID. + static const ExprRegionId Invalid; + + using IdBase::IdBase; +}; + +constexpr ExprRegionId ExprRegionId::Invalid = ExprRegionId(InvalidIndex); + // The ID of a struct type field block. struct StructTypeFieldsId : public IdBase { static constexpr llvm::StringLiteral Label = "struct_type_fields"; diff --git a/toolchain/sem_ir/yaml_test.cpp b/toolchain/sem_ir/yaml_test.cpp index 1bbafae77b48..88b1129438fe 100644 --- a/toolchain/sem_ir/yaml_test.cpp +++ b/toolchain/sem_ir/yaml_test.cpp @@ -97,7 +97,9 @@ TEST(SemIRTest, YAML) { Pair("import_refs", Yaml::Mapping(IsEmpty())), Pair("global_init", Yaml::Mapping(IsEmpty())), Pair("inst_block4", Yaml::Mapping(Each(Pair(_, inst_id)))), - Pair("inst_block5", Yaml::Mapping(Each(Pair(_, inst_id))))))))); + Pair("inst_block5", Yaml::Mapping(Each(Pair(_, inst_id)))), + Pair("inst_block6", Yaml::Mapping(Each(Pair(_, inst_id)))), + Pair("inst_block7", Yaml::Mapping(Each(Pair(_, inst_id))))))))); auto root = Yaml::Sequence(ElementsAre(Yaml::Mapping( ElementsAre(Pair("filename", "test.carbon"), Pair("sem_ir", file)))));