diff --git a/toolchain/check/handle_call_expr.cpp b/toolchain/check/handle_call_expr.cpp index dd4ef3a84beea..420313bb704b2 100644 --- a/toolchain/check/handle_call_expr.cpp +++ b/toolchain/check/handle_call_expr.cpp @@ -26,11 +26,10 @@ auto HandleParseNode(Context& context, Parse::CallExprId node_id) -> bool { // Process the final explicit call argument now, but leave the arguments // block on the stack until the end of this function. context.param_and_arg_refs_stack().EndNoPop(Parse::NodeKind::CallExprStart); - auto [call_expr_node_id, callee_id] = - context.node_stack().PopWithNodeId(); + auto callee_id = context.node_stack().Pop(); auto call_id = PerformCall( - context, call_expr_node_id, callee_id, + context, node_id, callee_id, context.param_and_arg_refs_stack().PeekCurrentBlockContents()); context.param_and_arg_refs_stack().PopAndDiscard(); diff --git a/toolchain/check/testdata/array/array_in_place.carbon b/toolchain/check/testdata/array/array_in_place.carbon index 9a94dd1bac866..837dd6fc2ac07 100644 --- a/toolchain/check/testdata/array/array_in_place.carbon +++ b/toolchain/check/testdata/array/array_in_place.carbon @@ -100,15 +100,15 @@ fn G() { // CHECK:STDOUT: %.loc14_42.1: Core.IntLiteral = int_value 0 [template = constants.%.6] // CHECK:STDOUT: %.loc14_42.2: ref %tuple.type.2 = array_index %v.var, %.loc14_42.1 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.call.loc14_35: init %tuple.type.2 = call %F.ref.loc14_34() to %.loc14_42.3 +// CHECK:STDOUT: %F.call.loc14_36: init %tuple.type.2 = call %F.ref.loc14_34() to %.loc14_42.3 // CHECK:STDOUT: %F.ref.loc14_39: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_42.6: ref %tuple.type.2 = splice_block %.loc14_42.5 { // CHECK:STDOUT: %.loc14_42.4: Core.IntLiteral = int_value 1 [template = constants.%.7] // CHECK:STDOUT: %.loc14_42.5: ref %tuple.type.2 = array_index %v.var, %.loc14_42.4 // CHECK:STDOUT: } -// CHECK:STDOUT: %F.call.loc14_40: init %tuple.type.2 = call %F.ref.loc14_39() to %.loc14_42.6 -// CHECK:STDOUT: %.loc14_42.7: %tuple.type.3 = tuple_literal (%F.call.loc14_35, %F.call.loc14_40) -// CHECK:STDOUT: %.loc14_42.8: init %.3 = array_init (%F.call.loc14_35, %F.call.loc14_40) to %v.var +// CHECK:STDOUT: %F.call.loc14_41: init %tuple.type.2 = call %F.ref.loc14_39() to %.loc14_42.6 +// CHECK:STDOUT: %.loc14_42.7: %tuple.type.3 = tuple_literal (%F.call.loc14_36, %F.call.loc14_41) +// CHECK:STDOUT: %.loc14_42.8: init %.3 = array_init (%F.call.loc14_36, %F.call.loc14_41) to %v.var // CHECK:STDOUT: %.loc14_43: init %.3 = converted %.loc14_42.7, %.loc14_42.8 // CHECK:STDOUT: assign %v.var, %.loc14_43 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/array/assign_return_value.carbon b/toolchain/check/testdata/array/assign_return_value.carbon index 99c0fd26e2d6d..d9c805c4b4538 100644 --- a/toolchain/check/testdata/array/assign_return_value.carbon +++ b/toolchain/check/testdata/array/assign_return_value.carbon @@ -100,15 +100,15 @@ fn Run() { // CHECK:STDOUT: %t: ref %.31 = bind_name t, %t.var // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() -// CHECK:STDOUT: %.loc14_22.1: ref %tuple.type.2 = temporary_storage -// CHECK:STDOUT: %.loc14_22.2: ref %tuple.type.2 = temporary %.loc14_22.1, %F.call -// CHECK:STDOUT: %.loc14_22.3: ref %i32 = tuple_access %.loc14_22.2, element0 -// CHECK:STDOUT: %.loc14_22.4: %i32 = bind_value %.loc14_22.3 -// CHECK:STDOUT: %.loc14_22.5: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_22.6: ref %i32 = array_index %t.var, %.loc14_22.5 -// CHECK:STDOUT: %.loc14_22.7: init %i32 = initialize_from %.loc14_22.4 to %.loc14_22.6 -// CHECK:STDOUT: %.loc14_22.8: init %.31 = array_init (%.loc14_22.7) to %t.var -// CHECK:STDOUT: %.loc14_24: init %.31 = converted %F.call, %.loc14_22.8 +// CHECK:STDOUT: %.loc14_23.1: ref %tuple.type.2 = temporary_storage +// CHECK:STDOUT: %.loc14_23.2: ref %tuple.type.2 = temporary %.loc14_23.1, %F.call +// CHECK:STDOUT: %.loc14_23.3: ref %i32 = tuple_access %.loc14_23.2, element0 +// CHECK:STDOUT: %.loc14_23.4: %i32 = bind_value %.loc14_23.3 +// CHECK:STDOUT: %.loc14_23.5: Core.IntLiteral = int_value 0 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_23.6: ref %i32 = array_index %t.var, %.loc14_23.5 +// CHECK:STDOUT: %.loc14_23.7: init %i32 = initialize_from %.loc14_23.4 to %.loc14_23.6 +// CHECK:STDOUT: %.loc14_23.8: init %.31 = array_init (%.loc14_23.7) to %t.var +// CHECK:STDOUT: %.loc14_24: init %.31 = converted %F.call, %.loc14_23.8 // CHECK:STDOUT: assign %t.var, %.loc14_24 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/array/canonicalize_index.carbon b/toolchain/check/testdata/array/canonicalize_index.carbon index 7626990eda2d9..791e6bd2bbb28 100644 --- a/toolchain/check/testdata/array/canonicalize_index.carbon +++ b/toolchain/check/testdata/array/canonicalize_index.carbon @@ -150,15 +150,15 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc14_18.6, %.loc14_21.6) [template = constants.%.34] // CHECK:STDOUT: %.loc14_9.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] // CHECK:STDOUT: %.loc14_9.3: type = converted %int.make_type_signed.loc14, %.loc14_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_17.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc14_17.2: = bound_method %int.sadd, %.loc14_17.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc14_17.3: = specific_function %.loc14_17.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc14_17.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] -// CHECK:STDOUT: %.loc14_17.5: %i32 = converted %int.sadd, %.loc14_17.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc14_17: init Core.IntLiteral = call %.loc14_17.3(%.loc14_17.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc14_17.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_17 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_17.7: Core.IntLiteral = converted %int.sadd, %.loc14_17.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_23: type = array_type %.loc14_17.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc14_22.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc14_22.2: = bound_method %int.sadd, %.loc14_22.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc14_22.3: = specific_function %.loc14_22.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc14_22.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] +// CHECK:STDOUT: %.loc14_22.5: %i32 = converted %int.sadd, %.loc14_22.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc14_22: init Core.IntLiteral = call %.loc14_22.3(%.loc14_22.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc14_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_22 [template = constants.%.38] +// CHECK:STDOUT: %.loc14_22.7: Core.IntLiteral = converted %int.sadd, %.loc14_22.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc14_23: type = array_type %.loc14_22.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %a.var: ref %.39 = var a // CHECK:STDOUT: %a: ref %.39 = bind_name a, %a.var // CHECK:STDOUT: %.loc15_9.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -178,18 +178,18 @@ let c: [i32; ConvertToU32(3)]* = &a; // CHECK:STDOUT: %int.convert_checked.loc16_27: init %i32 = call %.loc16_27.4(%.loc16_27.1) [template = constants.%.34] // CHECK:STDOUT: %.loc16_27.5: %i32 = value_of_initializer %int.convert_checked.loc16_27 [template = constants.%.34] // CHECK:STDOUT: %.loc16_27.6: %i32 = converted %.loc16_27.1, %.loc16_27.5 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc16_26.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.6) [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc16_28.1: init %u32 = call %ConvertToU32.ref(%.loc16_27.6) [template = constants.%.44] // CHECK:STDOUT: %.loc16_9.2: type = value_of_initializer %int.make_type_signed.loc16 [template = constants.%i32] // CHECK:STDOUT: %.loc16_9.3: type = converted %int.make_type_signed.loc16, %.loc16_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_26.1: %Convert.type.6 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.16] -// CHECK:STDOUT: %.loc16_26.2: = bound_method %int.convert_checked.loc16_26.1, %.loc16_26.1 [template = constants.%.46] -// CHECK:STDOUT: %.loc16_26.3: = specific_function %.loc16_26.2, @Convert.5(constants.%.1) [template = constants.%.47] -// CHECK:STDOUT: %.loc16_26.4: %u32 = value_of_initializer %int.convert_checked.loc16_26.1 [template = constants.%.44] -// CHECK:STDOUT: %.loc16_26.5: %u32 = converted %int.convert_checked.loc16_26.1, %.loc16_26.4 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc16_26.2: init Core.IntLiteral = call %.loc16_26.3(%.loc16_26.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc16_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_26.2 [template = constants.%.38] -// CHECK:STDOUT: %.loc16_26.7: Core.IntLiteral = converted %int.convert_checked.loc16_26.1, %.loc16_26.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc16_29: type = array_type %.loc16_26.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc16_28.1: %Convert.type.6 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.16] +// CHECK:STDOUT: %.loc16_28.2: = bound_method %int.convert_checked.loc16_28.1, %.loc16_28.1 [template = constants.%.46] +// CHECK:STDOUT: %.loc16_28.3: = specific_function %.loc16_28.2, @Convert.5(constants.%.1) [template = constants.%.47] +// CHECK:STDOUT: %.loc16_28.4: %u32 = value_of_initializer %int.convert_checked.loc16_28.1 [template = constants.%.44] +// CHECK:STDOUT: %.loc16_28.5: %u32 = converted %int.convert_checked.loc16_28.1, %.loc16_28.4 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc16_28.2: init Core.IntLiteral = call %.loc16_28.3(%.loc16_28.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc16_28.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_28.2 [template = constants.%.38] +// CHECK:STDOUT: %.loc16_28.7: Core.IntLiteral = converted %int.convert_checked.loc16_28.1, %.loc16_28.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc16_29: type = array_type %.loc16_28.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %.loc16_30: type = ptr_type %.39 [template = constants.%.40] // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index 2198dcdd5ceae..8f6b69f36f281 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -12,7 +12,7 @@ fn Negate(n: i32) -> i32 = "int.snegate"; // CHECK:STDERR: fail_bound_negative.carbon:[[@LINE+3]]:14: error: array bound of -1 is negative [ArrayBoundNegative] // CHECK:STDERR: var a: [i32; Negate(1)]; -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: ^~~~~~~~~ var a: [i32; Negate(1)]; // CHECK:STDOUT: --- fail_bound_negative.carbon @@ -90,15 +90,15 @@ var a: [i32; Negate(1)]; // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc16_21.6) [template = constants.%.30] // CHECK:STDOUT: %.loc16_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc16_9.3: type = converted %int.make_type_signed, %.loc16_9.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc16_20.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc16_20.2: = bound_method %int.snegate, %.loc16_20.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc16_20.3: = specific_function %.loc16_20.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc16_20.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] -// CHECK:STDOUT: %.loc16_20.5: %i32 = converted %int.snegate, %.loc16_20.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc16_20: init Core.IntLiteral = call %.loc16_20.3(%.loc16_20.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc16_20.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_20 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_20.7: Core.IntLiteral = converted %int.snegate, %.loc16_20.6 [template = constants.%.34] -// CHECK:STDOUT: %.loc16_23: type = array_type %.loc16_20.7, %i32 [template = ] +// CHECK:STDOUT: %.loc16_22.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc16_22.2: = bound_method %int.snegate, %.loc16_22.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc16_22.3: = specific_function %.loc16_22.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc16_22.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] +// CHECK:STDOUT: %.loc16_22.5: %i32 = converted %int.snegate, %.loc16_22.4 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc16_22: init Core.IntLiteral = call %.loc16_22.3(%.loc16_22.5) [template = constants.%.34] +// CHECK:STDOUT: %.loc16_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc16_22 [template = constants.%.34] +// CHECK:STDOUT: %.loc16_22.7: Core.IntLiteral = converted %int.snegate, %.loc16_22.6 [template = constants.%.34] +// CHECK:STDOUT: %.loc16_23: type = array_type %.loc16_22.7, %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/as/no_prelude/tuple.carbon b/toolchain/check/testdata/as/no_prelude/tuple.carbon index 80f4559dc2467..81adc049530a2 100644 --- a/toolchain/check/testdata/as/no_prelude/tuple.carbon +++ b/toolchain/check/testdata/as/no_prelude/tuple.carbon @@ -77,21 +77,21 @@ fn Var() { // 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_24.1: ref %X = temporary_storage -// CHECK:STDOUT: %Make.call.loc19_24: init %X = call %Make.ref.loc19_20() to %.loc19_24.1 +// 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 // CHECK:STDOUT: %Make.ref.loc19_28: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] -// CHECK:STDOUT: %.loc19_32.1: ref %X = temporary_storage -// CHECK:STDOUT: %Make.call.loc19_32: init %X = call %Make.ref.loc19_28() to %.loc19_32.1 -// CHECK:STDOUT: %.loc19_34: %tuple.type.2 = tuple_literal (%Make.call.loc19_24, %Make.call.loc19_32) +// CHECK:STDOUT: %.loc19_33.1: ref %X = temporary_storage +// CHECK:STDOUT: %Make.call.loc19_33: init %X = call %Make.ref.loc19_28() to %.loc19_33.1 +// CHECK:STDOUT: %.loc19_34: %tuple.type.2 = tuple_literal (%Make.call.loc19_25, %Make.call.loc19_33) // CHECK:STDOUT: %X.ref.loc19_40: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %X.ref.loc19_43: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %.loc19_44.1: %tuple.type.1 = tuple_literal (%X.ref.loc19_40, %X.ref.loc19_43) // CHECK:STDOUT: %.loc19_44.2: type = converted %.loc19_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc19_24.2: ref %X = temporary %.loc19_24.1, %Make.call.loc19_24 -// CHECK:STDOUT: %.loc19_24.3: %X = bind_value %.loc19_24.2 -// CHECK:STDOUT: %.loc19_32.2: ref %X = temporary %.loc19_32.1, %Make.call.loc19_32 -// CHECK:STDOUT: %.loc19_32.3: %X = bind_value %.loc19_32.2 -// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc19_24.3, %.loc19_32.3) +// CHECK:STDOUT: %.loc19_25.2: ref %X = temporary %.loc19_25.1, %Make.call.loc19_25 +// CHECK:STDOUT: %.loc19_25.3: %X = bind_value %.loc19_25.2 +// CHECK:STDOUT: %.loc19_33.2: ref %X = temporary %.loc19_33.1, %Make.call.loc19_33 +// CHECK:STDOUT: %.loc19_33.3: %X = bind_value %.loc19_33.2 +// CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc19_25.3, %.loc19_33.3) // CHECK:STDOUT: %.loc19_45: %tuple.type.2 = converted %.loc19_34, %tuple // CHECK:STDOUT: %a: %tuple.type.2 = bind_name a, %.loc19_45 // CHECK:STDOUT: return @@ -107,16 +107,16 @@ fn Var() { // 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] // CHECK:STDOUT: %.loc24_34.1: ref %X = tuple_access %b.var, element0 -// CHECK:STDOUT: %Make.call.loc24_24: init %X = call %Make.ref.loc24_20() to %.loc24_34.1 +// CHECK:STDOUT: %Make.call.loc24_25: init %X = call %Make.ref.loc24_20() to %.loc24_34.1 // CHECK:STDOUT: %Make.ref.loc24_28: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] // CHECK:STDOUT: %.loc24_34.2: ref %X = tuple_access %b.var, element1 -// CHECK:STDOUT: %Make.call.loc24_32: init %X = call %Make.ref.loc24_28() to %.loc24_34.2 -// CHECK:STDOUT: %.loc24_34.3: %tuple.type.2 = tuple_literal (%Make.call.loc24_24, %Make.call.loc24_32) +// CHECK:STDOUT: %Make.call.loc24_33: init %X = call %Make.ref.loc24_28() to %.loc24_34.2 +// CHECK:STDOUT: %.loc24_34.3: %tuple.type.2 = tuple_literal (%Make.call.loc24_25, %Make.call.loc24_33) // CHECK:STDOUT: %X.ref.loc24_40: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %X.ref.loc24_43: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %.loc24_44.1: %tuple.type.1 = tuple_literal (%X.ref.loc24_40, %X.ref.loc24_43) // CHECK:STDOUT: %.loc24_44.2: type = converted %.loc24_44.1, constants.%tuple.type.2 [template = constants.%tuple.type.2] -// CHECK:STDOUT: %.loc24_34.4: init %tuple.type.2 = tuple_init (%Make.call.loc24_24, %Make.call.loc24_32) to %b.var +// CHECK:STDOUT: %.loc24_34.4: init %tuple.type.2 = tuple_init (%Make.call.loc24_25, %Make.call.loc24_33) to %b.var // CHECK:STDOUT: %.loc24_45: init %tuple.type.2 = converted %.loc24_34.3, %.loc24_34.4 // CHECK:STDOUT: assign %b.var, %.loc24_45 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/as/overloaded.carbon b/toolchain/check/testdata/as/overloaded.carbon index 5cb5330ce5224..a8800ab0dbf38 100644 --- a/toolchain/check/testdata/as/overloaded.carbon +++ b/toolchain/check/testdata/as/overloaded.carbon @@ -89,8 +89,8 @@ let n: i32 = ((4 as i32) as X) as i32; // CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, imports.%import_ref.2 [template = constants.%As] // CHECK:STDOUT: %.loc19_19: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_19) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_18.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_18.2: type = converted %int.make_type_signed, %.loc19_18.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_22.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_22.2: type = converted %int.make_type_signed, %.loc19_22.1 [template = constants.%i32] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32)> [template = constants.%As.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: %.loc23_8.1: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/builtins/float/greater.carbon b/toolchain/check/testdata/builtins/float/greater.carbon index 92aa05638ffb4..358d32ce4bf39 100644 --- a/toolchain/check/testdata/builtins/float/greater.carbon +++ b/toolchain/check/testdata/builtins/float/greater.carbon @@ -249,9 +249,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_32: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_32) [template = constants.%.10] // CHECK:STDOUT: %.loc12_38: f64 = float_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_31.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_31.2: f64 = converted %float.negate.loc12, %.loc12_31.1 [template = constants.%.10] -// CHECK:STDOUT: %float.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_31.2, %.loc12_38) [template = constants.%.7] +// CHECK:STDOUT: %.loc12_35.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] +// CHECK:STDOUT: %.loc12_35.2: f64 = converted %float.negate.loc12, %.loc12_35.1 [template = constants.%.10] +// CHECK:STDOUT: %float.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_35.2, %.loc12_38) [template = constants.%.7] // CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater.loc12 [template = constants.%.7] // CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater.loc12, %.loc12_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 @@ -272,9 +272,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_36: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_35.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_35.2: f64 = converted %float.negate.loc13, %.loc13_35.1 [template = constants.%.10] -// CHECK:STDOUT: %float.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24, %.loc13_35.2) [template = constants.%.9] +// CHECK:STDOUT: %.loc13_39.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_39.2: f64 = converted %float.negate.loc13, %.loc13_39.1 [template = constants.%.10] +// CHECK:STDOUT: %float.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24, %.loc13_39.2) [template = constants.%.9] // CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater.loc13 [template = constants.%.9] // CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater.loc13, %.loc13_13.1 [template = constants.%.9] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 diff --git a/toolchain/check/testdata/builtins/float/greater_eq.carbon b/toolchain/check/testdata/builtins/float/greater_eq.carbon index 4678f30a58bc8..218a4943208be 100644 --- a/toolchain/check/testdata/builtins/float/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/float/greater_eq.carbon @@ -249,9 +249,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_34: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_34) [template = constants.%.10] // CHECK:STDOUT: %.loc12_40: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc12_33.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_33.2: f64 = converted %float.negate.loc12, %.loc12_33.1 [template = constants.%.10] -// CHECK:STDOUT: %float.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_33.2, %.loc12_40) [template = constants.%.7] +// CHECK:STDOUT: %.loc12_37.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] +// CHECK:STDOUT: %.loc12_37.2: f64 = converted %float.negate.loc12, %.loc12_37.1 [template = constants.%.10] +// CHECK:STDOUT: %float.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_37.2, %.loc12_40) [template = constants.%.7] // CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %float.greater_eq.loc12 [template = constants.%.7] // CHECK:STDOUT: %.loc12_14.2: bool = converted %float.greater_eq.loc12, %.loc12_14.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 @@ -272,9 +272,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_38: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_38) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_37.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_37.2: f64 = converted %float.negate.loc13, %.loc13_37.1 [template = constants.%.10] -// CHECK:STDOUT: %float.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26, %.loc13_37.2) [template = constants.%.8] +// CHECK:STDOUT: %.loc13_41.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_41.2: f64 = converted %float.negate.loc13, %.loc13_41.1 [template = constants.%.10] +// CHECK:STDOUT: %float.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26, %.loc13_41.2) [template = constants.%.8] // CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %float.greater_eq.loc13 [template = constants.%.8] // CHECK:STDOUT: %.loc13_13.2: bool = converted %float.greater_eq.loc13, %.loc13_13.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 diff --git a/toolchain/check/testdata/builtins/float/less.carbon b/toolchain/check/testdata/builtins/float/less.carbon index 1d80430a6cc9f..ae7161346a703 100644 --- a/toolchain/check/testdata/builtins/float/less.carbon +++ b/toolchain/check/testdata/builtins/float/less.carbon @@ -249,9 +249,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_28: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_28) [template = constants.%.10] // CHECK:STDOUT: %.loc12_34: f64 = float_literal 0 [template = constants.%.9] -// CHECK:STDOUT: %.loc12_27.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_27.2: f64 = converted %float.negate.loc12, %.loc12_27.1 [template = constants.%.10] -// CHECK:STDOUT: %float.less.loc12: init bool = call %Less.ref.loc12(%.loc12_27.2, %.loc12_34) [template = constants.%.7] +// CHECK:STDOUT: %.loc12_31.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] +// CHECK:STDOUT: %.loc12_31.2: f64 = converted %float.negate.loc12, %.loc12_31.1 [template = constants.%.10] +// CHECK:STDOUT: %float.less.loc12: init bool = call %Less.ref.loc12(%.loc12_31.2, %.loc12_34) [template = constants.%.7] // CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less.loc12 [template = constants.%.7] // CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less.loc12, %.loc12_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 @@ -272,9 +272,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_34: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_34) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_33.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_33.2: f64 = converted %float.negate.loc13, %.loc13_33.1 [template = constants.%.10] -// CHECK:STDOUT: %float.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22, %.loc13_33.2) [template = constants.%.8] +// CHECK:STDOUT: %.loc13_37.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_37.2: f64 = converted %float.negate.loc13, %.loc13_37.1 [template = constants.%.10] +// CHECK:STDOUT: %float.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22, %.loc13_37.2) [template = constants.%.8] // CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less.loc13 [template = constants.%.8] // CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less.loc13, %.loc13_14.1 [template = constants.%.8] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 diff --git a/toolchain/check/testdata/builtins/float/less_eq.carbon b/toolchain/check/testdata/builtins/float/less_eq.carbon index c7b4e898a68c6..986497161e4ea 100644 --- a/toolchain/check/testdata/builtins/float/less_eq.carbon +++ b/toolchain/check/testdata/builtins/float/less_eq.carbon @@ -249,9 +249,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %.loc12_30: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc12: init f64 = call %Negate.ref.loc12(%.loc12_30) [template = constants.%.10] // CHECK:STDOUT: %.loc12_36: f64 = float_literal 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc12_29.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] -// CHECK:STDOUT: %.loc12_29.2: f64 = converted %float.negate.loc12, %.loc12_29.1 [template = constants.%.10] -// CHECK:STDOUT: %float.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_29.2, %.loc12_36) [template = constants.%.7] +// CHECK:STDOUT: %.loc12_33.1: f64 = value_of_initializer %float.negate.loc12 [template = constants.%.10] +// CHECK:STDOUT: %.loc12_33.2: f64 = converted %float.negate.loc12, %.loc12_33.1 [template = constants.%.10] +// CHECK:STDOUT: %float.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_33.2, %.loc12_36) [template = constants.%.7] // CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %float.less_eq.loc12 [template = constants.%.7] // CHECK:STDOUT: %.loc12_13.2: bool = converted %float.less_eq.loc12, %.loc12_13.1 [template = constants.%.7] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 @@ -272,9 +272,9 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %Negate.ref.loc13: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc13_36: f64 = float_literal 1 [template = constants.%.5] // CHECK:STDOUT: %float.negate.loc13: init f64 = call %Negate.ref.loc13(%.loc13_36) [template = constants.%.10] -// CHECK:STDOUT: %.loc13_35.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] -// CHECK:STDOUT: %.loc13_35.2: f64 = converted %float.negate.loc13, %.loc13_35.1 [template = constants.%.10] -// CHECK:STDOUT: %float.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24, %.loc13_35.2) [template = constants.%.9] +// CHECK:STDOUT: %.loc13_39.1: f64 = value_of_initializer %float.negate.loc13 [template = constants.%.10] +// CHECK:STDOUT: %.loc13_39.2: f64 = converted %float.negate.loc13, %.loc13_39.1 [template = constants.%.10] +// CHECK:STDOUT: %float.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24, %.loc13_39.2) [template = constants.%.9] // CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %float.less_eq.loc13 [template = constants.%.9] // CHECK:STDOUT: %.loc13_14.2: bool = converted %float.less_eq.loc13, %.loc13_14.1 [template = constants.%.9] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index 0c69d4b27e3d7..dbd19dcbca116 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -34,7 +34,7 @@ import library "types"; // CHECK:STDERR: fail_invalid_size.carbon:[[@LINE+4]]:20: error: bit width must be 64 [CompileTimeFloatBitWidth] // CHECK:STDERR: var invalid_float: Float(32); -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: var invalid_float: Float(32); diff --git a/toolchain/check/testdata/builtins/float/negate.carbon b/toolchain/check/testdata/builtins/float/negate.carbon index 227e657b18a1d..a9fc195ef991f 100644 --- a/toolchain/check/testdata/builtins/float/negate.carbon +++ b/toolchain/check/testdata/builtins/float/negate.carbon @@ -42,7 +42,7 @@ fn JustRight(a: f64) -> f64 = "float.negate"; fn RuntimeCallTooFew(a: f64) -> f64 { // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooFew(a); - // CHECK:STDERR: ^~~~~~~ + // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-17]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooFew() -> f64 = "float.negate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ @@ -53,7 +53,7 @@ fn RuntimeCallTooFew(a: f64) -> f64 { fn RuntimeCallTooMany(a: f64, b: f64, c: f64) -> f64 { // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooMany(a, b, c); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-23]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooMany(a: f64, b: f64) -> f64 = "float.negate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -64,7 +64,7 @@ fn RuntimeCallTooMany(a: f64, b: f64, c: f64) -> f64 { fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:10: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: return BadReturnType(a, b); - // CHECK:STDERR: ^~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-29]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn BadReturnType(a: f64) -> bool = "float.negate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/toolchain/check/testdata/builtins/int/and.carbon b/toolchain/check/testdata/builtins/int/and.carbon index 4f0819bf1e504..a5ceca7d59b96 100644 --- a/toolchain/check/testdata/builtins/int/and.carbon +++ b/toolchain/check/testdata/builtins/int/and.carbon @@ -119,15 +119,15 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc4_20.6, %.loc4_24.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.and, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.and [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.and, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.and, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_26.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_26.2: = bound_method %int.and, %.loc4_26.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_26.3: = specific_function %.loc4_26.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_26.4: %i32 = value_of_initializer %int.and [template = constants.%.34] +// CHECK:STDOUT: %.loc4_26.5: %i32 = converted %int.and, %.loc4_26.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %.loc4_26.3(%.loc4_26.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_26.7: Core.IntLiteral = converted %int.and, %.loc4_26.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_26.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/builtins/int/complement.carbon b/toolchain/check/testdata/builtins/int/complement.carbon index 78951183ec682..7602af545ec3c 100644 --- a/toolchain/check/testdata/builtins/int/complement.carbon +++ b/toolchain/check/testdata/builtins/int/complement.carbon @@ -136,26 +136,26 @@ fn RuntimeCall(a: i32) -> i32 { // CHECK:STDOUT: %.loc5_31.6: %i32 = converted %.loc5_31.1, %.loc5_31.5 [template = constants.%.29] // CHECK:STDOUT: %int.complement: init %i32 = call %Complement.ref(%.loc5_31.6) [template = constants.%.30] // CHECK:STDOUT: %.loc5_42.1: Core.IntLiteral = int_value 16777215 [template = constants.%.31] -// CHECK:STDOUT: %.loc5_30.1: %i32 = value_of_initializer %int.complement [template = constants.%.30] -// CHECK:STDOUT: %.loc5_30.2: %i32 = converted %int.complement, %.loc5_30.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc5_39.1: %i32 = value_of_initializer %int.complement [template = constants.%.30] +// CHECK:STDOUT: %.loc5_39.2: %i32 = converted %int.complement, %.loc5_39.1 [template = constants.%.30] // CHECK:STDOUT: %.loc5_42.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc5_42.3: = bound_method %.loc5_42.1, %.loc5_42.2 [template = constants.%.32] // CHECK:STDOUT: %.loc5_42.4: = specific_function %.loc5_42.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc5_42: init %i32 = call %.loc5_42.4(%.loc5_42.1) [template = constants.%.34] // CHECK:STDOUT: %.loc5_42.5: %i32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%.34] // CHECK:STDOUT: %.loc5_42.6: %i32 = converted %.loc5_42.1, %.loc5_42.5 [template = constants.%.34] -// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc5_30.2, %.loc5_42.6) [template = constants.%.35] +// CHECK:STDOUT: %int.and: init %i32 = call %And.ref(%.loc5_39.2, %.loc5_42.6) [template = constants.%.35] // CHECK:STDOUT: %.loc5_11.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%i32] // CHECK:STDOUT: %.loc5_11.3: type = converted %int.make_type_signed.loc5, %.loc5_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc5_19.1: %Convert.type.6 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc5_19.2: = bound_method %int.and, %.loc5_19.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc5_19.3: = specific_function %.loc5_19.2, @Convert.4(constants.%.1) [template = constants.%.38] -// CHECK:STDOUT: %.loc5_19.4: %i32 = value_of_initializer %int.and [template = constants.%.35] -// CHECK:STDOUT: %.loc5_19.5: %i32 = converted %int.and, %.loc5_19.4 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc5_19: init Core.IntLiteral = call %.loc5_19.3(%.loc5_19.5) [template = constants.%.39] -// CHECK:STDOUT: %.loc5_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_19 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_19.7: Core.IntLiteral = converted %int.and, %.loc5_19.6 [template = constants.%.39] -// CHECK:STDOUT: %.loc5_51: type = array_type %.loc5_19.7, %i32 [template = constants.%.40] +// CHECK:STDOUT: %.loc5_50.1: %Convert.type.6 = interface_witness_access constants.%.36, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc5_50.2: = bound_method %int.and, %.loc5_50.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc5_50.3: = specific_function %.loc5_50.2, @Convert.4(constants.%.1) [template = constants.%.38] +// CHECK:STDOUT: %.loc5_50.4: %i32 = value_of_initializer %int.and [template = constants.%.35] +// CHECK:STDOUT: %.loc5_50.5: %i32 = converted %int.and, %.loc5_50.4 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc5_50: init Core.IntLiteral = call %.loc5_50.3(%.loc5_50.5) [template = constants.%.39] +// CHECK:STDOUT: %.loc5_50.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc5_50 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_50.7: Core.IntLiteral = converted %int.and, %.loc5_50.6 [template = constants.%.39] +// CHECK:STDOUT: %.loc5_51: type = array_type %.loc5_50.7, %i32 [template = constants.%.40] // CHECK:STDOUT: %arr.var: ref %.40 = var arr // CHECK:STDOUT: %arr: ref %.40 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc6_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/builtins/int/convert_checked.carbon b/toolchain/check/testdata/builtins/int/convert_checked.carbon index 3e41d56cac16b..d6bdf0604ef83 100644 --- a/toolchain/check/testdata/builtins/int/convert_checked.carbon +++ b/toolchain/check/testdata/builtins/int/convert_checked.carbon @@ -131,7 +131,7 @@ import library "int_ops"; // CHECK:STDERR: fail_too_large_i32_for_i16.carbon:[[@LINE+4]]:25: error: integer value 32768 too large for type `i16` [IntTooLargeForType] // CHECK:STDERR: let max_plus_one: i16 = Int32ToInt16(0x8000); -// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let max_plus_one: i16 = Int32ToInt16(0x8000); @@ -142,7 +142,7 @@ import library "int_ops"; // CHECK:STDERR: fail_too_large_i32_for_u16.carbon:[[@LINE+4]]:25: error: integer value 65536 too large for type `u16` [IntTooLargeForType] // CHECK:STDERR: let max_plus_one: u16 = Int32ToUint16(0x1_0000); -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let max_plus_one: u16 = Int32ToUint16(0x1_0000); @@ -153,7 +153,7 @@ import library "int_ops"; // CHECK:STDERR: fail_too_large_u32_for_i16.carbon:[[@LINE+4]]:25: error: integer value 32768 too large for type `i16` [IntTooLargeForType] // CHECK:STDERR: let max_plus_one: i16 = Uint32ToInt16(Int32ToUint32(0x8000)); -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let max_plus_one: i16 = Uint32ToInt16(Int32ToUint32(0x8000)); @@ -164,7 +164,7 @@ import library "int_ops"; // CHECK:STDERR: fail_too_large_u32_for_u16.carbon:[[@LINE+4]]:25: error: integer value 65536 too large for type `u16` [IntTooLargeForType] // CHECK:STDERR: let max_plus_one: u16 = Uint32ToUint16(Int32ToUint32(0x1_0000)); -// CHECK:STDERR: ^~~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let max_plus_one: u16 = Uint32ToUint16(Int32ToUint32(0x1_0000)); @@ -175,7 +175,7 @@ import library "int_ops"; // CHECK:STDERR: fail_negative_i32_to_u16.carbon:[[@LINE+4]]:29: error: negative integer value -1 converted to unsigned type `u16` [NegativeIntInUnsignedType] // CHECK:STDERR: let minus_one_to_u16: u16 = Int32ToUint16(SubI32(0, 1)); -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let minus_one_to_u16: u16 = Int32ToUint16(SubI32(0, 1)); @@ -186,7 +186,7 @@ import library "int_ops"; // CHECK:STDERR: fail_negative_i32_to_u32.carbon:[[@LINE+4]]:29: error: negative integer value -1 converted to unsigned type `u32` [NegativeIntInUnsignedType] // CHECK:STDERR: let minus_one_to_u32: u32 = Int32ToUint32(SubI32(0, 1)); -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let minus_one_to_u32: u32 = Int32ToUint32(SubI32(0, 1)); @@ -197,7 +197,7 @@ import library "int_ops"; // CHECK:STDERR: fail_negative_i32_to_u64.carbon:[[@LINE+4]]:29: error: negative integer value -1 converted to unsigned type `u64` [NegativeIntInUnsignedType] // CHECK:STDERR: let minus_one_to_u64: u64 = Int32ToUint64(SubI32(0, 1)); -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let minus_one_to_u64: u64 = Int32ToUint64(SubI32(0, 1)); @@ -208,7 +208,7 @@ import library "int_ops"; // CHECK:STDERR: fail_too_small_i32_for_i16.carbon:[[@LINE+4]]:26: error: integer value -32769 too large for type `i16` [IntTooLargeForType] // CHECK:STDERR: let min_minus_one: i16 = Int32ToInt16(NegateI32(0x8001)); -// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let min_minus_one: i16 = Int32ToInt16(NegateI32(0x8001)); @@ -221,7 +221,7 @@ let not_constant: i32 = 0; // CHECK:STDERR: fail_not_constant.carbon:[[@LINE+8]]:40: error: non-constant call to compile-time-only function [NonConstantCallToCompTimeOnlyFunction] // CHECK:STDERR: let convert_not_constant_narrow: i16 = Int32ToInt16(not_constant); -// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_not_constant.carbon:[[@LINE-7]]:1: in import [InImport] // CHECK:STDERR: int_ops.carbon:18:1: note: compile-time-only function declared here [CompTimeOnlyFunctionHere] // CHECK:STDERR: fn Int32ToInt16(a: i32) -> i16 = "int.convert_checked"; @@ -231,7 +231,7 @@ let convert_not_constant_narrow: i16 = Int32ToInt16(not_constant); // CHECK:STDERR: fail_not_constant.carbon:[[@LINE+8]]:38: error: non-constant call to compile-time-only function [NonConstantCallToCompTimeOnlyFunction] // CHECK:STDERR: let convert_not_constant_same: i32 = Int32ToInt32(not_constant); -// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_not_constant.carbon:[[@LINE-17]]:1: in import [InImport] // CHECK:STDERR: int_ops.carbon:10:1: note: compile-time-only function declared here [CompTimeOnlyFunctionHere] // CHECK:STDERR: fn Int32ToInt32(a: i32) -> i32 = "int.convert_checked"; @@ -241,7 +241,7 @@ let convert_not_constant_same: i32 = Int32ToInt32(not_constant); // CHECK:STDERR: fail_not_constant.carbon:[[@LINE+7]]:39: error: non-constant call to compile-time-only function [NonConstantCallToCompTimeOnlyFunction] // CHECK:STDERR: let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); -// CHECK:STDERR: ^~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_not_constant.carbon:[[@LINE-27]]:1: in import [InImport] // CHECK:STDERR: int_ops.carbon:26:1: note: compile-time-only function declared here [CompTimeOnlyFunctionHere] // CHECK:STDERR: fn Int32ToInt64(a: i32) -> i64 = "int.convert_checked"; @@ -506,13 +506,13 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // 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_40: init type = call %IntLiteral.ref.loc14_30() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_41.1: type = value_of_initializer %int_literal.make_type.loc14_40 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_41.2: type = converted %int_literal.make_type.loc14_40, %.loc14_41.1 [template = Core.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_57: init type = call %IntLiteral.ref.loc14_47() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_58.1: type = value_of_initializer %int_literal.make_type.loc14_57 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc14_58.2: type = converted %int_literal.make_type.loc14_57, %.loc14_58.1 [template = Core.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: %a: Core.IntLiteral = bind_name a, %a.param // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1 @@ -932,9 +932,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc5_27: init %i32 = call %.loc5_27.4(%.loc5_27.1) [template = constants.%.29] // CHECK:STDOUT: %.loc5_27.5: %i32 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.29] // CHECK:STDOUT: %.loc5_27.6: %i32 = converted %.loc5_27.1, %.loc5_27.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc5_26: init %i32 = call %Int32ToInt32.ref.loc5(%.loc5_27.6) [template = constants.%.29] -// CHECK:STDOUT: %.loc5_29.1: %i32 = value_of_initializer %int.convert_checked.loc5_26 [template = constants.%.29] -// CHECK:STDOUT: %.loc5_29.2: %i32 = converted %int.convert_checked.loc5_26, %.loc5_29.1 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %Int32ToInt32.ref.loc5(%.loc5_27.6) [template = constants.%.29] +// CHECK:STDOUT: %.loc5_29.1: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.29] +// CHECK:STDOUT: %.loc5_29.2: %i32 = converted %int.convert_checked.loc5_28, %.loc5_29.1 [template = constants.%.29] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc5_29.2 // CHECK:STDOUT: %Int32ToInt32.ref.loc6: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] // CHECK:STDOUT: %.loc6_27.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.30] @@ -944,9 +944,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc6_27: init %i32 = call %.loc6_27.4(%.loc6_27.1) [template = constants.%.33] // CHECK:STDOUT: %.loc6_27.5: %i32 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.33] // CHECK:STDOUT: %.loc6_27.6: %i32 = converted %.loc6_27.1, %.loc6_27.5 [template = constants.%.33] -// CHECK:STDOUT: %int.convert_checked.loc6_26: init %i32 = call %Int32ToInt32.ref.loc6(%.loc6_27.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc6_39.1: %i32 = value_of_initializer %int.convert_checked.loc6_26 [template = constants.%.33] -// CHECK:STDOUT: %.loc6_39.2: %i32 = converted %int.convert_checked.loc6_26, %.loc6_39.1 [template = constants.%.33] +// CHECK:STDOUT: %int.convert_checked.loc6_38: init %i32 = call %Int32ToInt32.ref.loc6(%.loc6_27.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc6_39.1: %i32 = value_of_initializer %int.convert_checked.loc6_38 [template = constants.%.33] +// CHECK:STDOUT: %.loc6_39.2: %i32 = converted %int.convert_checked.loc6_38, %.loc6_39.1 [template = constants.%.33] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc6_39.2 // CHECK:STDOUT: %Int32ToInt32.ref.loc7: %Int32ToInt32.type = name_ref Int32ToInt32, imports.%import_ref.5 [template = constants.%Int32ToInt32] // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] @@ -960,20 +960,20 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc7_44.6: %i32 = converted %.loc7_44.1, %.loc7_44.5 [template = constants.%.33] // CHECK:STDOUT: %int.snegate.loc7: init %i32 = call %NegateI32.ref.loc7(%.loc7_44.6) [template = constants.%.34] // CHECK:STDOUT: %.loc7_58.1: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_43.1: %i32 = value_of_initializer %int.snegate.loc7 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_43.2: %i32 = converted %int.snegate.loc7, %.loc7_43.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_55.1: %i32 = value_of_initializer %int.snegate.loc7 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_55.2: %i32 = converted %int.snegate.loc7, %.loc7_55.1 [template = constants.%.34] // CHECK:STDOUT: %.loc7_58.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc7_58.3: = bound_method %.loc7_58.1, %.loc7_58.2 [template = constants.%.36] // CHECK:STDOUT: %.loc7_58.4: = specific_function %.loc7_58.3, @Convert.2(constants.%.1) [template = constants.%.37] // CHECK:STDOUT: %int.convert_checked.loc7_58: init %i32 = call %.loc7_58.4(%.loc7_58.1) [template = constants.%.38] // CHECK:STDOUT: %.loc7_58.5: %i32 = value_of_initializer %int.convert_checked.loc7_58 [template = constants.%.38] // CHECK:STDOUT: %.loc7_58.6: %i32 = converted %.loc7_58.1, %.loc7_58.5 [template = constants.%.38] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc7_43.2, %.loc7_58.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_33.1: %i32 = value_of_initializer %int.ssub [template = constants.%.39] -// CHECK:STDOUT: %.loc7_33.2: %i32 = converted %int.ssub, %.loc7_33.1 [template = constants.%.39] -// CHECK:STDOUT: %int.convert_checked.loc7_26: init %i32 = call %Int32ToInt32.ref.loc7(%.loc7_33.2) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_61.1: %i32 = value_of_initializer %int.convert_checked.loc7_26 [template = constants.%.39] -// CHECK:STDOUT: %.loc7_61.2: %i32 = converted %int.convert_checked.loc7_26, %.loc7_61.1 [template = constants.%.39] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc7_55.2, %.loc7_58.6) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_59.1: %i32 = value_of_initializer %int.ssub [template = constants.%.39] +// CHECK:STDOUT: %.loc7_59.2: %i32 = converted %int.ssub, %.loc7_59.1 [template = constants.%.39] +// CHECK:STDOUT: %int.convert_checked.loc7_60: init %i32 = call %Int32ToInt32.ref.loc7(%.loc7_59.2) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_61.1: %i32 = value_of_initializer %int.convert_checked.loc7_60 [template = constants.%.39] +// CHECK:STDOUT: %.loc7_61.2: %i32 = converted %int.convert_checked.loc7_60, %.loc7_61.1 [template = constants.%.39] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc7_61.2 // CHECK:STDOUT: %IntLiteralToIntLiteral.ref: %IntLiteralToIntLiteral.type = name_ref IntLiteralToIntLiteral, imports.%import_ref.9 [template = constants.%IntLiteralToIntLiteral] // CHECK:STDOUT: %Int32ToIntLiteral.ref: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] @@ -986,14 +986,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc8_74.5: %i32 = value_of_initializer %int.convert_checked.loc8_74 [template = constants.%.38] // CHECK:STDOUT: %.loc8_74.6: %i32 = converted %.loc8_74.1, %.loc8_74.5 [template = constants.%.38] // CHECK:STDOUT: %int.snegate.loc8: init %i32 = call %NegateI32.ref.loc8(%.loc8_74.6) [template = constants.%.40] -// CHECK:STDOUT: %.loc8_73.1: %i32 = value_of_initializer %int.snegate.loc8 [template = constants.%.40] -// CHECK:STDOUT: %.loc8_73.2: %i32 = converted %int.snegate.loc8, %.loc8_73.1 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc8_63: init Core.IntLiteral = call %Int32ToIntLiteral.ref(%.loc8_73.2) [template = constants.%.41] -// CHECK:STDOUT: %.loc8_63.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_63 [template = constants.%.41] -// CHECK:STDOUT: %.loc8_63.2: Core.IntLiteral = converted %int.convert_checked.loc8_63, %.loc8_63.1 [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked.loc8_45: init Core.IntLiteral = call %IntLiteralToIntLiteral.ref(%.loc8_63.2) [template = constants.%.41] -// CHECK:STDOUT: %.loc8_78.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_45 [template = constants.%.41] -// CHECK:STDOUT: %.loc8_78.2: Core.IntLiteral = converted %int.convert_checked.loc8_45, %.loc8_78.1 [template = constants.%.41] +// CHECK:STDOUT: %.loc8_75.1: %i32 = value_of_initializer %int.snegate.loc8 [template = constants.%.40] +// CHECK:STDOUT: %.loc8_75.2: %i32 = converted %int.snegate.loc8, %.loc8_75.1 [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc8_76: init Core.IntLiteral = call %Int32ToIntLiteral.ref(%.loc8_75.2) [template = constants.%.41] +// CHECK:STDOUT: %.loc8_76.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_76 [template = constants.%.41] +// CHECK:STDOUT: %.loc8_76.2: Core.IntLiteral = converted %int.convert_checked.loc8_76, %.loc8_76.1 [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc8_77: init Core.IntLiteral = call %IntLiteralToIntLiteral.ref(%.loc8_76.2) [template = constants.%.41] +// CHECK:STDOUT: %.loc8_78.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc8_77 [template = constants.%.41] +// CHECK:STDOUT: %.loc8_78.2: Core.IntLiteral = converted %int.convert_checked.loc8_77, %.loc8_78.1 [template = constants.%.41] // CHECK:STDOUT: %d: Core.IntLiteral = bind_name d, %.loc8_78.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1107,9 +1107,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc5_30: init %i32 = call %.loc5_30.4(%.loc5_30.1) [template = constants.%.29] // CHECK:STDOUT: %.loc5_30.5: %i32 = value_of_initializer %int.convert_checked.loc5_30 [template = constants.%.29] // CHECK:STDOUT: %.loc5_30.6: %i32 = converted %.loc5_30.1, %.loc5_30.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc5_29: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_30.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc5_42.1: %u32 = value_of_initializer %int.convert_checked.loc5_29 [template = constants.%.30] -// CHECK:STDOUT: %.loc5_42.2: %u32 = converted %int.convert_checked.loc5_29, %.loc5_42.1 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc5_41: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_30.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc5_42.1: %u32 = value_of_initializer %int.convert_checked.loc5_41 [template = constants.%.30] +// CHECK:STDOUT: %.loc5_42.2: %u32 = converted %int.convert_checked.loc5_41, %.loc5_42.1 [template = constants.%.30] // CHECK:STDOUT: %max: %u32 = bind_name max, %.loc5_42.2 // CHECK:STDOUT: %Uint32ToInt32.ref: %Uint32ToInt32.type = name_ref Uint32ToInt32, imports.%import_ref.7 [template = constants.%Uint32ToInt32] // CHECK:STDOUT: %Int32ToUint32.ref.loc6: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] @@ -1120,12 +1120,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc6_54: init %i32 = call %.loc6_54.4(%.loc6_54.1) [template = constants.%.29] // CHECK:STDOUT: %.loc6_54.5: %i32 = value_of_initializer %int.convert_checked.loc6_54 [template = constants.%.29] // CHECK:STDOUT: %.loc6_54.6: %i32 = converted %.loc6_54.1, %.loc6_54.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc6_53: init %u32 = call %Int32ToUint32.ref.loc6(%.loc6_54.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc6_53.1: %u32 = value_of_initializer %int.convert_checked.loc6_53 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_53.2: %u32 = converted %int.convert_checked.loc6_53, %.loc6_53.1 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc6_39: init %i32 = call %Uint32ToInt32.ref(%.loc6_53.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc6_67.1: %i32 = value_of_initializer %int.convert_checked.loc6_39 [template = constants.%.29] -// CHECK:STDOUT: %.loc6_67.2: %i32 = converted %int.convert_checked.loc6_39, %.loc6_67.1 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc6_65: init %u32 = call %Int32ToUint32.ref.loc6(%.loc6_54.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc6_65.1: %u32 = value_of_initializer %int.convert_checked.loc6_65 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_65.2: %u32 = converted %int.convert_checked.loc6_65, %.loc6_65.1 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc6_66: init %i32 = call %Uint32ToInt32.ref(%.loc6_65.2) [template = constants.%.29] +// CHECK:STDOUT: %.loc6_67.1: %i32 = value_of_initializer %int.convert_checked.loc6_66 [template = constants.%.29] +// CHECK:STDOUT: %.loc6_67.2: %i32 = converted %int.convert_checked.loc6_66, %.loc6_67.1 [template = constants.%.29] // CHECK:STDOUT: %max_roundtrip: %i32 = bind_name max_roundtrip, %.loc6_67.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1341,9 +1341,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %.loc5_28.4(%.loc5_28.1) [template = constants.%.30] // CHECK:STDOUT: %.loc5_28.5: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.30] // CHECK:STDOUT: %.loc5_28.6: %i32 = converted %.loc5_28.1, %.loc5_28.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc5_27: init %u16 = call %Int32ToUint16.ref.loc5(%.loc5_28.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc5_30.1: %u16 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.31] -// CHECK:STDOUT: %.loc5_30.2: %u16 = converted %int.convert_checked.loc5_27, %.loc5_30.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc5_29: init %u16 = call %Int32ToUint16.ref.loc5(%.loc5_28.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc5_30.1: %u16 = value_of_initializer %int.convert_checked.loc5_29 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_30.2: %u16 = converted %int.convert_checked.loc5_29, %.loc5_30.1 [template = constants.%.31] // CHECK:STDOUT: %a: %u16 = bind_name a, %.loc5_30.2 // CHECK:STDOUT: %Int32ToUint16.ref.loc6: %Int32ToUint16.type = name_ref Int32ToUint16, imports.%import_ref.11 [template = constants.%Int32ToUint16] // CHECK:STDOUT: %.loc6_28.1: Core.IntLiteral = int_value 65535 [template = constants.%.32] @@ -1353,9 +1353,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_28.1) [template = constants.%.35] // CHECK:STDOUT: %.loc6_28.5: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%.35] // CHECK:STDOUT: %.loc6_28.6: %i32 = converted %.loc6_28.1, %.loc6_28.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc6_27: init %u16 = call %Int32ToUint16.ref.loc6(%.loc6_28.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc6_35.1: %u16 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.36] -// CHECK:STDOUT: %.loc6_35.2: %u16 = converted %int.convert_checked.loc6_27, %.loc6_35.1 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc6_34: init %u16 = call %Int32ToUint16.ref.loc6(%.loc6_28.6) [template = constants.%.36] +// CHECK:STDOUT: %.loc6_35.1: %u16 = value_of_initializer %int.convert_checked.loc6_34 [template = constants.%.36] +// CHECK:STDOUT: %.loc6_35.2: %u16 = converted %int.convert_checked.loc6_34, %.loc6_35.1 [template = constants.%.36] // CHECK:STDOUT: %b: %u16 = bind_name b, %.loc6_35.2 // CHECK:STDOUT: %Int32ToInt16.ref.loc8: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %.loc8_27.1: Core.IntLiteral = int_value 32767 [template = constants.%.37] @@ -1365,9 +1365,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc8_27: init %i32 = call %.loc8_27.4(%.loc8_27.1) [template = constants.%.40] // CHECK:STDOUT: %.loc8_27.5: %i32 = value_of_initializer %int.convert_checked.loc8_27 [template = constants.%.40] // CHECK:STDOUT: %.loc8_27.6: %i32 = converted %.loc8_27.1, %.loc8_27.5 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i16 = call %Int32ToInt16.ref.loc8(%.loc8_27.6) [template = constants.%.41] -// CHECK:STDOUT: %.loc8_34.1: %i16 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.41] -// CHECK:STDOUT: %.loc8_34.2: %i16 = converted %int.convert_checked.loc8_26, %.loc8_34.1 [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc8_33: init %i16 = call %Int32ToInt16.ref.loc8(%.loc8_27.6) [template = constants.%.41] +// CHECK:STDOUT: %.loc8_34.1: %i16 = value_of_initializer %int.convert_checked.loc8_33 [template = constants.%.41] +// CHECK:STDOUT: %.loc8_34.2: %i16 = converted %int.convert_checked.loc8_33, %.loc8_34.1 [template = constants.%.41] // CHECK:STDOUT: %c: %i16 = bind_name c, %.loc8_34.2 // CHECK:STDOUT: %Int32ToInt16.ref.loc9: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%import_ref.10 [template = constants.%Int32ToInt16] // CHECK:STDOUT: %NegateI32.ref.loc9: %NegateI32.type = name_ref NegateI32, imports.%import_ref.1 [template = constants.%NegateI32] @@ -1379,11 +1379,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc9_37.5: %i32 = value_of_initializer %int.convert_checked.loc9_37 [template = constants.%.45] // CHECK:STDOUT: %.loc9_37.6: %i32 = converted %.loc9_37.1, %.loc9_37.5 [template = constants.%.45] // CHECK:STDOUT: %int.snegate.loc9: init %i32 = call %NegateI32.ref.loc9(%.loc9_37.6) [template = constants.%.46] -// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.snegate.loc9 [template = constants.%.46] -// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.snegate.loc9, %.loc9_36.1 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i16 = call %Int32ToInt16.ref.loc9(%.loc9_36.2) [template = constants.%.47] -// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%.47] -// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_26, %.loc9_45.1 [template = constants.%.47] +// CHECK:STDOUT: %.loc9_43.1: %i32 = value_of_initializer %int.snegate.loc9 [template = constants.%.46] +// CHECK:STDOUT: %.loc9_43.2: %i32 = converted %int.snegate.loc9, %.loc9_43.1 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc9_44: init %i16 = call %Int32ToInt16.ref.loc9(%.loc9_43.2) [template = constants.%.47] +// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_44 [template = constants.%.47] +// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_44, %.loc9_45.1 [template = constants.%.47] // CHECK:STDOUT: %d: %i16 = bind_name d, %.loc9_45.2 // CHECK:STDOUT: %Uint32ToUint16.ref.loc11: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] @@ -1394,12 +1394,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc11_43: init %i32 = call %.loc11_43.4(%.loc11_43.1) [template = constants.%.30] // CHECK:STDOUT: %.loc11_43.5: %i32 = value_of_initializer %int.convert_checked.loc11_43 [template = constants.%.30] // CHECK:STDOUT: %.loc11_43.6: %i32 = converted %.loc11_43.1, %.loc11_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_42: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_43.6) [template = constants.%.48] -// CHECK:STDOUT: %.loc11_42.1: %u32 = value_of_initializer %int.convert_checked.loc11_42 [template = constants.%.48] -// CHECK:STDOUT: %.loc11_42.2: %u32 = converted %int.convert_checked.loc11_42, %.loc11_42.1 [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc11_28: init %u16 = call %Uint32ToUint16.ref.loc11(%.loc11_42.2) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_46.1: %u16 = value_of_initializer %int.convert_checked.loc11_28 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_46.2: %u16 = converted %int.convert_checked.loc11_28, %.loc11_46.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc11_44: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_43.6) [template = constants.%.48] +// CHECK:STDOUT: %.loc11_44.1: %u32 = value_of_initializer %int.convert_checked.loc11_44 [template = constants.%.48] +// CHECK:STDOUT: %.loc11_44.2: %u32 = converted %int.convert_checked.loc11_44, %.loc11_44.1 [template = constants.%.48] +// CHECK:STDOUT: %int.convert_checked.loc11_45: init %u16 = call %Uint32ToUint16.ref.loc11(%.loc11_44.2) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_46.1: %u16 = value_of_initializer %int.convert_checked.loc11_45 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_46.2: %u16 = converted %int.convert_checked.loc11_45, %.loc11_46.1 [template = constants.%.31] // CHECK:STDOUT: %e: %u16 = bind_name e, %.loc11_46.2 // CHECK:STDOUT: %Uint32ToUint16.ref.loc12: %Uint32ToUint16.type = name_ref Uint32ToUint16, imports.%import_ref.13 [template = constants.%Uint32ToUint16] // CHECK:STDOUT: %Int32ToUint32.ref.loc12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] @@ -1410,12 +1410,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.35] // CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.35] // CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc12_42: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_43.6) [template = constants.%.49] -// CHECK:STDOUT: %.loc12_42.1: %u32 = value_of_initializer %int.convert_checked.loc12_42 [template = constants.%.49] -// CHECK:STDOUT: %.loc12_42.2: %u32 = converted %int.convert_checked.loc12_42, %.loc12_42.1 [template = constants.%.49] -// CHECK:STDOUT: %int.convert_checked.loc12_28: init %u16 = call %Uint32ToUint16.ref.loc12(%.loc12_42.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc12_51.1: %u16 = value_of_initializer %int.convert_checked.loc12_28 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_51.2: %u16 = converted %int.convert_checked.loc12_28, %.loc12_51.1 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc12_49: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_43.6) [template = constants.%.49] +// CHECK:STDOUT: %.loc12_49.1: %u32 = value_of_initializer %int.convert_checked.loc12_49 [template = constants.%.49] +// CHECK:STDOUT: %.loc12_49.2: %u32 = converted %int.convert_checked.loc12_49, %.loc12_49.1 [template = constants.%.49] +// CHECK:STDOUT: %int.convert_checked.loc12_50: init %u16 = call %Uint32ToUint16.ref.loc12(%.loc12_49.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc12_51.1: %u16 = value_of_initializer %int.convert_checked.loc12_50 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_51.2: %u16 = converted %int.convert_checked.loc12_50, %.loc12_51.1 [template = constants.%.36] // CHECK:STDOUT: %f: %u16 = bind_name f, %.loc12_51.2 // CHECK:STDOUT: %Uint32ToInt16.ref.loc14: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref.loc14: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] @@ -1426,12 +1426,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %.loc14_42.4(%.loc14_42.1) [template = constants.%.30] // CHECK:STDOUT: %.loc14_42.5: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%.30] // CHECK:STDOUT: %.loc14_42.6: %i32 = converted %.loc14_42.1, %.loc14_42.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc14_41: init %u32 = call %Int32ToUint32.ref.loc14(%.loc14_42.6) [template = constants.%.48] -// CHECK:STDOUT: %.loc14_41.1: %u32 = value_of_initializer %int.convert_checked.loc14_41 [template = constants.%.48] -// CHECK:STDOUT: %.loc14_41.2: %u32 = converted %int.convert_checked.loc14_41, %.loc14_41.1 [template = constants.%.48] -// CHECK:STDOUT: %int.convert_checked.loc14_27: init %i16 = call %Uint32ToInt16.ref.loc14(%.loc14_41.2) [template = constants.%.50] -// CHECK:STDOUT: %.loc14_45.1: %i16 = value_of_initializer %int.convert_checked.loc14_27 [template = constants.%.50] -// CHECK:STDOUT: %.loc14_45.2: %i16 = converted %int.convert_checked.loc14_27, %.loc14_45.1 [template = constants.%.50] +// CHECK:STDOUT: %int.convert_checked.loc14_43: init %u32 = call %Int32ToUint32.ref.loc14(%.loc14_42.6) [template = constants.%.48] +// CHECK:STDOUT: %.loc14_43.1: %u32 = value_of_initializer %int.convert_checked.loc14_43 [template = constants.%.48] +// CHECK:STDOUT: %.loc14_43.2: %u32 = converted %int.convert_checked.loc14_43, %.loc14_43.1 [template = constants.%.48] +// CHECK:STDOUT: %int.convert_checked.loc14_44: init %i16 = call %Uint32ToInt16.ref.loc14(%.loc14_43.2) [template = constants.%.50] +// CHECK:STDOUT: %.loc14_45.1: %i16 = value_of_initializer %int.convert_checked.loc14_44 [template = constants.%.50] +// CHECK:STDOUT: %.loc14_45.2: %i16 = converted %int.convert_checked.loc14_44, %.loc14_45.1 [template = constants.%.50] // CHECK:STDOUT: %g: %i16 = bind_name g, %.loc14_45.2 // CHECK:STDOUT: %Uint32ToInt16.ref.loc15: %Uint32ToInt16.type = name_ref Uint32ToInt16, imports.%import_ref.12 [template = constants.%Uint32ToInt16] // CHECK:STDOUT: %Int32ToUint32.ref.loc15: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] @@ -1442,12 +1442,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc15_42: init %i32 = call %.loc15_42.4(%.loc15_42.1) [template = constants.%.40] // CHECK:STDOUT: %.loc15_42.5: %i32 = value_of_initializer %int.convert_checked.loc15_42 [template = constants.%.40] // CHECK:STDOUT: %.loc15_42.6: %i32 = converted %.loc15_42.1, %.loc15_42.5 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc15_41: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_42.6) [template = constants.%.51] -// CHECK:STDOUT: %.loc15_41.1: %u32 = value_of_initializer %int.convert_checked.loc15_41 [template = constants.%.51] -// CHECK:STDOUT: %.loc15_41.2: %u32 = converted %int.convert_checked.loc15_41, %.loc15_41.1 [template = constants.%.51] -// CHECK:STDOUT: %int.convert_checked.loc15_27: init %i16 = call %Uint32ToInt16.ref.loc15(%.loc15_41.2) [template = constants.%.41] -// CHECK:STDOUT: %.loc15_50.1: %i16 = value_of_initializer %int.convert_checked.loc15_27 [template = constants.%.41] -// CHECK:STDOUT: %.loc15_50.2: %i16 = converted %int.convert_checked.loc15_27, %.loc15_50.1 [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc15_48: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_42.6) [template = constants.%.51] +// CHECK:STDOUT: %.loc15_48.1: %u32 = value_of_initializer %int.convert_checked.loc15_48 [template = constants.%.51] +// CHECK:STDOUT: %.loc15_48.2: %u32 = converted %int.convert_checked.loc15_48, %.loc15_48.1 [template = constants.%.51] +// CHECK:STDOUT: %int.convert_checked.loc15_49: init %i16 = call %Uint32ToInt16.ref.loc15(%.loc15_48.2) [template = constants.%.41] +// CHECK:STDOUT: %.loc15_50.1: %i16 = value_of_initializer %int.convert_checked.loc15_49 [template = constants.%.41] +// CHECK:STDOUT: %.loc15_50.2: %i16 = converted %int.convert_checked.loc15_49, %.loc15_50.1 [template = constants.%.41] // CHECK:STDOUT: %h: %i16 = bind_name h, %.loc15_50.2 // CHECK:STDOUT: %IntLiteralToInt16.ref.loc17: %IntLiteralToInt16.type = name_ref IntLiteralToInt16, imports.%import_ref.14 [template = constants.%IntLiteralToInt16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc17: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] @@ -1460,14 +1460,14 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc17_70.5: %i32 = value_of_initializer %int.convert_checked.loc17_70 [template = constants.%.45] // CHECK:STDOUT: %.loc17_70.6: %i32 = converted %.loc17_70.1, %.loc17_70.5 [template = constants.%.45] // CHECK:STDOUT: %int.snegate.loc17: init %i32 = call %NegateI32.ref.loc17(%.loc17_70.6) [template = constants.%.46] -// CHECK:STDOUT: %.loc17_69.1: %i32 = value_of_initializer %int.snegate.loc17 [template = constants.%.46] -// CHECK:STDOUT: %.loc17_69.2: %i32 = converted %int.snegate.loc17, %.loc17_69.1 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc17_59: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc17(%.loc17_69.2) [template = constants.%.52] -// CHECK:STDOUT: %.loc17_59.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc17_59 [template = constants.%.52] -// CHECK:STDOUT: %.loc17_59.2: Core.IntLiteral = converted %int.convert_checked.loc17_59, %.loc17_59.1 [template = constants.%.52] -// CHECK:STDOUT: %int.convert_checked.loc17_41: init %i16 = call %IntLiteralToInt16.ref.loc17(%.loc17_59.2) [template = constants.%.47] -// CHECK:STDOUT: %.loc17_79.1: %i16 = value_of_initializer %int.convert_checked.loc17_41 [template = constants.%.47] -// CHECK:STDOUT: %.loc17_79.2: %i16 = converted %int.convert_checked.loc17_41, %.loc17_79.1 [template = constants.%.47] +// CHECK:STDOUT: %.loc17_76.1: %i32 = value_of_initializer %int.snegate.loc17 [template = constants.%.46] +// CHECK:STDOUT: %.loc17_76.2: %i32 = converted %int.snegate.loc17, %.loc17_76.1 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc17_77: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc17(%.loc17_76.2) [template = constants.%.52] +// CHECK:STDOUT: %.loc17_77.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc17_77 [template = constants.%.52] +// CHECK:STDOUT: %.loc17_77.2: Core.IntLiteral = converted %int.convert_checked.loc17_77, %.loc17_77.1 [template = constants.%.52] +// CHECK:STDOUT: %int.convert_checked.loc17_78: init %i16 = call %IntLiteralToInt16.ref.loc17(%.loc17_77.2) [template = constants.%.47] +// CHECK:STDOUT: %.loc17_79.1: %i16 = value_of_initializer %int.convert_checked.loc17_78 [template = constants.%.47] +// CHECK:STDOUT: %.loc17_79.2: %i16 = converted %int.convert_checked.loc17_78, %.loc17_79.1 [template = constants.%.47] // CHECK:STDOUT: %lit_i16_min: %i16 = bind_name lit_i16_min, %.loc17_79.2 // CHECK:STDOUT: %IntLiteralToInt16.ref.loc18: %IntLiteralToInt16.type = name_ref IntLiteralToInt16, imports.%import_ref.14 [template = constants.%IntLiteralToInt16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc18: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] @@ -1478,12 +1478,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc18_60: init %i32 = call %.loc18_60.4(%.loc18_60.1) [template = constants.%.40] // CHECK:STDOUT: %.loc18_60.5: %i32 = value_of_initializer %int.convert_checked.loc18_60 [template = constants.%.40] // CHECK:STDOUT: %.loc18_60.6: %i32 = converted %.loc18_60.1, %.loc18_60.5 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc18_59: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc18(%.loc18_60.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc18_59.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc18_59 [template = constants.%.37] -// CHECK:STDOUT: %.loc18_59.2: Core.IntLiteral = converted %int.convert_checked.loc18_59, %.loc18_59.1 [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc18_41: init %i16 = call %IntLiteralToInt16.ref.loc18(%.loc18_59.2) [template = constants.%.41] -// CHECK:STDOUT: %.loc18_68.1: %i16 = value_of_initializer %int.convert_checked.loc18_41 [template = constants.%.41] -// CHECK:STDOUT: %.loc18_68.2: %i16 = converted %int.convert_checked.loc18_41, %.loc18_68.1 [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked.loc18_66: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc18(%.loc18_60.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc18_66.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc18_66 [template = constants.%.37] +// CHECK:STDOUT: %.loc18_66.2: Core.IntLiteral = converted %int.convert_checked.loc18_66, %.loc18_66.1 [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc18_67: init %i16 = call %IntLiteralToInt16.ref.loc18(%.loc18_66.2) [template = constants.%.41] +// CHECK:STDOUT: %.loc18_68.1: %i16 = value_of_initializer %int.convert_checked.loc18_67 [template = constants.%.41] +// CHECK:STDOUT: %.loc18_68.2: %i16 = converted %int.convert_checked.loc18_67, %.loc18_68.1 [template = constants.%.41] // CHECK:STDOUT: %lit_i16_max: %i16 = bind_name lit_i16_max, %.loc18_68.2 // CHECK:STDOUT: %IntLiteralToUint16.ref.loc20: %IntLiteralToUint16.type = name_ref IntLiteralToUint16, imports.%import_ref.15 [template = constants.%IntLiteralToUint16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc20: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] @@ -1494,12 +1494,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc20_61: init %i32 = call %.loc20_61.4(%.loc20_61.1) [template = constants.%.30] // CHECK:STDOUT: %.loc20_61.5: %i32 = value_of_initializer %int.convert_checked.loc20_61 [template = constants.%.30] // CHECK:STDOUT: %.loc20_61.6: %i32 = converted %.loc20_61.1, %.loc20_61.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc20_60: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc20(%.loc20_61.6) [template = constants.%.3] -// CHECK:STDOUT: %.loc20_60.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc20_60 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_60.2: Core.IntLiteral = converted %int.convert_checked.loc20_60, %.loc20_60.1 [template = constants.%.3] -// CHECK:STDOUT: %int.convert_checked.loc20_42: init %u16 = call %IntLiteralToUint16.ref.loc20(%.loc20_60.2) [template = constants.%.31] -// CHECK:STDOUT: %.loc20_64.1: %u16 = value_of_initializer %int.convert_checked.loc20_42 [template = constants.%.31] -// CHECK:STDOUT: %.loc20_64.2: %u16 = converted %int.convert_checked.loc20_42, %.loc20_64.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc20_62: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc20(%.loc20_61.6) [template = constants.%.3] +// CHECK:STDOUT: %.loc20_62.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc20_62 [template = constants.%.3] +// CHECK:STDOUT: %.loc20_62.2: Core.IntLiteral = converted %int.convert_checked.loc20_62, %.loc20_62.1 [template = constants.%.3] +// CHECK:STDOUT: %int.convert_checked.loc20_63: init %u16 = call %IntLiteralToUint16.ref.loc20(%.loc20_62.2) [template = constants.%.31] +// CHECK:STDOUT: %.loc20_64.1: %u16 = value_of_initializer %int.convert_checked.loc20_63 [template = constants.%.31] +// CHECK:STDOUT: %.loc20_64.2: %u16 = converted %int.convert_checked.loc20_63, %.loc20_64.1 [template = constants.%.31] // CHECK:STDOUT: %lit_u16_min: %u16 = bind_name lit_u16_min, %.loc20_64.2 // CHECK:STDOUT: %IntLiteralToUint16.ref.loc21: %IntLiteralToUint16.type = name_ref IntLiteralToUint16, imports.%import_ref.15 [template = constants.%IntLiteralToUint16] // CHECK:STDOUT: %Int32ToIntLiteral.ref.loc21: %Int32ToIntLiteral.type = name_ref Int32ToIntLiteral, imports.%import_ref.20 [template = constants.%Int32ToIntLiteral] @@ -1510,12 +1510,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc21_61: init %i32 = call %.loc21_61.4(%.loc21_61.1) [template = constants.%.35] // CHECK:STDOUT: %.loc21_61.5: %i32 = value_of_initializer %int.convert_checked.loc21_61 [template = constants.%.35] // CHECK:STDOUT: %.loc21_61.6: %i32 = converted %.loc21_61.1, %.loc21_61.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc21_60: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc21(%.loc21_61.6) [template = constants.%.32] -// CHECK:STDOUT: %.loc21_60.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc21_60 [template = constants.%.32] -// CHECK:STDOUT: %.loc21_60.2: Core.IntLiteral = converted %int.convert_checked.loc21_60, %.loc21_60.1 [template = constants.%.32] -// CHECK:STDOUT: %int.convert_checked.loc21_42: init %u16 = call %IntLiteralToUint16.ref.loc21(%.loc21_60.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc21_69.1: %u16 = value_of_initializer %int.convert_checked.loc21_42 [template = constants.%.36] -// CHECK:STDOUT: %.loc21_69.2: %u16 = converted %int.convert_checked.loc21_42, %.loc21_69.1 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc21_67: init Core.IntLiteral = call %Int32ToIntLiteral.ref.loc21(%.loc21_61.6) [template = constants.%.32] +// CHECK:STDOUT: %.loc21_67.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc21_67 [template = constants.%.32] +// CHECK:STDOUT: %.loc21_67.2: Core.IntLiteral = converted %int.convert_checked.loc21_67, %.loc21_67.1 [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc21_68: init %u16 = call %IntLiteralToUint16.ref.loc21(%.loc21_67.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc21_69.1: %u16 = value_of_initializer %int.convert_checked.loc21_68 [template = constants.%.36] +// CHECK:STDOUT: %.loc21_69.2: %u16 = converted %int.convert_checked.loc21_68, %.loc21_69.1 [template = constants.%.36] // CHECK:STDOUT: %lit_u16_max: %u16 = bind_name lit_u16_max, %.loc21_69.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1667,12 +1667,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc5_43: init %i32 = call %.loc5_43.4(%.loc5_43.1) [template = constants.%.30] // CHECK:STDOUT: %.loc5_43.5: %i32 = value_of_initializer %int.convert_checked.loc5_43 [template = constants.%.30] // CHECK:STDOUT: %.loc5_43.6: %i32 = converted %.loc5_43.1, %.loc5_43.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc5_42: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_43.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc5_42.1: %u32 = value_of_initializer %int.convert_checked.loc5_42 [template = constants.%.31] -// CHECK:STDOUT: %.loc5_42.2: %u32 = converted %int.convert_checked.loc5_42, %.loc5_42.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc5_28: init %u64 = call %Uint32ToUint64.ref.loc5(%.loc5_42.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc5_46.1: %u64 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.32] -// CHECK:STDOUT: %.loc5_46.2: %u64 = converted %int.convert_checked.loc5_28, %.loc5_46.1 [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc5_44: init %u32 = call %Int32ToUint32.ref.loc5(%.loc5_43.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc5_44.1: %u32 = value_of_initializer %int.convert_checked.loc5_44 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_44.2: %u32 = converted %int.convert_checked.loc5_44, %.loc5_44.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc5_45: init %u64 = call %Uint32ToUint64.ref.loc5(%.loc5_44.2) [template = constants.%.32] +// CHECK:STDOUT: %.loc5_46.1: %u64 = value_of_initializer %int.convert_checked.loc5_45 [template = constants.%.32] +// CHECK:STDOUT: %.loc5_46.2: %u64 = converted %int.convert_checked.loc5_45, %.loc5_46.1 [template = constants.%.32] // CHECK:STDOUT: %a: %u64 = bind_name a, %.loc5_46.2 // CHECK:STDOUT: %Uint32ToUint64.ref.loc6: %Uint32ToUint64.type = name_ref Uint32ToUint64, imports.%import_ref.19 [template = constants.%Uint32ToUint64] // CHECK:STDOUT: %AddU32.ref.loc7: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] @@ -1685,7 +1685,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc8_26: init %i32 = call %.loc8_26.4(%.loc8_26.1) [template = constants.%.36] // CHECK:STDOUT: %.loc8_26.5: %i32 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.36] // CHECK:STDOUT: %.loc8_26.6: %i32 = converted %.loc8_26.1, %.loc8_26.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc8_25: init %u32 = call %Int32ToUint32.ref.loc8_12(%.loc8_26.6) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc8_37: init %u32 = call %Int32ToUint32.ref.loc8_12(%.loc8_26.6) [template = constants.%.37] // CHECK:STDOUT: %Int32ToUint32.ref.loc8_40: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc8_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] // CHECK:STDOUT: %.loc8_54.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] @@ -1694,12 +1694,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc8_54: init %i32 = call %.loc8_54.4(%.loc8_54.1) [template = constants.%.36] // CHECK:STDOUT: %.loc8_54.5: %i32 = value_of_initializer %int.convert_checked.loc8_54 [template = constants.%.36] // CHECK:STDOUT: %.loc8_54.6: %i32 = converted %.loc8_54.1, %.loc8_54.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc8_53: init %u32 = call %Int32ToUint32.ref.loc8_40(%.loc8_54.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc8_25.1: %u32 = value_of_initializer %int.convert_checked.loc8_25 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_25.2: %u32 = converted %int.convert_checked.loc8_25, %.loc8_25.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_53.1: %u32 = value_of_initializer %int.convert_checked.loc8_53 [template = constants.%.37] -// CHECK:STDOUT: %.loc8_53.2: %u32 = converted %int.convert_checked.loc8_53, %.loc8_53.1 [template = constants.%.37] -// CHECK:STDOUT: %int.uadd.loc8: init %u32 = call %AddU32.ref.loc8(%.loc8_25.2, %.loc8_53.2) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc8_65: init %u32 = call %Int32ToUint32.ref.loc8_40(%.loc8_54.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc8_37.1: %u32 = value_of_initializer %int.convert_checked.loc8_37 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_37.2: %u32 = converted %int.convert_checked.loc8_37, %.loc8_37.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_65.1: %u32 = value_of_initializer %int.convert_checked.loc8_65 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_65.2: %u32 = converted %int.convert_checked.loc8_65, %.loc8_65.1 [template = constants.%.37] +// CHECK:STDOUT: %int.uadd.loc8: init %u32 = call %AddU32.ref.loc8(%.loc8_37.2, %.loc8_65.2) [template = constants.%.38] // CHECK:STDOUT: %Int32ToUint32.ref.loc9: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc9_19.1: Core.IntLiteral = int_value 1 [template = constants.%.39] // CHECK:STDOUT: %.loc9_19.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] @@ -1708,17 +1708,17 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc9_19: init %i32 = call %.loc9_19.4(%.loc9_19.1) [template = constants.%.42] // CHECK:STDOUT: %.loc9_19.5: %i32 = value_of_initializer %int.convert_checked.loc9_19 [template = constants.%.42] // CHECK:STDOUT: %.loc9_19.6: %i32 = converted %.loc9_19.1, %.loc9_19.5 [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc9_18: init %u32 = call %Int32ToUint32.ref.loc9(%.loc9_19.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc8_11.1: %u32 = value_of_initializer %int.uadd.loc8 [template = constants.%.38] -// CHECK:STDOUT: %.loc8_11.2: %u32 = converted %int.uadd.loc8, %.loc8_11.1 [template = constants.%.38] -// CHECK:STDOUT: %.loc9_18.1: %u32 = value_of_initializer %int.convert_checked.loc9_18 [template = constants.%.43] -// CHECK:STDOUT: %.loc9_18.2: %u32 = converted %int.convert_checked.loc9_18, %.loc9_18.1 [template = constants.%.43] -// CHECK:STDOUT: %int.uadd.loc7: init %u32 = call %AddU32.ref.loc7(%.loc8_11.2, %.loc9_18.2) [template = constants.%.44] -// CHECK:STDOUT: %.loc7_9.1: %u32 = value_of_initializer %int.uadd.loc7 [template = constants.%.44] -// CHECK:STDOUT: %.loc7_9.2: %u32 = converted %int.uadd.loc7, %.loc7_9.1 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc6: init %u64 = call %Uint32ToUint64.ref.loc6(%.loc7_9.2) [template = constants.%.45] -// CHECK:STDOUT: %.loc9_23.1: %u64 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.45] -// CHECK:STDOUT: %.loc9_23.2: %u64 = converted %int.convert_checked.loc6, %.loc9_23.1 [template = constants.%.45] +// CHECK:STDOUT: %int.convert_checked.loc9_20: init %u32 = call %Int32ToUint32.ref.loc9(%.loc9_19.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc8_66.1: %u32 = value_of_initializer %int.uadd.loc8 [template = constants.%.38] +// CHECK:STDOUT: %.loc8_66.2: %u32 = converted %int.uadd.loc8, %.loc8_66.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc9_20.1: %u32 = value_of_initializer %int.convert_checked.loc9_20 [template = constants.%.43] +// CHECK:STDOUT: %.loc9_20.2: %u32 = converted %int.convert_checked.loc9_20, %.loc9_20.1 [template = constants.%.43] +// CHECK:STDOUT: %int.uadd.loc9: init %u32 = call %AddU32.ref.loc7(%.loc8_66.2, %.loc9_20.2) [template = constants.%.44] +// CHECK:STDOUT: %.loc9_21.1: %u32 = value_of_initializer %int.uadd.loc9 [template = constants.%.44] +// CHECK:STDOUT: %.loc9_21.2: %u32 = converted %int.uadd.loc9, %.loc9_21.1 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc9_22: init %u64 = call %Uint32ToUint64.ref.loc6(%.loc9_21.2) [template = constants.%.45] +// CHECK:STDOUT: %.loc9_23.1: %u64 = value_of_initializer %int.convert_checked.loc9_22 [template = constants.%.45] +// CHECK:STDOUT: %.loc9_23.2: %u64 = converted %int.convert_checked.loc9_22, %.loc9_23.1 [template = constants.%.45] // CHECK:STDOUT: %b: %u64 = bind_name b, %.loc9_23.2 // CHECK:STDOUT: %Uint32ToInt64.ref.loc11: %Uint32ToInt64.type = name_ref Uint32ToInt64, imports.%import_ref.18 [template = constants.%Uint32ToInt64] // CHECK:STDOUT: %Int32ToUint32.ref.loc11: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] @@ -1729,12 +1729,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc11_42: init %i32 = call %.loc11_42.4(%.loc11_42.1) [template = constants.%.30] // CHECK:STDOUT: %.loc11_42.5: %i32 = value_of_initializer %int.convert_checked.loc11_42 [template = constants.%.30] // CHECK:STDOUT: %.loc11_42.6: %i32 = converted %.loc11_42.1, %.loc11_42.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc11_41: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_42.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc11_41.1: %u32 = value_of_initializer %int.convert_checked.loc11_41 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_41.2: %u32 = converted %int.convert_checked.loc11_41, %.loc11_41.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc11_27: init %i64 = call %Uint32ToInt64.ref.loc11(%.loc11_41.2) [template = constants.%.46] -// CHECK:STDOUT: %.loc11_45.1: %i64 = value_of_initializer %int.convert_checked.loc11_27 [template = constants.%.46] -// CHECK:STDOUT: %.loc11_45.2: %i64 = converted %int.convert_checked.loc11_27, %.loc11_45.1 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc11_43: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_42.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc11_43.1: %u32 = value_of_initializer %int.convert_checked.loc11_43 [template = constants.%.31] +// CHECK:STDOUT: %.loc11_43.2: %u32 = converted %int.convert_checked.loc11_43, %.loc11_43.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc11_44: init %i64 = call %Uint32ToInt64.ref.loc11(%.loc11_43.2) [template = constants.%.46] +// CHECK:STDOUT: %.loc11_45.1: %i64 = value_of_initializer %int.convert_checked.loc11_44 [template = constants.%.46] +// CHECK:STDOUT: %.loc11_45.2: %i64 = converted %int.convert_checked.loc11_44, %.loc11_45.1 [template = constants.%.46] // CHECK:STDOUT: %c: %i64 = bind_name c, %.loc11_45.2 // CHECK:STDOUT: %Uint32ToInt64.ref.loc12: %Uint32ToInt64.type = name_ref Uint32ToInt64, imports.%import_ref.18 [template = constants.%Uint32ToInt64] // CHECK:STDOUT: %AddU32.ref.loc13: %AddU32.type = name_ref AddU32, imports.%import_ref.3 [template = constants.%AddU32] @@ -1747,7 +1747,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc14_26: init %i32 = call %.loc14_26.4(%.loc14_26.1) [template = constants.%.36] // CHECK:STDOUT: %.loc14_26.5: %i32 = value_of_initializer %int.convert_checked.loc14_26 [template = constants.%.36] // CHECK:STDOUT: %.loc14_26.6: %i32 = converted %.loc14_26.1, %.loc14_26.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc14_25: init %u32 = call %Int32ToUint32.ref.loc14_12(%.loc14_26.6) [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc14_37: init %u32 = call %Int32ToUint32.ref.loc14_12(%.loc14_26.6) [template = constants.%.37] // CHECK:STDOUT: %Int32ToUint32.ref.loc14_40: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc14_54.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.33] // CHECK:STDOUT: %.loc14_54.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] @@ -1756,12 +1756,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc14_54: init %i32 = call %.loc14_54.4(%.loc14_54.1) [template = constants.%.36] // CHECK:STDOUT: %.loc14_54.5: %i32 = value_of_initializer %int.convert_checked.loc14_54 [template = constants.%.36] // CHECK:STDOUT: %.loc14_54.6: %i32 = converted %.loc14_54.1, %.loc14_54.5 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc14_53: init %u32 = call %Int32ToUint32.ref.loc14_40(%.loc14_54.6) [template = constants.%.37] -// CHECK:STDOUT: %.loc14_25.1: %u32 = value_of_initializer %int.convert_checked.loc14_25 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_25.2: %u32 = converted %int.convert_checked.loc14_25, %.loc14_25.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_53.1: %u32 = value_of_initializer %int.convert_checked.loc14_53 [template = constants.%.37] -// CHECK:STDOUT: %.loc14_53.2: %u32 = converted %int.convert_checked.loc14_53, %.loc14_53.1 [template = constants.%.37] -// CHECK:STDOUT: %int.uadd.loc14: init %u32 = call %AddU32.ref.loc14(%.loc14_25.2, %.loc14_53.2) [template = constants.%.38] +// CHECK:STDOUT: %int.convert_checked.loc14_65: init %u32 = call %Int32ToUint32.ref.loc14_40(%.loc14_54.6) [template = constants.%.37] +// CHECK:STDOUT: %.loc14_37.1: %u32 = value_of_initializer %int.convert_checked.loc14_37 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_37.2: %u32 = converted %int.convert_checked.loc14_37, %.loc14_37.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_65.1: %u32 = value_of_initializer %int.convert_checked.loc14_65 [template = constants.%.37] +// CHECK:STDOUT: %.loc14_65.2: %u32 = converted %int.convert_checked.loc14_65, %.loc14_65.1 [template = constants.%.37] +// CHECK:STDOUT: %int.uadd.loc14: init %u32 = call %AddU32.ref.loc14(%.loc14_37.2, %.loc14_65.2) [template = constants.%.38] // CHECK:STDOUT: %Int32ToUint32.ref.loc15: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc15_19.1: Core.IntLiteral = int_value 1 [template = constants.%.39] // CHECK:STDOUT: %.loc15_19.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] @@ -1770,17 +1770,17 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc15_19: init %i32 = call %.loc15_19.4(%.loc15_19.1) [template = constants.%.42] // CHECK:STDOUT: %.loc15_19.5: %i32 = value_of_initializer %int.convert_checked.loc15_19 [template = constants.%.42] // CHECK:STDOUT: %.loc15_19.6: %i32 = converted %.loc15_19.1, %.loc15_19.5 [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc15_18: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_19.6) [template = constants.%.43] -// CHECK:STDOUT: %.loc14_11.1: %u32 = value_of_initializer %int.uadd.loc14 [template = constants.%.38] -// CHECK:STDOUT: %.loc14_11.2: %u32 = converted %int.uadd.loc14, %.loc14_11.1 [template = constants.%.38] -// CHECK:STDOUT: %.loc15_18.1: %u32 = value_of_initializer %int.convert_checked.loc15_18 [template = constants.%.43] -// CHECK:STDOUT: %.loc15_18.2: %u32 = converted %int.convert_checked.loc15_18, %.loc15_18.1 [template = constants.%.43] -// CHECK:STDOUT: %int.uadd.loc13: init %u32 = call %AddU32.ref.loc13(%.loc14_11.2, %.loc15_18.2) [template = constants.%.44] -// CHECK:STDOUT: %.loc13_9.1: %u32 = value_of_initializer %int.uadd.loc13 [template = constants.%.44] -// CHECK:STDOUT: %.loc13_9.2: %u32 = converted %int.uadd.loc13, %.loc13_9.1 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i64 = call %Uint32ToInt64.ref.loc12(%.loc13_9.2) [template = constants.%.47] -// CHECK:STDOUT: %.loc15_23.1: %i64 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.47] -// CHECK:STDOUT: %.loc15_23.2: %i64 = converted %int.convert_checked.loc12, %.loc15_23.1 [template = constants.%.47] +// CHECK:STDOUT: %int.convert_checked.loc15_20: init %u32 = call %Int32ToUint32.ref.loc15(%.loc15_19.6) [template = constants.%.43] +// CHECK:STDOUT: %.loc14_66.1: %u32 = value_of_initializer %int.uadd.loc14 [template = constants.%.38] +// CHECK:STDOUT: %.loc14_66.2: %u32 = converted %int.uadd.loc14, %.loc14_66.1 [template = constants.%.38] +// CHECK:STDOUT: %.loc15_20.1: %u32 = value_of_initializer %int.convert_checked.loc15_20 [template = constants.%.43] +// CHECK:STDOUT: %.loc15_20.2: %u32 = converted %int.convert_checked.loc15_20, %.loc15_20.1 [template = constants.%.43] +// CHECK:STDOUT: %int.uadd.loc15: init %u32 = call %AddU32.ref.loc13(%.loc14_66.2, %.loc15_20.2) [template = constants.%.44] +// CHECK:STDOUT: %.loc15_21.1: %u32 = value_of_initializer %int.uadd.loc15 [template = constants.%.44] +// CHECK:STDOUT: %.loc15_21.2: %u32 = converted %int.uadd.loc15, %.loc15_21.1 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc15_22: init %i64 = call %Uint32ToInt64.ref.loc12(%.loc15_21.2) [template = constants.%.47] +// CHECK:STDOUT: %.loc15_23.1: %i64 = value_of_initializer %int.convert_checked.loc15_22 [template = constants.%.47] +// CHECK:STDOUT: %.loc15_23.2: %i64 = converted %int.convert_checked.loc15_22, %.loc15_23.1 [template = constants.%.47] // CHECK:STDOUT: %d: %i64 = bind_name d, %.loc15_23.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -1927,9 +1927,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc5_28: init %i32 = call %.loc5_28.4(%.loc5_28.1) [template = constants.%.30] // CHECK:STDOUT: %.loc5_28.5: %i32 = value_of_initializer %int.convert_checked.loc5_28 [template = constants.%.30] // CHECK:STDOUT: %.loc5_28.6: %i32 = converted %.loc5_28.1, %.loc5_28.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc5_27: init %u64 = call %Int32ToUint64.ref.loc5(%.loc5_28.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc5_30.1: %u64 = value_of_initializer %int.convert_checked.loc5_27 [template = constants.%.31] -// CHECK:STDOUT: %.loc5_30.2: %u64 = converted %int.convert_checked.loc5_27, %.loc5_30.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc5_29: init %u64 = call %Int32ToUint64.ref.loc5(%.loc5_28.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc5_30.1: %u64 = value_of_initializer %int.convert_checked.loc5_29 [template = constants.%.31] +// CHECK:STDOUT: %.loc5_30.2: %u64 = converted %int.convert_checked.loc5_29, %.loc5_30.1 [template = constants.%.31] // CHECK:STDOUT: %a: %u64 = bind_name a, %.loc5_30.2 // CHECK:STDOUT: %Int32ToUint64.ref.loc6: %Int32ToUint64.type = name_ref Int32ToUint64, imports.%import_ref.17 [template = constants.%Int32ToUint64] // CHECK:STDOUT: %.loc6_28.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.32] @@ -1939,9 +1939,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc6_28: init %i32 = call %.loc6_28.4(%.loc6_28.1) [template = constants.%.35] // CHECK:STDOUT: %.loc6_28.5: %i32 = value_of_initializer %int.convert_checked.loc6_28 [template = constants.%.35] // CHECK:STDOUT: %.loc6_28.6: %i32 = converted %.loc6_28.1, %.loc6_28.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc6_27: init %u64 = call %Int32ToUint64.ref.loc6(%.loc6_28.6) [template = constants.%.36] -// CHECK:STDOUT: %.loc6_40.1: %u64 = value_of_initializer %int.convert_checked.loc6_27 [template = constants.%.36] -// CHECK:STDOUT: %.loc6_40.2: %u64 = converted %int.convert_checked.loc6_27, %.loc6_40.1 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc6_39: init %u64 = call %Int32ToUint64.ref.loc6(%.loc6_28.6) [template = constants.%.36] +// CHECK:STDOUT: %.loc6_40.1: %u64 = value_of_initializer %int.convert_checked.loc6_39 [template = constants.%.36] +// CHECK:STDOUT: %.loc6_40.2: %u64 = converted %int.convert_checked.loc6_39, %.loc6_40.1 [template = constants.%.36] // CHECK:STDOUT: %b: %u64 = bind_name b, %.loc6_40.2 // CHECK:STDOUT: %Int32ToInt64.ref.loc8: %Int32ToInt64.type = name_ref Int32ToInt64, imports.%import_ref.16 [template = constants.%Int32ToInt64] // CHECK:STDOUT: %SubI32.ref: %SubI32.type = name_ref SubI32, imports.%import_ref.2 [template = constants.%SubI32] @@ -1955,20 +1955,20 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc8_44.6: %i32 = converted %.loc8_44.1, %.loc8_44.5 [template = constants.%.35] // CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc8_44.6) [template = constants.%.37] // CHECK:STDOUT: %.loc8_58.1: Core.IntLiteral = int_value 1 [template = constants.%.38] -// CHECK:STDOUT: %.loc8_43.1: %i32 = value_of_initializer %int.snegate [template = constants.%.37] -// CHECK:STDOUT: %.loc8_43.2: %i32 = converted %int.snegate, %.loc8_43.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc8_55.1: %i32 = value_of_initializer %int.snegate [template = constants.%.37] +// CHECK:STDOUT: %.loc8_55.2: %i32 = converted %int.snegate, %.loc8_55.1 [template = constants.%.37] // CHECK:STDOUT: %.loc8_58.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc8_58.3: = bound_method %.loc8_58.1, %.loc8_58.2 [template = constants.%.39] // CHECK:STDOUT: %.loc8_58.4: = specific_function %.loc8_58.3, @Convert.2(constants.%.2) [template = constants.%.40] // CHECK:STDOUT: %int.convert_checked.loc8_58: init %i32 = call %.loc8_58.4(%.loc8_58.1) [template = constants.%.41] // CHECK:STDOUT: %.loc8_58.5: %i32 = value_of_initializer %int.convert_checked.loc8_58 [template = constants.%.41] // CHECK:STDOUT: %.loc8_58.6: %i32 = converted %.loc8_58.1, %.loc8_58.5 [template = constants.%.41] -// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc8_43.2, %.loc8_58.6) [template = constants.%.42] -// CHECK:STDOUT: %.loc8_33.1: %i32 = value_of_initializer %int.ssub [template = constants.%.42] -// CHECK:STDOUT: %.loc8_33.2: %i32 = converted %int.ssub, %.loc8_33.1 [template = constants.%.42] -// CHECK:STDOUT: %int.convert_checked.loc8_26: init %i64 = call %Int32ToInt64.ref.loc8(%.loc8_33.2) [template = constants.%.43] -// CHECK:STDOUT: %.loc8_61.1: %i64 = value_of_initializer %int.convert_checked.loc8_26 [template = constants.%.43] -// CHECK:STDOUT: %.loc8_61.2: %i64 = converted %int.convert_checked.loc8_26, %.loc8_61.1 [template = constants.%.43] +// CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc8_55.2, %.loc8_58.6) [template = constants.%.42] +// CHECK:STDOUT: %.loc8_59.1: %i32 = value_of_initializer %int.ssub [template = constants.%.42] +// CHECK:STDOUT: %.loc8_59.2: %i32 = converted %int.ssub, %.loc8_59.1 [template = constants.%.42] +// CHECK:STDOUT: %int.convert_checked.loc8_60: init %i64 = call %Int32ToInt64.ref.loc8(%.loc8_59.2) [template = constants.%.43] +// CHECK:STDOUT: %.loc8_61.1: %i64 = value_of_initializer %int.convert_checked.loc8_60 [template = constants.%.43] +// CHECK:STDOUT: %.loc8_61.2: %i64 = converted %int.convert_checked.loc8_60, %.loc8_61.1 [template = constants.%.43] // CHECK:STDOUT: %c: %i64 = bind_name c, %.loc8_61.2 // CHECK:STDOUT: %Int32ToInt64.ref.loc9: %Int32ToInt64.type = name_ref Int32ToInt64, imports.%import_ref.16 [template = constants.%Int32ToInt64] // CHECK:STDOUT: %.loc9_27.1: Core.IntLiteral = int_value 2147483647 [template = constants.%.32] @@ -1978,9 +1978,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc9_27: init %i32 = call %.loc9_27.4(%.loc9_27.1) [template = constants.%.35] // CHECK:STDOUT: %.loc9_27.5: %i32 = value_of_initializer %int.convert_checked.loc9_27 [template = constants.%.35] // CHECK:STDOUT: %.loc9_27.6: %i32 = converted %.loc9_27.1, %.loc9_27.5 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_26: init %i64 = call %Int32ToInt64.ref.loc9(%.loc9_27.6) [template = constants.%.44] -// CHECK:STDOUT: %.loc9_39.1: %i64 = value_of_initializer %int.convert_checked.loc9_26 [template = constants.%.44] -// CHECK:STDOUT: %.loc9_39.2: %i64 = converted %int.convert_checked.loc9_26, %.loc9_39.1 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i64 = call %Int32ToInt64.ref.loc9(%.loc9_27.6) [template = constants.%.44] +// CHECK:STDOUT: %.loc9_39.1: %i64 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.44] +// CHECK:STDOUT: %.loc9_39.2: %i64 = converted %int.convert_checked.loc9_38, %.loc9_39.1 [template = constants.%.44] // CHECK:STDOUT: %d: %i64 = bind_name d, %.loc9_39.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2099,7 +2099,7 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc11_26: init %i32 = call %.loc11_26.4(%.loc11_26.1) [template = constants.%.29] // CHECK:STDOUT: %.loc11_26.5: %i32 = value_of_initializer %int.convert_checked.loc11_26 [template = constants.%.29] // CHECK:STDOUT: %.loc11_26.6: %i32 = converted %.loc11_26.1, %.loc11_26.5 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc11_25: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_26.6) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc11_37: init %u32 = call %Int32ToUint32.ref.loc11(%.loc11_26.6) [template = constants.%.30] // CHECK:STDOUT: %Int32ToUint32.ref.loc12: %Int32ToUint32.type = name_ref Int32ToUint32, imports.%import_ref.6 [template = constants.%Int32ToUint32] // CHECK:STDOUT: %.loc12_26.1: Core.IntLiteral = int_value 1 [template = constants.%.31] // CHECK:STDOUT: %.loc12_26.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] @@ -2108,17 +2108,17 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc12_26: init %i32 = call %.loc12_26.4(%.loc12_26.1) [template = constants.%.34] // CHECK:STDOUT: %.loc12_26.5: %i32 = value_of_initializer %int.convert_checked.loc12_26 [template = constants.%.34] // CHECK:STDOUT: %.loc12_26.6: %i32 = converted %.loc12_26.1, %.loc12_26.5 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc12_25: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_26.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc11_25.1: %u32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_25.2: %u32 = converted %int.convert_checked.loc11_25, %.loc11_25.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_25.1: %u32 = value_of_initializer %int.convert_checked.loc12_25 [template = constants.%.35] -// CHECK:STDOUT: %.loc12_25.2: %u32 = converted %int.convert_checked.loc12_25, %.loc12_25.1 [template = constants.%.35] -// CHECK:STDOUT: %int.uadd: init %u32 = call %AddU32.ref(%.loc11_25.2, %.loc12_25.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc11_11.1: %u32 = value_of_initializer %int.uadd [template = constants.%.36] -// CHECK:STDOUT: %.loc11_11.2: %u32 = converted %int.uadd, %.loc11_11.1 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %Uint32ToInt32.ref(%.loc11_11.2) [template = constants.%.37] -// CHECK:STDOUT: %.loc12_30.1: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_30.2: %i32 = converted %int.convert_checked.loc10, %.loc12_30.1 [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc12_27: init %u32 = call %Int32ToUint32.ref.loc12(%.loc12_26.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc11_37.1: %u32 = value_of_initializer %int.convert_checked.loc11_37 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_37.2: %u32 = converted %int.convert_checked.loc11_37, %.loc11_37.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_27.1: %u32 = value_of_initializer %int.convert_checked.loc12_27 [template = constants.%.35] +// CHECK:STDOUT: %.loc12_27.2: %u32 = converted %int.convert_checked.loc12_27, %.loc12_27.1 [template = constants.%.35] +// CHECK:STDOUT: %int.uadd: init %u32 = call %AddU32.ref(%.loc11_37.2, %.loc12_27.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc12_28.1: %u32 = value_of_initializer %int.uadd [template = constants.%.36] +// CHECK:STDOUT: %.loc12_28.2: %u32 = converted %int.uadd, %.loc12_28.1 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc12_29: init %i32 = call %Uint32ToInt32.ref(%.loc12_28.2) [template = constants.%.37] +// CHECK:STDOUT: %.loc12_30.1: %i32 = value_of_initializer %int.convert_checked.loc12_29 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_30.2: %i32 = converted %int.convert_checked.loc12_29, %.loc12_30.1 [template = constants.%.37] // CHECK:STDOUT: %max_plus_one: %i32 = bind_name max_plus_one, %.loc12_30.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2221,9 +2221,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc9_38: init %i32 = call %.loc9_38.4(%.loc9_38.1) [template = constants.%.30] // CHECK:STDOUT: %.loc9_38.5: %i32 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.30] // CHECK:STDOUT: %.loc9_38.6: %i32 = converted %.loc9_38.1, %.loc9_38.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_37: init %i16 = call %Int32ToInt16.ref(%.loc9_38.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_37 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_37, %.loc9_45.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_44: init %i16 = call %Int32ToInt16.ref(%.loc9_38.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_45.1: %i16 = value_of_initializer %int.convert_checked.loc9_44 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_45.2: %i16 = converted %int.convert_checked.loc9_44, %.loc9_45.1 [template = constants.%.31] // CHECK:STDOUT: %max_plus_one: %i16 = bind_name max_plus_one, %.loc9_45.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2326,9 +2326,9 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc9_39: init %i32 = call %.loc9_39.4(%.loc9_39.1) [template = constants.%.30] // CHECK:STDOUT: %.loc9_39.5: %i32 = value_of_initializer %int.convert_checked.loc9_39 [template = constants.%.30] // CHECK:STDOUT: %.loc9_39.6: %i32 = converted %.loc9_39.1, %.loc9_39.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_38: init %u16 = call %Int32ToUint16.ref(%.loc9_39.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_48.1: %u16 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_48.2: %u16 = converted %int.convert_checked.loc9_38, %.loc9_48.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_47: init %u16 = call %Int32ToUint16.ref(%.loc9_39.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_48.1: %u16 = value_of_initializer %int.convert_checked.loc9_47 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_48.2: %u16 = converted %int.convert_checked.loc9_47, %.loc9_48.1 [template = constants.%.31] // CHECK:STDOUT: %max_plus_one: %u16 = bind_name max_plus_one, %.loc9_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2438,12 +2438,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc9_53: init %i32 = call %.loc9_53.4(%.loc9_53.1) [template = constants.%.30] // CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.30] // CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_52: init %u32 = call %Int32ToUint32.ref(%.loc9_53.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_52.1: %u32 = value_of_initializer %int.convert_checked.loc9_52 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_52.2: %u32 = converted %int.convert_checked.loc9_52, %.loc9_52.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i16 = call %Uint32ToInt16.ref(%.loc9_52.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_61.1: %i16 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_61.2: %i16 = converted %int.convert_checked.loc9_38, %.loc9_61.1 [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc9_59: init %u32 = call %Int32ToUint32.ref(%.loc9_53.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_59.1: %u32 = value_of_initializer %int.convert_checked.loc9_59 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_59.2: %u32 = converted %int.convert_checked.loc9_59, %.loc9_59.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_60: init %i16 = call %Uint32ToInt16.ref(%.loc9_59.2) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_61.1: %i16 = value_of_initializer %int.convert_checked.loc9_60 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_61.2: %i16 = converted %int.convert_checked.loc9_60, %.loc9_61.1 [template = constants.%.32] // CHECK:STDOUT: %max_plus_one: %i16 = bind_name max_plus_one, %.loc9_61.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2553,12 +2553,12 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %int.convert_checked.loc9_54: init %i32 = call %.loc9_54.4(%.loc9_54.1) [template = constants.%.30] // CHECK:STDOUT: %.loc9_54.5: %i32 = value_of_initializer %int.convert_checked.loc9_54 [template = constants.%.30] // CHECK:STDOUT: %.loc9_54.6: %i32 = converted %.loc9_54.1, %.loc9_54.5 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc9_53: init %u32 = call %Int32ToUint32.ref(%.loc9_54.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_53.1: %u32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.31] -// CHECK:STDOUT: %.loc9_53.2: %u32 = converted %int.convert_checked.loc9_53, %.loc9_53.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_39: init %u16 = call %Uint32ToUint16.ref(%.loc9_53.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_64.1: %u16 = value_of_initializer %int.convert_checked.loc9_39 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_64.2: %u16 = converted %int.convert_checked.loc9_39, %.loc9_64.1 [template = constants.%.32] +// CHECK:STDOUT: %int.convert_checked.loc9_62: init %u32 = call %Int32ToUint32.ref(%.loc9_54.6) [template = constants.%.31] +// CHECK:STDOUT: %.loc9_62.1: %u32 = value_of_initializer %int.convert_checked.loc9_62 [template = constants.%.31] +// CHECK:STDOUT: %.loc9_62.2: %u32 = converted %int.convert_checked.loc9_62, %.loc9_62.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_63: init %u16 = call %Uint32ToUint16.ref(%.loc9_62.2) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_64.1: %u16 = value_of_initializer %int.convert_checked.loc9_63 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_64.2: %u16 = converted %int.convert_checked.loc9_63, %.loc9_64.1 [template = constants.%.32] // CHECK:STDOUT: %max_plus_one: %u16 = bind_name max_plus_one, %.loc9_64.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2679,11 +2679,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.34] // CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.34] // CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.ssub, %.loc9_49.1 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_42: init %u16 = call %Int32ToUint16.ref(%.loc9_49.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_56.1: %u16 = value_of_initializer %int.convert_checked.loc9_42 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_56.2: %u16 = converted %int.convert_checked.loc9_42, %.loc9_56.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] +// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int.ssub, %.loc9_54.1 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9_55: init %u16 = call %Int32ToUint16.ref(%.loc9_54.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_56.1: %u16 = value_of_initializer %int.convert_checked.loc9_55 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_56.2: %u16 = converted %int.convert_checked.loc9_55, %.loc9_56.1 [template = constants.%.36] // CHECK:STDOUT: %minus_one_to_u16: %u16 = bind_name minus_one_to_u16, %.loc9_56.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2803,11 +2803,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.33] // CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.33] // CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.34] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.ssub [template = constants.%.34] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.ssub, %.loc9_49.1 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc9_42: init %u32 = call %Int32ToUint32.ref(%.loc9_49.2) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_56.1: %u32 = value_of_initializer %int.convert_checked.loc9_42 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_56.2: %u32 = converted %int.convert_checked.loc9_42, %.loc9_56.1 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.ssub [template = constants.%.34] +// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int.ssub, %.loc9_54.1 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc9_55: init %u32 = call %Int32ToUint32.ref(%.loc9_54.2) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_56.1: %u32 = value_of_initializer %int.convert_checked.loc9_55 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_56.2: %u32 = converted %int.convert_checked.loc9_55, %.loc9_56.1 [template = constants.%.35] // CHECK:STDOUT: %minus_one_to_u32: %u32 = bind_name minus_one_to_u32, %.loc9_56.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -2928,11 +2928,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc9_53.5: %i32 = value_of_initializer %int.convert_checked.loc9_53 [template = constants.%.34] // CHECK:STDOUT: %.loc9_53.6: %i32 = converted %.loc9_53.1, %.loc9_53.5 [template = constants.%.34] // CHECK:STDOUT: %int.ssub: init %i32 = call %SubI32.ref(%.loc9_50.6, %.loc9_53.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] -// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.ssub, %.loc9_49.1 [template = constants.%.35] -// CHECK:STDOUT: %int.convert_checked.loc9_42: init %u64 = call %Int32ToUint64.ref(%.loc9_49.2) [template = constants.%.36] -// CHECK:STDOUT: %.loc9_56.1: %u64 = value_of_initializer %int.convert_checked.loc9_42 [template = constants.%.36] -// CHECK:STDOUT: %.loc9_56.2: %u64 = converted %int.convert_checked.loc9_42, %.loc9_56.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_54.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] +// CHECK:STDOUT: %.loc9_54.2: %i32 = converted %int.ssub, %.loc9_54.1 [template = constants.%.35] +// CHECK:STDOUT: %int.convert_checked.loc9_55: init %u64 = call %Int32ToUint64.ref(%.loc9_54.2) [template = constants.%.36] +// CHECK:STDOUT: %.loc9_56.1: %u64 = value_of_initializer %int.convert_checked.loc9_55 [template = constants.%.36] +// CHECK:STDOUT: %.loc9_56.2: %u64 = converted %int.convert_checked.loc9_55, %.loc9_56.1 [template = constants.%.36] // CHECK:STDOUT: %minus_one_to_u64: %u64 = bind_name minus_one_to_u64, %.loc9_56.2 // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -3042,11 +3042,11 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant); // CHECK:STDOUT: %.loc9_49.5: %i32 = value_of_initializer %int.convert_checked.loc9_49 [template = constants.%.30] // CHECK:STDOUT: %.loc9_49.6: %i32 = converted %.loc9_49.1, %.loc9_49.5 [template = constants.%.30] // CHECK:STDOUT: %int.snegate: init %i32 = call %NegateI32.ref(%.loc9_49.6) [template = constants.%.31] -// CHECK:STDOUT: %.loc9_48.1: %i32 = value_of_initializer %int.snegate [template = constants.%.31] -// CHECK:STDOUT: %.loc9_48.2: %i32 = converted %int.snegate, %.loc9_48.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9_38: init %i16 = call %Int32ToInt16.ref(%.loc9_48.2) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_57.1: %i16 = value_of_initializer %int.convert_checked.loc9_38 [template = constants.%.32] -// CHECK:STDOUT: %.loc9_57.2: %i16 = converted %int.convert_checked.loc9_38, %.loc9_57.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_55.1: %i32 = value_of_initializer %int.snegate [template = constants.%.31] +// CHECK:STDOUT: %.loc9_55.2: %i32 = converted %int.snegate, %.loc9_55.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9_56: init %i16 = call %Int32ToInt16.ref(%.loc9_55.2) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_57.1: %i16 = value_of_initializer %int.convert_checked.loc9_56 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_57.2: %i16 = converted %int.convert_checked.loc9_56, %.loc9_57.1 [template = constants.%.32] // CHECK:STDOUT: %min_minus_one: %i16 = bind_name min_minus_one, %.loc9_57.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/greater.carbon b/toolchain/check/testdata/builtins/int/greater.carbon index 2c8d9aac79c15..7d0b15ef8ba81 100644 --- a/toolchain/check/testdata/builtins/int/greater.carbon +++ b/toolchain/check/testdata/builtins/int/greater.carbon @@ -306,15 +306,15 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_32.6: %i32 = converted %.loc12_32.1, %.loc12_32.5 [template = constants.%.33] // CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_32.6) [template = constants.%.43] // CHECK:STDOUT: %.loc12_36.1: Core.IntLiteral = int_value 0 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_31.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_31.2: %i32 = converted %int.snegate.loc12, %.loc12_31.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_33.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_33.2: %i32 = converted %int.snegate.loc12, %.loc12_33.1 [template = constants.%.43] // CHECK:STDOUT: %.loc12_36.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_36.3: = bound_method %.loc12_36.1, %.loc12_36.2 [template = constants.%.39] // CHECK:STDOUT: %.loc12_36.4: = specific_function %.loc12_36.3, @Convert.2(constants.%.1) [template = constants.%.40] // CHECK:STDOUT: %int.convert_checked.loc12_36: init %i32 = call %.loc12_36.4(%.loc12_36.1) [template = constants.%.41] // CHECK:STDOUT: %.loc12_36.5: %i32 = value_of_initializer %int.convert_checked.loc12_36 [template = constants.%.41] // CHECK:STDOUT: %.loc12_36.6: %i32 = converted %.loc12_36.1, %.loc12_36.5 [template = constants.%.41] -// CHECK:STDOUT: %int.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_31.2, %.loc12_36.6) [template = constants.%.37] +// CHECK:STDOUT: %int.greater.loc12: init bool = call %Greater.ref.loc12(%.loc12_33.2, %.loc12_36.6) [template = constants.%.37] // CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater.loc12 [template = constants.%.37] // CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater.loc12, %.loc12_14.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 @@ -347,9 +347,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %.loc13_24.4(%.loc13_24.1) [template = constants.%.41] // CHECK:STDOUT: %.loc13_24.5: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.41] // CHECK:STDOUT: %.loc13_24.6: %i32 = converted %.loc13_24.1, %.loc13_24.5 [template = constants.%.41] -// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.43] -// CHECK:STDOUT: %int.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24.6, %.loc13_33.2) [template = constants.%.42] +// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%.43] +// CHECK:STDOUT: %int.greater.loc13: init bool = call %Greater.ref.loc13(%.loc13_24.6, %.loc13_35.2) [template = constants.%.42] // CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater.loc13 [template = constants.%.42] // CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater.loc13, %.loc13_13.1 [template = constants.%.42] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 diff --git a/toolchain/check/testdata/builtins/int/greater_eq.carbon b/toolchain/check/testdata/builtins/int/greater_eq.carbon index a58b22ba47d7b..b232508e9a059 100644 --- a/toolchain/check/testdata/builtins/int/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/int/greater_eq.carbon @@ -306,15 +306,15 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_34.6: %i32 = converted %.loc12_34.1, %.loc12_34.5 [template = constants.%.33] // CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_34.6) [template = constants.%.43] // CHECK:STDOUT: %.loc12_38.1: Core.IntLiteral = int_value 0 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_33.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_33.2: %i32 = converted %int.snegate.loc12, %.loc12_33.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_35.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_35.2: %i32 = converted %int.snegate.loc12, %.loc12_35.1 [template = constants.%.43] // CHECK:STDOUT: %.loc12_38.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_38.3: = bound_method %.loc12_38.1, %.loc12_38.2 [template = constants.%.40] // CHECK:STDOUT: %.loc12_38.4: = specific_function %.loc12_38.3, @Convert.2(constants.%.1) [template = constants.%.41] // CHECK:STDOUT: %int.convert_checked.loc12_38: init %i32 = call %.loc12_38.4(%.loc12_38.1) [template = constants.%.42] // CHECK:STDOUT: %.loc12_38.5: %i32 = value_of_initializer %int.convert_checked.loc12_38 [template = constants.%.42] // CHECK:STDOUT: %.loc12_38.6: %i32 = converted %.loc12_38.1, %.loc12_38.5 [template = constants.%.42] -// CHECK:STDOUT: %int.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_33.2, %.loc12_38.6) [template = constants.%.37] +// CHECK:STDOUT: %int.greater_eq.loc12: init bool = call %GreaterEq.ref.loc12(%.loc12_35.2, %.loc12_38.6) [template = constants.%.37] // CHECK:STDOUT: %.loc12_14.1: bool = value_of_initializer %int.greater_eq.loc12 [template = constants.%.37] // CHECK:STDOUT: %.loc12_14.2: bool = converted %int.greater_eq.loc12, %.loc12_14.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc12_14.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 @@ -347,9 +347,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.convert_checked.loc13_26: init %i32 = call %.loc13_26.4(%.loc13_26.1) [template = constants.%.42] // CHECK:STDOUT: %.loc13_26.5: %i32 = value_of_initializer %int.convert_checked.loc13_26 [template = constants.%.42] // CHECK:STDOUT: %.loc13_26.6: %i32 = converted %.loc13_26.1, %.loc13_26.5 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%.43] -// CHECK:STDOUT: %int.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26.6, %.loc13_35.2) [template = constants.%.38] +// CHECK:STDOUT: %.loc13_37.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_37.2: %i32 = converted %int.snegate.loc13, %.loc13_37.1 [template = constants.%.43] +// CHECK:STDOUT: %int.greater_eq.loc13: init bool = call %GreaterEq.ref.loc13(%.loc13_26.6, %.loc13_37.2) [template = constants.%.38] // CHECK:STDOUT: %.loc13_13.1: bool = value_of_initializer %int.greater_eq.loc13 [template = constants.%.38] // CHECK:STDOUT: %.loc13_13.2: bool = converted %int.greater_eq.loc13, %.loc13_13.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc13_13.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index 7674a8cf20ec7..db66fcb79137e 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -32,12 +32,12 @@ fn Negate(a: i32) -> i32 = "int.snegate"; let size_1: i32 = LeftShift(1, 31); // CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error: shift distance not in range [0, 32) in 1 << 32 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let size_2: i32 = LeftShift(1, 32); -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: let size_2: i32 = LeftShift(1, 32); // CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error: shift distance not in range [0, 32) in 1 << 33 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let size_3: i32 = LeftShift(1, 33); -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: let size_3: i32 = LeftShift(1, 33); @@ -45,7 +45,7 @@ let size_3: i32 = LeftShift(1, 33); let overflow_1: i32 = LeftShift(1000, 31); // CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:23: error: shift distance not in range [0, 32) in 1000 << 32 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let overflow_2: i32 = LeftShift(1000, 32); -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let overflow_2: i32 = LeftShift(1000, 32); @@ -53,14 +53,14 @@ let overflow_2: i32 = LeftShift(1000, 32); let no_overflow_1: i32 = LeftShift(0, 31); // CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:26: error: shift distance not in range [0, 32) in 0 << 32 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let no_overflow_2: i32 = LeftShift(0, 32); -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: let no_overflow_2: i32 = LeftShift(0, 32); // Negative shifts aren't allowed either. // CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+3]]:21: error: shift distance not in range [0, 32) in 1 << -1 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let negative: i32 = LeftShift(1, Negate(1)); -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: --- int_left_shift.carbon @@ -163,15 +163,15 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %int.left_shift: init %i32 = call %LeftShift.ref(%.loc4_26.6, %.loc4_29.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_25.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_25.2: = bound_method %int.left_shift, %.loc4_25.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_25.3: = specific_function %.loc4_25.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_25.4: %i32 = value_of_initializer %int.left_shift [template = constants.%.34] -// CHECK:STDOUT: %.loc4_25.5: %i32 = converted %int.left_shift, %.loc4_25.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_25: init Core.IntLiteral = call %.loc4_25.3(%.loc4_25.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_25 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25.7: Core.IntLiteral = converted %int.left_shift, %.loc4_25.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_31: type = array_type %.loc4_25.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_30.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_30.2: = bound_method %int.left_shift, %.loc4_30.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_30.3: = specific_function %.loc4_30.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_30.4: %i32 = value_of_initializer %int.left_shift [template = constants.%.34] +// CHECK:STDOUT: %.loc4_30.5: %i32 = converted %int.left_shift, %.loc4_30.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_30: init Core.IntLiteral = call %.loc4_30.3(%.loc4_30.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_30.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_30.7: Core.IntLiteral = converted %int.left_shift, %.loc4_30.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_31: type = array_type %.loc4_30.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -533,9 +533,9 @@ let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDOUT: %int.convert_checked.loc40_31: init %i32 = call %.loc40_31.4(%.loc40_31.1) [template = constants.%.30] // CHECK:STDOUT: %.loc40_31.5: %i32 = value_of_initializer %int.convert_checked.loc40_31 [template = constants.%.30] // CHECK:STDOUT: %.loc40_31.6: %i32 = converted %.loc40_31.1, %.loc40_31.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc40_40.1: %i32 = value_of_initializer %int.snegate [template = constants.%.50] -// CHECK:STDOUT: %.loc40_40.2: %i32 = converted %int.snegate, %.loc40_40.1 [template = constants.%.50] -// CHECK:STDOUT: %int.left_shift.loc40: init %i32 = call %LeftShift.ref.loc40(%.loc40_31.6, %.loc40_40.2) [template = ] +// CHECK:STDOUT: %.loc40_42.1: %i32 = value_of_initializer %int.snegate [template = constants.%.50] +// CHECK:STDOUT: %.loc40_42.2: %i32 = converted %int.snegate, %.loc40_42.1 [template = constants.%.50] +// CHECK:STDOUT: %int.left_shift.loc40: init %i32 = call %LeftShift.ref.loc40(%.loc40_31.6, %.loc40_42.2) [template = ] // CHECK:STDOUT: %.loc40_44.1: %i32 = value_of_initializer %int.left_shift.loc40 [template = ] // CHECK:STDOUT: %.loc40_44.2: %i32 = converted %int.left_shift.loc40, %.loc40_44.1 [template = ] // CHECK:STDOUT: %negative: %i32 = bind_name negative, %.loc40_44.2 diff --git a/toolchain/check/testdata/builtins/int/less.carbon b/toolchain/check/testdata/builtins/int/less.carbon index 5c6a427345e69..9708c0d785b4e 100644 --- a/toolchain/check/testdata/builtins/int/less.carbon +++ b/toolchain/check/testdata/builtins/int/less.carbon @@ -306,15 +306,15 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_28.6: %i32 = converted %.loc12_28.1, %.loc12_28.5 [template = constants.%.33] // CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_28.6) [template = constants.%.43] // CHECK:STDOUT: %.loc12_32.1: Core.IntLiteral = int_value 0 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_27.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_27.2: %i32 = converted %int.snegate.loc12, %.loc12_27.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int.snegate.loc12, %.loc12_29.1 [template = constants.%.43] // CHECK:STDOUT: %.loc12_32.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_32.3: = bound_method %.loc12_32.1, %.loc12_32.2 [template = constants.%.40] // CHECK:STDOUT: %.loc12_32.4: = specific_function %.loc12_32.3, @Convert.2(constants.%.1) [template = constants.%.41] // CHECK:STDOUT: %int.convert_checked.loc12_32: init %i32 = call %.loc12_32.4(%.loc12_32.1) [template = constants.%.42] // CHECK:STDOUT: %.loc12_32.5: %i32 = value_of_initializer %int.convert_checked.loc12_32 [template = constants.%.42] // CHECK:STDOUT: %.loc12_32.6: %i32 = converted %.loc12_32.1, %.loc12_32.5 [template = constants.%.42] -// CHECK:STDOUT: %int.less.loc12: init bool = call %Less.ref.loc12(%.loc12_27.2, %.loc12_32.6) [template = constants.%.37] +// CHECK:STDOUT: %int.less.loc12: init bool = call %Less.ref.loc12(%.loc12_29.2, %.loc12_32.6) [template = constants.%.37] // CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less.loc12 [template = constants.%.37] // CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less.loc12, %.loc12_13.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 @@ -347,9 +347,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.convert_checked.loc13_22: init %i32 = call %.loc13_22.4(%.loc13_22.1) [template = constants.%.42] // CHECK:STDOUT: %.loc13_22.5: %i32 = value_of_initializer %int.convert_checked.loc13_22 [template = constants.%.42] // CHECK:STDOUT: %.loc13_22.6: %i32 = converted %.loc13_22.1, %.loc13_22.5 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_31.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_31.2: %i32 = converted %int.snegate.loc13, %.loc13_31.1 [template = constants.%.43] -// CHECK:STDOUT: %int.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22.6, %.loc13_31.2) [template = constants.%.38] +// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.43] +// CHECK:STDOUT: %int.less.loc13: init bool = call %Less.ref.loc13(%.loc13_22.6, %.loc13_33.2) [template = constants.%.38] // CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less.loc13 [template = constants.%.38] // CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less.loc13, %.loc13_14.1 [template = constants.%.38] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 diff --git a/toolchain/check/testdata/builtins/int/less_eq.carbon b/toolchain/check/testdata/builtins/int/less_eq.carbon index 37fa9ebc9105b..da25116e33ba0 100644 --- a/toolchain/check/testdata/builtins/int/less_eq.carbon +++ b/toolchain/check/testdata/builtins/int/less_eq.carbon @@ -306,15 +306,15 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %.loc12_30.6: %i32 = converted %.loc12_30.1, %.loc12_30.5 [template = constants.%.33] // CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_30.6) [template = constants.%.43] // CHECK:STDOUT: %.loc12_34.1: Core.IntLiteral = int_value 0 [template = constants.%.38] -// CHECK:STDOUT: %.loc12_29.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] -// CHECK:STDOUT: %.loc12_29.2: %i32 = converted %int.snegate.loc12, %.loc12_29.1 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_31.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.43] +// CHECK:STDOUT: %.loc12_31.2: %i32 = converted %int.snegate.loc12, %.loc12_31.1 [template = constants.%.43] // CHECK:STDOUT: %.loc12_34.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_34.3: = bound_method %.loc12_34.1, %.loc12_34.2 [template = constants.%.39] // CHECK:STDOUT: %.loc12_34.4: = specific_function %.loc12_34.3, @Convert.2(constants.%.1) [template = constants.%.40] // CHECK:STDOUT: %int.convert_checked.loc12_34: init %i32 = call %.loc12_34.4(%.loc12_34.1) [template = constants.%.41] // CHECK:STDOUT: %.loc12_34.5: %i32 = value_of_initializer %int.convert_checked.loc12_34 [template = constants.%.41] // CHECK:STDOUT: %.loc12_34.6: %i32 = converted %.loc12_34.1, %.loc12_34.5 [template = constants.%.41] -// CHECK:STDOUT: %int.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_29.2, %.loc12_34.6) [template = constants.%.37] +// CHECK:STDOUT: %int.less_eq.loc12: init bool = call %LessEq.ref.loc12(%.loc12_31.2, %.loc12_34.6) [template = constants.%.37] // CHECK:STDOUT: %.loc12_13.1: bool = value_of_initializer %int.less_eq.loc12 [template = constants.%.37] // CHECK:STDOUT: %.loc12_13.2: bool = converted %int.less_eq.loc12, %.loc12_13.1 [template = constants.%.37] // CHECK:STDOUT: if %.loc12_13.2 br !if.expr.then.loc12 else br !if.expr.else.loc12 @@ -347,9 +347,9 @@ fn RuntimeCall(a: i32, b: i32) -> bool { // CHECK:STDOUT: %int.convert_checked.loc13_24: init %i32 = call %.loc13_24.4(%.loc13_24.1) [template = constants.%.41] // CHECK:STDOUT: %.loc13_24.5: %i32 = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.41] // CHECK:STDOUT: %.loc13_24.6: %i32 = converted %.loc13_24.1, %.loc13_24.5 [template = constants.%.41] -// CHECK:STDOUT: %.loc13_33.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] -// CHECK:STDOUT: %.loc13_33.2: %i32 = converted %int.snegate.loc13, %.loc13_33.1 [template = constants.%.43] -// CHECK:STDOUT: %int.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24.6, %.loc13_33.2) [template = constants.%.42] +// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %int.snegate.loc13 [template = constants.%.43] +// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %int.snegate.loc13, %.loc13_35.1 [template = constants.%.43] +// CHECK:STDOUT: %int.less_eq.loc13: init bool = call %LessEq.ref.loc13(%.loc13_24.6, %.loc13_35.2) [template = constants.%.42] // CHECK:STDOUT: %.loc13_14.1: bool = value_of_initializer %int.less_eq.loc13 [template = constants.%.42] // CHECK:STDOUT: %.loc13_14.2: bool = converted %int.less_eq.loc13, %.loc13_14.1 [template = constants.%.42] // CHECK:STDOUT: if %.loc13_14.2 br !if.expr.then.loc13 else br !if.expr.else.loc13 diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index b64448deec1d1..ddaccd2a8ed84 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -60,7 +60,7 @@ import library "types"; // CHECK:STDERR: fail_zero_size.carbon:[[@LINE+4]]:8: error: integer type width of 0 is not positive [IntWidthNotPositive] // CHECK:STDERR: var n: Int(0); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~ // CHECK:STDERR: var n: Int(0); @@ -74,7 +74,7 @@ fn Negate(n: i32) -> i32 = "int.snegate"; // CHECK:STDERR: fail_negative_size.carbon:[[@LINE+4]]:8: error: integer type width of -1 is not positive [IntWidthNotPositive] // CHECK:STDERR: var n: Int(Negate(1)); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: var n: Int(Negate(1)); @@ -86,7 +86,7 @@ import library "types"; // CHECK:STDERR: fail_oversized.carbon:[[@LINE+3]]:8: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] // CHECK:STDERR: var m: Int(1000000000); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~ var m: Int(1000000000); // CHECK:STDOUT: --- types.carbon @@ -190,14 +190,14 @@ var m: Int(1000000000); // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc6_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc6_13: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_12: init type = call %Int.ref.loc6_9(%.loc6_13) [template = constants.%i64] -// CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_12 [template = constants.%i64] -// CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_12, %.loc6_15.1 [template = constants.%i64] +// CHECK:STDOUT: %int.make_type_signed.loc6_15: init type = call %Int.ref.loc6_9(%.loc6_13) [template = constants.%i64] +// CHECK:STDOUT: %.loc6_15.1: type = value_of_initializer %int.make_type_signed.loc6_15 [template = constants.%i64] +// CHECK:STDOUT: %.loc6_15.2: type = converted %int.make_type_signed.loc6_15, %.loc6_15.1 [template = constants.%i64] // CHECK:STDOUT: %Int.ref.loc6_21: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc6_25: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc6_24: init type = call %Int.ref.loc6_21(%.loc6_25) [template = constants.%i64] -// CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6_24 [template = constants.%i64] -// CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6_24, %.loc6_27.1 [template = constants.%i64] +// CHECK:STDOUT: %int.make_type_signed.loc6_27: init type = call %Int.ref.loc6_21(%.loc6_25) [template = constants.%i64] +// CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6_27 [template = constants.%i64] +// CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6_27, %.loc6_27.1 [template = constants.%i64] // CHECK:STDOUT: %n.param: %i64 = value_param runtime_param0 // CHECK:STDOUT: %n: %i64 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 @@ -211,14 +211,14 @@ var m: Int(1000000000); // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc10_9: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc10_13: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc10_12: init type = call %Int.ref.loc10_9(%.loc10_13) [template = constants.%i13] -// CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_12 [template = constants.%i13] -// CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_12, %.loc10_15.1 [template = constants.%i13] +// CHECK:STDOUT: %int.make_type_signed.loc10_15: init type = call %Int.ref.loc10_9(%.loc10_13) [template = constants.%i13] +// CHECK:STDOUT: %.loc10_15.1: type = value_of_initializer %int.make_type_signed.loc10_15 [template = constants.%i13] +// CHECK:STDOUT: %.loc10_15.2: type = converted %int.make_type_signed.loc10_15, %.loc10_15.1 [template = constants.%i13] // CHECK:STDOUT: %Int.ref.loc10_21: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc10_25: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc10_24: init type = call %Int.ref.loc10_21(%.loc10_25) [template = constants.%i13] -// CHECK:STDOUT: %.loc10_27.1: type = value_of_initializer %int.make_type_signed.loc10_24 [template = constants.%i13] -// CHECK:STDOUT: %.loc10_27.2: type = converted %int.make_type_signed.loc10_24, %.loc10_27.1 [template = constants.%i13] +// CHECK:STDOUT: %int.make_type_signed.loc10_27: init type = call %Int.ref.loc10_21(%.loc10_25) [template = constants.%i13] +// CHECK:STDOUT: %.loc10_27.1: type = value_of_initializer %int.make_type_signed.loc10_27 [template = constants.%i13] +// CHECK:STDOUT: %.loc10_27.2: type = converted %int.make_type_signed.loc10_27, %.loc10_27.1 [template = constants.%i13] // CHECK:STDOUT: %n.param: %i13 = value_param runtime_param0 // CHECK:STDOUT: %n: %i13 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i13 = out_param runtime_param1 @@ -238,14 +238,14 @@ var m: Int(1000000000); // 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_37: init type = call %Int.ref.loc14_34(%N.ref.loc14_38) [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc14_39.1: type = value_of_initializer %int.make_type_signed.loc14_37 [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc14_39.2: type = converted %int.make_type_signed.loc14_37, %.loc14_39.1 [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %int.make_type_signed.loc14_39: init type = call %Int.ref.loc14_34(%N.ref.loc14_38) [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %.loc14_39.1: type = value_of_initializer %int.make_type_signed.loc14_39 [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %.loc14_39.2: type = converted %int.make_type_signed.loc14_39, %.loc14_39.1 [symbolic = %iN (constants.%iN)] // 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_48: init type = call %Int.ref.loc14_45(%N.ref.loc14_49) [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc14_50.1: type = value_of_initializer %int.make_type_signed.loc14_48 [symbolic = %iN (constants.%iN)] -// CHECK:STDOUT: %.loc14_50.2: type = converted %int.make_type_signed.loc14_48, %.loc14_50.1 [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %int.make_type_signed.loc14_50: init type = call %Int.ref.loc14_45(%N.ref.loc14_49) [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %.loc14_50.1: type = value_of_initializer %int.make_type_signed.loc14_50 [symbolic = %iN (constants.%iN)] +// CHECK:STDOUT: %.loc14_50.2: type = converted %int.make_type_signed.loc14_50, %.loc14_50.1 [symbolic = %iN (constants.%iN)] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param // 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 (%iN) = value_param runtime_param0 @@ -354,14 +354,14 @@ var m: Int(1000000000); // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc7_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc7_16: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_15: init type = call %Int.ref.loc7_12(%.loc7_16) [template = constants.%i64] -// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_15 [template = constants.%i64] -// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_15, %.loc7_18.1 [template = constants.%i64] +// CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call %Int.ref.loc7_12(%.loc7_16) [template = constants.%i64] +// CHECK:STDOUT: %.loc7_18.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i64] +// CHECK:STDOUT: %.loc7_18.2: type = converted %int.make_type_signed.loc7_18, %.loc7_18.1 [template = constants.%i64] // CHECK:STDOUT: %Int.ref.loc7_24: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc7_28: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_signed.loc7_27: init type = call %Int.ref.loc7_24(%.loc7_28) [template = constants.%i64] -// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_27 [template = constants.%i64] -// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_27, %.loc7_30.1 [template = constants.%i64] +// CHECK:STDOUT: %int.make_type_signed.loc7_30: init type = call %Int.ref.loc7_24(%.loc7_28) [template = constants.%i64] +// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7_30 [template = constants.%i64] +// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7_30, %.loc7_30.1 [template = constants.%i64] // CHECK:STDOUT: %n.param: %i64 = value_param runtime_param0 // CHECK:STDOUT: %n: %i64 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i64 = out_param runtime_param1 @@ -375,14 +375,14 @@ var m: Int(1000000000); // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc11_12: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc11_16: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc11_15: init type = call %Int.ref.loc11_12(%.loc11_16) [template = constants.%i13] -// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_15 [template = constants.%i13] -// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_15, %.loc11_18.1 [template = constants.%i13] +// CHECK:STDOUT: %int.make_type_signed.loc11_18: init type = call %Int.ref.loc11_12(%.loc11_16) [template = constants.%i13] +// CHECK:STDOUT: %.loc11_18.1: type = value_of_initializer %int.make_type_signed.loc11_18 [template = constants.%i13] +// CHECK:STDOUT: %.loc11_18.2: type = converted %int.make_type_signed.loc11_18, %.loc11_18.1 [template = constants.%i13] // CHECK:STDOUT: %Int.ref.loc11_24: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc11_28: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_signed.loc11_27: init type = call %Int.ref.loc11_24(%.loc11_28) [template = constants.%i13] -// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %int.make_type_signed.loc11_27 [template = constants.%i13] -// CHECK:STDOUT: %.loc11_30.2: type = converted %int.make_type_signed.loc11_27, %.loc11_30.1 [template = constants.%i13] +// CHECK:STDOUT: %int.make_type_signed.loc11_30: init type = call %Int.ref.loc11_24(%.loc11_28) [template = constants.%i13] +// CHECK:STDOUT: %.loc11_30.1: type = value_of_initializer %int.make_type_signed.loc11_30 [template = constants.%i13] +// CHECK:STDOUT: %.loc11_30.2: type = converted %int.make_type_signed.loc11_30, %.loc11_30.1 [template = constants.%i13] // CHECK:STDOUT: %n.param: %i13 = value_param runtime_param0 // CHECK:STDOUT: %n: %i13 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i13 = out_param runtime_param1 @@ -396,14 +396,14 @@ var m: Int(1000000000); // CHECK:STDOUT: } { // CHECK:STDOUT: %Int.ref.loc15_19: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc15_23: Core.IntLiteral = int_value 24 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc15_22: init type = call %Int.ref.loc15_19(%.loc15_23) [template = constants.%i24] -// CHECK:STDOUT: %.loc15_25.1: type = value_of_initializer %int.make_type_signed.loc15_22 [template = constants.%i24] -// CHECK:STDOUT: %.loc15_25.2: type = converted %int.make_type_signed.loc15_22, %.loc15_25.1 [template = constants.%i24] +// CHECK:STDOUT: %int.make_type_signed.loc15_25: init type = call %Int.ref.loc15_19(%.loc15_23) [template = constants.%i24] +// CHECK:STDOUT: %.loc15_25.1: type = value_of_initializer %int.make_type_signed.loc15_25 [template = constants.%i24] +// CHECK:STDOUT: %.loc15_25.2: type = converted %int.make_type_signed.loc15_25, %.loc15_25.1 [template = constants.%i24] // CHECK:STDOUT: %Int.ref.loc15_31: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] // CHECK:STDOUT: %.loc15_35: Core.IntLiteral = int_value 24 [template = constants.%.3] -// CHECK:STDOUT: %int.make_type_signed.loc15_34: init type = call %Int.ref.loc15_31(%.loc15_35) [template = constants.%i24] -// CHECK:STDOUT: %.loc15_37.1: type = value_of_initializer %int.make_type_signed.loc15_34 [template = constants.%i24] -// CHECK:STDOUT: %.loc15_37.2: type = converted %int.make_type_signed.loc15_34, %.loc15_37.1 [template = constants.%i24] +// CHECK:STDOUT: %int.make_type_signed.loc15_37: init type = call %Int.ref.loc15_31(%.loc15_35) [template = constants.%i24] +// CHECK:STDOUT: %.loc15_37.1: type = value_of_initializer %int.make_type_signed.loc15_37 [template = constants.%i24] +// CHECK:STDOUT: %.loc15_37.2: type = converted %int.make_type_signed.loc15_37, %.loc15_37.1 [template = constants.%i24] // CHECK:STDOUT: %n.param: %i24 = value_param runtime_param0 // CHECK:STDOUT: %n: %i24 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %i24 = out_param runtime_param1 @@ -589,15 +589,15 @@ var m: Int(1000000000); // CHECK:STDOUT: %.loc12_19.5: %i32 = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%.29] // CHECK:STDOUT: %.loc12_19.6: %i32 = converted %.loc12_19.1, %.loc12_19.5 [template = constants.%.29] // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_19.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_18.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc12_18.2: = bound_method %int.snegate, %.loc12_18.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_18.3: = specific_function %.loc12_18.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_18.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] -// CHECK:STDOUT: %.loc12_18.5: %i32 = converted %int.snegate, %.loc12_18.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc12_18: init Core.IntLiteral = call %.loc12_18.3(%.loc12_18.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_18.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_18 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_18.7: Core.IntLiteral = converted %int.snegate, %.loc12_18.6 [template = constants.%.34] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_18.7) [template = ] +// CHECK:STDOUT: %.loc12_20.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc12_20.2: = bound_method %int.snegate, %.loc12_20.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_20.3: = specific_function %.loc12_20.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_20.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] +// CHECK:STDOUT: %.loc12_20.5: %i32 = converted %int.snegate, %.loc12_20.4 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc12_20: init Core.IntLiteral = call %.loc12_20.3(%.loc12_20.5) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_20.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_20.7: Core.IntLiteral = converted %int.snegate, %.loc12_20.6 [template = constants.%.34] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%.loc12_20.7) [template = ] // CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = ] // CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index 973beff8097e8..73754962da7b8 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -41,7 +41,7 @@ import library "types"; // CHECK:STDERR: fail_zero_size.carbon:[[@LINE+4]]:8: error: integer type width of 0 is not positive [IntWidthNotPositive] // CHECK:STDERR: var n: UInt(0); -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var n: UInt(0); @@ -55,7 +55,7 @@ fn Negate(n: i32) -> i32 = "int.snegate"; // CHECK:STDERR: fail_negative_size.carbon:[[@LINE+4]]:8: error: integer type width of -1 is not positive [IntWidthNotPositive] // CHECK:STDERR: var n: UInt(Negate(1)); -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: var n: UInt(Negate(1)); @@ -67,7 +67,7 @@ import library "types"; // CHECK:STDERR: fail_oversized.carbon:[[@LINE+3]]:8: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] // CHECK:STDERR: var m: UInt(1000000000); -// CHECK:STDERR: ^~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ var m: UInt(1000000000); // CHECK:STDOUT: --- types.carbon @@ -171,14 +171,14 @@ var m: UInt(1000000000); // CHECK:STDOUT: } { // CHECK:STDOUT: %UInt.ref.loc6_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %.loc6_14: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_13: init type = call %UInt.ref.loc6_9(%.loc6_14) [template = constants.%u64] -// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_13 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_13, %.loc6_16.1 [template = constants.%u64] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_16: init type = call %UInt.ref.loc6_9(%.loc6_14) [template = constants.%u64] +// CHECK:STDOUT: %.loc6_16.1: type = value_of_initializer %int.make_type_unsigned.loc6_16 [template = constants.%u64] +// CHECK:STDOUT: %.loc6_16.2: type = converted %int.make_type_unsigned.loc6_16, %.loc6_16.1 [template = constants.%u64] // CHECK:STDOUT: %UInt.ref.loc6_22: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %.loc6_27: Core.IntLiteral = int_value 64 [template = constants.%.1] -// CHECK:STDOUT: %int.make_type_unsigned.loc6_26: init type = call %UInt.ref.loc6_22(%.loc6_27) [template = constants.%u64] -// CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %int.make_type_unsigned.loc6_26 [template = constants.%u64] -// CHECK:STDOUT: %.loc6_29.2: type = converted %int.make_type_unsigned.loc6_26, %.loc6_29.1 [template = constants.%u64] +// CHECK:STDOUT: %int.make_type_unsigned.loc6_29: init type = call %UInt.ref.loc6_22(%.loc6_27) [template = constants.%u64] +// CHECK:STDOUT: %.loc6_29.1: type = value_of_initializer %int.make_type_unsigned.loc6_29 [template = constants.%u64] +// CHECK:STDOUT: %.loc6_29.2: type = converted %int.make_type_unsigned.loc6_29, %.loc6_29.1 [template = constants.%u64] // CHECK:STDOUT: %n.param: %u64 = value_param runtime_param0 // CHECK:STDOUT: %n: %u64 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %u64 = out_param runtime_param1 @@ -192,14 +192,14 @@ var m: UInt(1000000000); // CHECK:STDOUT: } { // CHECK:STDOUT: %UInt.ref.loc10_9: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %.loc10_14: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned.loc10_13: init type = call %UInt.ref.loc10_9(%.loc10_14) [template = constants.%u13] -// CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_13 [template = constants.%u13] -// CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_13, %.loc10_16.1 [template = constants.%u13] +// CHECK:STDOUT: %int.make_type_unsigned.loc10_16: init type = call %UInt.ref.loc10_9(%.loc10_14) [template = constants.%u13] +// CHECK:STDOUT: %.loc10_16.1: type = value_of_initializer %int.make_type_unsigned.loc10_16 [template = constants.%u13] +// CHECK:STDOUT: %.loc10_16.2: type = converted %int.make_type_unsigned.loc10_16, %.loc10_16.1 [template = constants.%u13] // CHECK:STDOUT: %UInt.ref.loc10_22: %UInt.type = name_ref UInt, imports.%import_ref.2 [template = constants.%UInt] // CHECK:STDOUT: %.loc10_27: Core.IntLiteral = int_value 13 [template = constants.%.2] -// CHECK:STDOUT: %int.make_type_unsigned.loc10_26: init type = call %UInt.ref.loc10_22(%.loc10_27) [template = constants.%u13] -// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_unsigned.loc10_26 [template = constants.%u13] -// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_unsigned.loc10_26, %.loc10_29.1 [template = constants.%u13] +// CHECK:STDOUT: %int.make_type_unsigned.loc10_29: init type = call %UInt.ref.loc10_22(%.loc10_27) [template = constants.%u13] +// CHECK:STDOUT: %.loc10_29.1: type = value_of_initializer %int.make_type_unsigned.loc10_29 [template = constants.%u13] +// CHECK:STDOUT: %.loc10_29.2: type = converted %int.make_type_unsigned.loc10_29, %.loc10_29.1 [template = constants.%u13] // CHECK:STDOUT: %n.param: %u13 = value_param runtime_param0 // CHECK:STDOUT: %n: %u13 = bind_name n, %n.param // CHECK:STDOUT: %return.param: ref %u13 = out_param runtime_param1 @@ -219,14 +219,14 @@ var m: UInt(1000000000); // 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_38: init type = call %UInt.ref.loc14_34(%N.ref.loc14_39) [symbolic = %uN (constants.%uN)] -// CHECK:STDOUT: %.loc14_40.1: type = value_of_initializer %int.make_type_unsigned.loc14_38 [symbolic = %uN (constants.%uN)] -// CHECK:STDOUT: %.loc14_40.2: type = converted %int.make_type_unsigned.loc14_38, %.loc14_40.1 [symbolic = %uN (constants.%uN)] +// CHECK:STDOUT: %int.make_type_unsigned.loc14_40: init type = call %UInt.ref.loc14_34(%N.ref.loc14_39) [symbolic = %uN (constants.%uN)] +// CHECK:STDOUT: %.loc14_40.1: type = value_of_initializer %int.make_type_unsigned.loc14_40 [symbolic = %uN (constants.%uN)] +// CHECK:STDOUT: %.loc14_40.2: type = converted %int.make_type_unsigned.loc14_40, %.loc14_40.1 [symbolic = %uN (constants.%uN)] // 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_50: init type = call %UInt.ref.loc14_46(%N.ref.loc14_51) [symbolic = %uN (constants.%uN)] -// CHECK:STDOUT: %.loc14_52.1: type = value_of_initializer %int.make_type_unsigned.loc14_50 [symbolic = %uN (constants.%uN)] -// CHECK:STDOUT: %.loc14_52.2: type = converted %int.make_type_unsigned.loc14_50, %.loc14_52.1 [symbolic = %uN (constants.%uN)] +// CHECK:STDOUT: %int.make_type_unsigned.loc14_52: init type = call %UInt.ref.loc14_46(%N.ref.loc14_51) [symbolic = %uN (constants.%uN)] +// CHECK:STDOUT: %.loc14_52.1: type = value_of_initializer %int.make_type_unsigned.loc14_52 [symbolic = %uN (constants.%uN)] +// CHECK:STDOUT: %.loc14_52.2: type = converted %int.make_type_unsigned.loc14_52, %.loc14_52.1 [symbolic = %uN (constants.%uN)] // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param // 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 (%uN) = value_param runtime_param0 @@ -388,15 +388,15 @@ var m: UInt(1000000000); // CHECK:STDOUT: %.loc12_20.5: %i32 = value_of_initializer %int.convert_checked.loc12_20 [template = constants.%.29] // CHECK:STDOUT: %.loc12_20.6: %i32 = converted %.loc12_20.1, %.loc12_20.5 [template = constants.%.29] // CHECK:STDOUT: %int.snegate: init %i32 = call %Negate.ref(%.loc12_20.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc12_19.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc12_19.2: = bound_method %int.snegate, %.loc12_19.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc12_19.3: = specific_function %.loc12_19.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc12_19.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] -// CHECK:STDOUT: %.loc12_19.5: %i32 = converted %int.snegate, %.loc12_19.4 [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc12_19: init Core.IntLiteral = call %.loc12_19.3(%.loc12_19.5) [template = constants.%.34] -// CHECK:STDOUT: %.loc12_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_19 [template = constants.%.34] -// CHECK:STDOUT: %.loc12_19.7: Core.IntLiteral = converted %int.snegate, %.loc12_19.6 [template = constants.%.34] -// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc12_19.7) [template = ] +// CHECK:STDOUT: %.loc12_21.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc12_21.2: = bound_method %int.snegate, %.loc12_21.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_21.3: = specific_function %.loc12_21.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc12_21.4: %i32 = value_of_initializer %int.snegate [template = constants.%.30] +// CHECK:STDOUT: %.loc12_21.5: %i32 = converted %int.snegate, %.loc12_21.4 [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc12_21: init Core.IntLiteral = call %.loc12_21.3(%.loc12_21.5) [template = constants.%.34] +// CHECK:STDOUT: %.loc12_21.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc12_21 [template = constants.%.34] +// CHECK:STDOUT: %.loc12_21.7: Core.IntLiteral = converted %int.snegate, %.loc12_21.6 [template = constants.%.34] +// CHECK:STDOUT: %int.make_type_unsigned: init type = call %UInt.ref(%.loc12_21.7) [template = ] // CHECK:STDOUT: %.loc12_22.1: type = value_of_initializer %int.make_type_unsigned [template = ] // CHECK:STDOUT: %.loc12_22.2: type = converted %int.make_type_unsigned, %.loc12_22.1 [template = ] // CHECK:STDOUT: %n.var: ref = var n diff --git a/toolchain/check/testdata/builtins/int/or.carbon b/toolchain/check/testdata/builtins/int/or.carbon index 1c368dd09c0f5..83bb6895e2b00 100644 --- a/toolchain/check/testdata/builtins/int/or.carbon +++ b/toolchain/check/testdata/builtins/int/or.carbon @@ -119,15 +119,15 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.or: init %i32 = call %Or.ref(%.loc4_19.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_18.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_18.2: = bound_method %int.or, %.loc4_18.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_18.3: = specific_function %.loc4_18.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_18.4: %i32 = value_of_initializer %int.or [template = constants.%.34] -// CHECK:STDOUT: %.loc4_18.5: %i32 = converted %int.or, %.loc4_18.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_18: init Core.IntLiteral = call %.loc4_18.3(%.loc4_18.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_18.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_18 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_18.7: Core.IntLiteral = converted %int.or, %.loc4_18.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_26: type = array_type %.loc4_18.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_25.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_25.2: = bound_method %int.or, %.loc4_25.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_25.3: = specific_function %.loc4_25.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_25.4: %i32 = value_of_initializer %int.or [template = constants.%.34] +// CHECK:STDOUT: %.loc4_25.5: %i32 = converted %int.or, %.loc4_25.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_25: init Core.IntLiteral = call %.loc4_25.3(%.loc4_25.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_25 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25.7: Core.IntLiteral = converted %int.or, %.loc4_25.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_26: type = array_type %.loc4_25.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index cc70e28a5e4cb..e22f10126ff12 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -49,19 +49,19 @@ fn Negate(a: i32) -> i32 = "int.snegate"; let size_1: i32 = RightShift(1, 31); // CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error: shift distance not in range [0, 32) in 1 >> 32 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let size_2: i32 = RightShift(1, 32); -// CHECK:STDERR: ^~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: let size_2: i32 = RightShift(1, 32); // CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error: shift distance not in range [0, 32) in 1 >> 33 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let size_3: i32 = RightShift(1, 33); -// CHECK:STDERR: ^~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: let size_3: i32 = RightShift(1, 33); // Negative shifts aren't allowed either. // CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+3]]:21: error: shift distance not in range [0, 32) in 1 >> -1 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let negative: i32 = RightShift(1, Negate(1)); -// CHECK:STDERR: ^~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: --- int_right_shift.carbon @@ -164,15 +164,15 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.right_shift: init %i32 = call %RightShift.ref(%.loc4_27.6, %.loc4_31.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_26.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_26.2: = bound_method %int.right_shift, %.loc4_26.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_26.3: = specific_function %.loc4_26.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_26.4: %i32 = value_of_initializer %int.right_shift [template = constants.%.34] -// CHECK:STDOUT: %.loc4_26.5: %i32 = converted %int.right_shift, %.loc4_26.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %.loc4_26.3(%.loc4_26.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_26.7: Core.IntLiteral = converted %int.right_shift, %.loc4_26.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_33: type = array_type %.loc4_26.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_32.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_32.2: = bound_method %int.right_shift, %.loc4_32.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_32.3: = specific_function %.loc4_32.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_32.4: %i32 = value_of_initializer %int.right_shift [template = constants.%.34] +// CHECK:STDOUT: %.loc4_32.5: %i32 = converted %int.right_shift, %.loc4_32.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_32: init Core.IntLiteral = call %.loc4_32.3(%.loc4_32.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_32.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_32 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_32.7: Core.IntLiteral = converted %int.right_shift, %.loc4_32.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_33: type = array_type %.loc4_32.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -356,31 +356,31 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.convert_checked.loc10_42: init %i32 = call %.loc10_42.4(%.loc10_42.1) [template = constants.%.29] // CHECK:STDOUT: %.loc10_42.5: %i32 = value_of_initializer %int.convert_checked.loc10_42 [template = constants.%.29] // CHECK:STDOUT: %.loc10_42.6: %i32 = converted %.loc10_42.1, %.loc10_42.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc10_41: init %i32 = call %Negate.ref.loc10_35(%.loc10_42.6) [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc10_43: init %i32 = call %Negate.ref.loc10_35(%.loc10_42.6) [template = constants.%.30] // CHECK:STDOUT: %.loc10_46.1: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_41.1: %i32 = value_of_initializer %int.snegate.loc10_41 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_41.2: %i32 = converted %int.snegate.loc10_41, %.loc10_41.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_43.1: %i32 = value_of_initializer %int.snegate.loc10_43 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_43.2: %i32 = converted %int.snegate.loc10_43, %.loc10_43.1 [template = constants.%.30] // CHECK:STDOUT: %.loc10_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc10_46.3: = bound_method %.loc10_46.1, %.loc10_46.2 [template = constants.%.27] // CHECK:STDOUT: %.loc10_46.4: = specific_function %.loc10_46.3, @Convert.2(constants.%.1) [template = constants.%.28] // CHECK:STDOUT: %int.convert_checked.loc10_46: init %i32 = call %.loc10_46.4(%.loc10_46.1) [template = constants.%.29] // CHECK:STDOUT: %.loc10_46.5: %i32 = value_of_initializer %int.convert_checked.loc10_46 [template = constants.%.29] // CHECK:STDOUT: %.loc10_46.6: %i32 = converted %.loc10_46.1, %.loc10_46.5 [template = constants.%.29] -// CHECK:STDOUT: %int.right_shift.loc10: init %i32 = call %RightShift.ref.loc10(%.loc10_41.2, %.loc10_46.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc10_34.1: %i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%.30] -// CHECK:STDOUT: %.loc10_34.2: %i32 = converted %int.right_shift.loc10, %.loc10_34.1 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc10_23: init %i32 = call %Negate.ref.loc10_17(%.loc10_34.2) [template = constants.%.29] +// CHECK:STDOUT: %int.right_shift.loc10: init %i32 = call %RightShift.ref.loc10(%.loc10_43.2, %.loc10_46.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc10_47.1: %i32 = value_of_initializer %int.right_shift.loc10 [template = constants.%.30] +// CHECK:STDOUT: %.loc10_47.2: %i32 = converted %int.right_shift.loc10, %.loc10_47.1 [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc10_48: init %i32 = call %Negate.ref.loc10_17(%.loc10_47.2) [template = constants.%.29] // CHECK:STDOUT: %.loc10_12.2: type = value_of_initializer %int.make_type_signed.loc10 [template = constants.%i32] // CHECK:STDOUT: %.loc10_12.3: type = converted %int.make_type_signed.loc10, %.loc10_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_23.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc10_23.2: = bound_method %int.snegate.loc10_23, %.loc10_23.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc10_23.3: = specific_function %.loc10_23.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc10_23.4: %i32 = value_of_initializer %int.snegate.loc10_23 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_23.5: %i32 = converted %int.snegate.loc10_23, %.loc10_23.4 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc10_23: init Core.IntLiteral = call %.loc10_23.3(%.loc10_23.5) [template = constants.%.2] -// CHECK:STDOUT: %.loc10_23.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_23 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_23.7: Core.IntLiteral = converted %int.snegate.loc10_23, %.loc10_23.6 [template = constants.%.2] -// CHECK:STDOUT: %.loc10_49: type = array_type %.loc10_23.7, %i32 [template = constants.%.34] +// CHECK:STDOUT: %.loc10_48.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc10_48.2: = bound_method %int.snegate.loc10_48, %.loc10_48.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc10_48.3: = specific_function %.loc10_48.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc10_48.4: %i32 = value_of_initializer %int.snegate.loc10_48 [template = constants.%.29] +// CHECK:STDOUT: %.loc10_48.5: %i32 = converted %int.snegate.loc10_48, %.loc10_48.4 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc10_48: init Core.IntLiteral = call %.loc10_48.3(%.loc10_48.5) [template = constants.%.2] +// CHECK:STDOUT: %.loc10_48.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc10_48 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_48.7: Core.IntLiteral = converted %int.snegate.loc10_48, %.loc10_48.6 [template = constants.%.2] +// CHECK:STDOUT: %.loc10_49: type = array_type %.loc10_48.7, %i32 [template = constants.%.34] // CHECK:STDOUT: %arr1.var: ref %.34 = var arr1 // CHECK:STDOUT: %arr1: ref %.34 = bind_name arr1, %arr1.var // CHECK:STDOUT: %.loc11_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -402,31 +402,31 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.convert_checked.loc14_42: init %i32 = call %.loc14_42.4(%.loc14_42.1) [template = constants.%.39] // CHECK:STDOUT: %.loc14_42.5: %i32 = value_of_initializer %int.convert_checked.loc14_42 [template = constants.%.39] // CHECK:STDOUT: %.loc14_42.6: %i32 = converted %.loc14_42.1, %.loc14_42.5 [template = constants.%.39] -// CHECK:STDOUT: %int.snegate.loc14_41: init %i32 = call %Negate.ref.loc14_35(%.loc14_42.6) [template = constants.%.40] +// CHECK:STDOUT: %int.snegate.loc14_44: init %i32 = call %Negate.ref.loc14_35(%.loc14_42.6) [template = constants.%.40] // CHECK:STDOUT: %.loc14_47.1: Core.IntLiteral = int_value 2 [template = constants.%.41] -// CHECK:STDOUT: %.loc14_41.1: %i32 = value_of_initializer %int.snegate.loc14_41 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_41.2: %i32 = converted %int.snegate.loc14_41, %.loc14_41.1 [template = constants.%.40] +// CHECK:STDOUT: %.loc14_44.1: %i32 = value_of_initializer %int.snegate.loc14_44 [template = constants.%.40] +// CHECK:STDOUT: %.loc14_44.2: %i32 = converted %int.snegate.loc14_44, %.loc14_44.1 [template = constants.%.40] // CHECK:STDOUT: %.loc14_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc14_47.3: = bound_method %.loc14_47.1, %.loc14_47.2 [template = constants.%.42] // CHECK:STDOUT: %.loc14_47.4: = specific_function %.loc14_47.3, @Convert.2(constants.%.1) [template = constants.%.43] // CHECK:STDOUT: %int.convert_checked.loc14_47: init %i32 = call %.loc14_47.4(%.loc14_47.1) [template = constants.%.44] // CHECK:STDOUT: %.loc14_47.5: %i32 = value_of_initializer %int.convert_checked.loc14_47 [template = constants.%.44] // CHECK:STDOUT: %.loc14_47.6: %i32 = converted %.loc14_47.1, %.loc14_47.5 [template = constants.%.44] -// CHECK:STDOUT: %int.right_shift.loc14: init %i32 = call %RightShift.ref.loc14(%.loc14_41.2, %.loc14_47.6) [template = constants.%.45] -// CHECK:STDOUT: %.loc14_34.1: %i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%.45] -// CHECK:STDOUT: %.loc14_34.2: %i32 = converted %int.right_shift.loc14, %.loc14_34.1 [template = constants.%.45] -// CHECK:STDOUT: %int.snegate.loc14_23: init %i32 = call %Negate.ref.loc14_17(%.loc14_34.2) [template = constants.%.46] +// CHECK:STDOUT: %int.right_shift.loc14: init %i32 = call %RightShift.ref.loc14(%.loc14_44.2, %.loc14_47.6) [template = constants.%.45] +// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.right_shift.loc14 [template = constants.%.45] +// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.right_shift.loc14, %.loc14_48.1 [template = constants.%.45] +// CHECK:STDOUT: %int.snegate.loc14_49: init %i32 = call %Negate.ref.loc14_17(%.loc14_48.2) [template = constants.%.46] // CHECK:STDOUT: %.loc14_12.2: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] // CHECK:STDOUT: %.loc14_12.3: type = converted %int.make_type_signed.loc14, %.loc14_12.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_23.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc14_23.2: = bound_method %int.snegate.loc14_23, %.loc14_23.1 [template = constants.%.47] -// CHECK:STDOUT: %.loc14_23.3: = specific_function %.loc14_23.2, @Convert.4(constants.%.1) [template = constants.%.48] -// CHECK:STDOUT: %.loc14_23.4: %i32 = value_of_initializer %int.snegate.loc14_23 [template = constants.%.46] -// CHECK:STDOUT: %.loc14_23.5: %i32 = converted %int.snegate.loc14_23, %.loc14_23.4 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc14_23: init Core.IntLiteral = call %.loc14_23.3(%.loc14_23.5) [template = constants.%.49] -// CHECK:STDOUT: %.loc14_23.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_23 [template = constants.%.49] -// CHECK:STDOUT: %.loc14_23.7: Core.IntLiteral = converted %int.snegate.loc14_23, %.loc14_23.6 [template = constants.%.49] -// CHECK:STDOUT: %.loc14_50: type = array_type %.loc14_23.7, %i32 [template = constants.%.50] +// CHECK:STDOUT: %.loc14_49.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc14_49.2: = bound_method %int.snegate.loc14_49, %.loc14_49.1 [template = constants.%.47] +// CHECK:STDOUT: %.loc14_49.3: = specific_function %.loc14_49.2, @Convert.4(constants.%.1) [template = constants.%.48] +// CHECK:STDOUT: %.loc14_49.4: %i32 = value_of_initializer %int.snegate.loc14_49 [template = constants.%.46] +// CHECK:STDOUT: %.loc14_49.5: %i32 = converted %int.snegate.loc14_49, %.loc14_49.4 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc14_49: init Core.IntLiteral = call %.loc14_49.3(%.loc14_49.5) [template = constants.%.49] +// CHECK:STDOUT: %.loc14_49.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc14_49 [template = constants.%.49] +// CHECK:STDOUT: %.loc14_49.7: Core.IntLiteral = converted %int.snegate.loc14_49, %.loc14_49.6 [template = constants.%.49] +// CHECK:STDOUT: %.loc14_50: type = array_type %.loc14_49.7, %i32 [template = constants.%.50] // CHECK:STDOUT: %arr2.var: ref %.50 = var arr2 // CHECK:STDOUT: %arr2: ref %.50 = bind_name arr2, %arr2.var // CHECK:STDOUT: %.loc15_14.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -651,9 +651,9 @@ let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDOUT: %int.convert_checked.loc24_32: init %i32 = call %.loc24_32.4(%.loc24_32.1) [template = constants.%.30] // CHECK:STDOUT: %.loc24_32.5: %i32 = value_of_initializer %int.convert_checked.loc24_32 [template = constants.%.30] // CHECK:STDOUT: %.loc24_32.6: %i32 = converted %.loc24_32.1, %.loc24_32.5 [template = constants.%.30] -// CHECK:STDOUT: %.loc24_41.1: %i32 = value_of_initializer %int.snegate [template = constants.%.42] -// CHECK:STDOUT: %.loc24_41.2: %i32 = converted %int.snegate, %.loc24_41.1 [template = constants.%.42] -// CHECK:STDOUT: %int.right_shift.loc24: init %i32 = call %RightShift.ref.loc24(%.loc24_32.6, %.loc24_41.2) [template = ] +// CHECK:STDOUT: %.loc24_43.1: %i32 = value_of_initializer %int.snegate [template = constants.%.42] +// CHECK:STDOUT: %.loc24_43.2: %i32 = converted %int.snegate, %.loc24_43.1 [template = constants.%.42] +// CHECK:STDOUT: %int.right_shift.loc24: init %i32 = call %RightShift.ref.loc24(%.loc24_32.6, %.loc24_43.2) [template = ] // CHECK:STDOUT: %.loc24_45.1: %i32 = value_of_initializer %int.right_shift.loc24 [template = ] // CHECK:STDOUT: %.loc24_45.2: %i32 = converted %int.right_shift.loc24, %.loc24_45.1 [template = ] // CHECK:STDOUT: %negative: %i32 = bind_name negative, %.loc24_45.2 diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index 268f1c1a8ace9..f8bec4b2e0c8e 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -42,23 +42,23 @@ fn JustRight(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_few: [i32; TooFew(1)]; -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: var too_few: [i32; TooFew(1)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_many: [i32; TooMany(1, 2, 3)]; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: var too_many: [i32; TooMany(1, 2, 3)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1, 2)]; -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1, 2)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2, 3)]; -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn JustRight(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -86,7 +86,7 @@ fn Add(a: i32, b: i32) -> i32 = "int.sadd"; let a: i32 = Add(0x7FFFFFFF, 0); // CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in calculation 2147483647 + 1 [CompileTimeIntegerOverflow] // CHECK:STDERR: let b: i32 = Add(0x7FFFFFFF, 1); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: --- int_add.carbon @@ -189,15 +189,15 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.sadd, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.sadd, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.sadd, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.sadd, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.sadd, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.sadd, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index a5222a1cdf70d..11226caf2d874 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -36,7 +36,7 @@ let b: i32 = Div(Sub(Negate(0x7FFF_FFFF), 1), 1); // -0x8000_0000 / -1 overflows. // CHECK:STDERR: fail_overflow.carbon:[[@LINE+4]]:14: error: integer overflow in calculation -2147483648 / -1 [CompileTimeIntegerOverflow] // CHECK:STDERR: let c: i32 = Div(Sub(Negate(0x7FFF_FFFF), 1), Negate(1)); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let c: i32 = Div(Sub(Negate(0x7FFF_FFFF), 1), Negate(1)); @@ -48,13 +48,13 @@ fn Div(a: i32, b: i32) -> i32 = "int.sdiv"; // CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let a: i32 = Div(1, 0); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: let a: i32 = Div(1, 0); // CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let b: i32 = Div(0, 0); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- int_div.carbon @@ -157,15 +157,15 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.sdiv: init %i32 = call %Div.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.sdiv, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.sdiv [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.sdiv, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.sdiv, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.sdiv, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.sdiv [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.sdiv, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.sdiv, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -379,7 +379,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] // CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] // CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] // CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] @@ -388,12 +388,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] // CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] // CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] -// CHECK:STDOUT: %int.snegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.35] -// CHECK:STDOUT: %int.sdiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.snegate.loc9_36 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.snegate.loc9_36, %.loc9_36.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.snegate.loc9_47 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.snegate.loc9_47, %.loc9_47.1 [template = constants.%.35] +// CHECK:STDOUT: %int.sdiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%.29] // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.sdiv.loc9 [template = constants.%.29] // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.sdiv.loc9, %.loc9_49.1 [template = constants.%.29] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 @@ -409,25 +409,25 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] // CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] // CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.snegate.loc12, %.loc12_40.1 [template = constants.%.30] // CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] // CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] // CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] // CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.36] +// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.6) [template = constants.%.36] // CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.ssub.loc12, %.loc12_44.1 [template = constants.%.36] // CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] // CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] // CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] // CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] -// CHECK:STDOUT: %int.sdiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.36] +// CHECK:STDOUT: %int.sdiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_44.2, %.loc12_47.6) [template = constants.%.36] // CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.sdiv.loc12 [template = constants.%.36] // CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.sdiv.loc12, %.loc12_49.1 [template = constants.%.36] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 @@ -441,17 +441,17 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.convert_checked.loc19_29: init %i32 = call %.loc19_29.4(%.loc19_29.1) [template = constants.%.29] // CHECK:STDOUT: %.loc19_29.5: %i32 = value_of_initializer %int.convert_checked.loc19_29 [template = constants.%.29] // CHECK:STDOUT: %.loc19_29.6: %i32 = converted %.loc19_29.1, %.loc19_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc19_28: init %i32 = call %Negate.ref.loc19_22(%.loc19_29.6) [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc19_40: init %i32 = call %Negate.ref.loc19_22(%.loc19_29.6) [template = constants.%.30] // CHECK:STDOUT: %.loc19_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc19_28.1: %i32 = value_of_initializer %int.snegate.loc19_28 [template = constants.%.30] -// CHECK:STDOUT: %.loc19_28.2: %i32 = converted %int.snegate.loc19_28, %.loc19_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc19_40.1: %i32 = value_of_initializer %int.snegate.loc19_40 [template = constants.%.30] +// CHECK:STDOUT: %.loc19_40.2: %i32 = converted %int.snegate.loc19_40, %.loc19_40.1 [template = constants.%.30] // CHECK:STDOUT: %.loc19_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc19_43.3: = bound_method %.loc19_43.1, %.loc19_43.2 [template = constants.%.32] // CHECK:STDOUT: %.loc19_43.4: = specific_function %.loc19_43.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc19_43: init %i32 = call %.loc19_43.4(%.loc19_43.1) [template = constants.%.34] // CHECK:STDOUT: %.loc19_43.5: %i32 = value_of_initializer %int.convert_checked.loc19_43 [template = constants.%.34] // CHECK:STDOUT: %.loc19_43.6: %i32 = converted %.loc19_43.1, %.loc19_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub.loc19: init %i32 = call %Sub.ref.loc19(%.loc19_28.2, %.loc19_43.6) [template = constants.%.36] +// CHECK:STDOUT: %int.ssub.loc19: init %i32 = call %Sub.ref.loc19(%.loc19_40.2, %.loc19_43.6) [template = constants.%.36] // CHECK:STDOUT: %Negate.ref.loc19_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc19_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] // CHECK:STDOUT: %.loc19_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] @@ -460,12 +460,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.convert_checked.loc19_54: init %i32 = call %.loc19_54.4(%.loc19_54.1) [template = constants.%.34] // CHECK:STDOUT: %.loc19_54.5: %i32 = value_of_initializer %int.convert_checked.loc19_54 [template = constants.%.34] // CHECK:STDOUT: %.loc19_54.6: %i32 = converted %.loc19_54.1, %.loc19_54.5 [template = constants.%.34] -// CHECK:STDOUT: %int.snegate.loc19_53: init %i32 = call %Negate.ref.loc19_47(%.loc19_54.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc19_21.1: %i32 = value_of_initializer %int.ssub.loc19 [template = constants.%.36] -// CHECK:STDOUT: %.loc19_21.2: %i32 = converted %int.ssub.loc19, %.loc19_21.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc19_53.1: %i32 = value_of_initializer %int.snegate.loc19_53 [template = constants.%.35] -// CHECK:STDOUT: %.loc19_53.2: %i32 = converted %int.snegate.loc19_53, %.loc19_53.1 [template = constants.%.35] -// CHECK:STDOUT: %int.sdiv.loc19: init %i32 = call %Div.ref.loc19(%.loc19_21.2, %.loc19_53.2) [template = constants.%.36] +// CHECK:STDOUT: %int.snegate.loc19_55: init %i32 = call %Negate.ref.loc19_47(%.loc19_54.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc19_44.1: %i32 = value_of_initializer %int.ssub.loc19 [template = constants.%.36] +// CHECK:STDOUT: %.loc19_44.2: %i32 = converted %int.ssub.loc19, %.loc19_44.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc19_55.1: %i32 = value_of_initializer %int.snegate.loc19_55 [template = constants.%.35] +// CHECK:STDOUT: %.loc19_55.2: %i32 = converted %int.snegate.loc19_55, %.loc19_55.1 [template = constants.%.35] +// CHECK:STDOUT: %int.sdiv.loc19: init %i32 = call %Div.ref.loc19(%.loc19_44.2, %.loc19_55.2) [template = constants.%.36] // CHECK:STDOUT: %.loc19_57.1: %i32 = value_of_initializer %int.sdiv.loc19 [template = constants.%.36] // CHECK:STDOUT: %.loc19_57.2: %i32 = converted %int.sdiv.loc19, %.loc19_57.1 [template = constants.%.36] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc19_57.2 diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 3da6e6a24af16..7d0bd6de2de4e 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -37,7 +37,7 @@ let b: i32 = Mod(Sub(Negate(0x7FFF_FFFF), 1), 1); // its result is representable. // CHECK:STDERR: fail_overflow.carbon:[[@LINE+4]]:14: error: integer overflow in calculation -2147483648 % -1 [CompileTimeIntegerOverflow] // CHECK:STDERR: let c: i32 = Mod(Sub(Negate(0x7FFF_FFFF), 1), Negate(1)); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let c: i32 = Mod(Sub(Negate(0x7FFF_FFFF), 1), Negate(1)); @@ -51,13 +51,13 @@ fn Mod(a: i32, b: i32) -> i32 = "int.smod"; // CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let a: i32 = Mod(1, 0); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: let a: i32 = Mod(1, 0); // CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let b: i32 = Mod(0, 0); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- int_div.carbon @@ -160,15 +160,15 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.smod: init %i32 = call %Mod.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.smod, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.smod [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.smod, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.smod, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.smod, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.smod [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.smod, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.smod, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -383,7 +383,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] // CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] // CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] // CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] @@ -392,12 +392,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] // CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] // CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] -// CHECK:STDOUT: %int.snegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.snegate.loc9_24 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.snegate.loc9_24, %.loc9_24.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.snegate.loc9_45 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.snegate.loc9_45, %.loc9_45.1 [template = constants.%.35] -// CHECK:STDOUT: %int.smod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.36] +// CHECK:STDOUT: %int.snegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.snegate.loc9_36 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.snegate.loc9_36, %.loc9_36.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.snegate.loc9_47 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.snegate.loc9_47, %.loc9_47.1 [template = constants.%.35] +// CHECK:STDOUT: %int.smod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%.36] // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.smod.loc9 [template = constants.%.36] // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.smod.loc9, %.loc9_49.1 [template = constants.%.36] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 @@ -413,25 +413,25 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] // CHECK:STDOUT: %int.snegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] // CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.snegate.loc12, %.loc12_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.snegate.loc12 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.snegate.loc12, %.loc12_40.1 [template = constants.%.30] // CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] // CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] // CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] // CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.37] +// CHECK:STDOUT: %int.ssub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.6) [template = constants.%.37] // CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.ssub.loc12, %.loc12_21.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.ssub.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.ssub.loc12, %.loc12_44.1 [template = constants.%.37] // CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] // CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] // CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] // CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] -// CHECK:STDOUT: %int.smod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.36] +// CHECK:STDOUT: %int.smod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_44.2, %.loc12_47.6) [template = constants.%.36] // CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.smod.loc12 [template = constants.%.36] // CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.smod.loc12, %.loc12_49.1 [template = constants.%.36] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 @@ -445,17 +445,17 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.convert_checked.loc20_29: init %i32 = call %.loc20_29.4(%.loc20_29.1) [template = constants.%.29] // CHECK:STDOUT: %.loc20_29.5: %i32 = value_of_initializer %int.convert_checked.loc20_29 [template = constants.%.29] // CHECK:STDOUT: %.loc20_29.6: %i32 = converted %.loc20_29.1, %.loc20_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc20_28: init %i32 = call %Negate.ref.loc20_22(%.loc20_29.6) [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc20_40: init %i32 = call %Negate.ref.loc20_22(%.loc20_29.6) [template = constants.%.30] // CHECK:STDOUT: %.loc20_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc20_28.1: %i32 = value_of_initializer %int.snegate.loc20_28 [template = constants.%.30] -// CHECK:STDOUT: %.loc20_28.2: %i32 = converted %int.snegate.loc20_28, %.loc20_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc20_40.1: %i32 = value_of_initializer %int.snegate.loc20_40 [template = constants.%.30] +// CHECK:STDOUT: %.loc20_40.2: %i32 = converted %int.snegate.loc20_40, %.loc20_40.1 [template = constants.%.30] // CHECK:STDOUT: %.loc20_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc20_43.3: = bound_method %.loc20_43.1, %.loc20_43.2 [template = constants.%.32] // CHECK:STDOUT: %.loc20_43.4: = specific_function %.loc20_43.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc20_43: init %i32 = call %.loc20_43.4(%.loc20_43.1) [template = constants.%.34] // CHECK:STDOUT: %.loc20_43.5: %i32 = value_of_initializer %int.convert_checked.loc20_43 [template = constants.%.34] // CHECK:STDOUT: %.loc20_43.6: %i32 = converted %.loc20_43.1, %.loc20_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub.loc20: init %i32 = call %Sub.ref.loc20(%.loc20_28.2, %.loc20_43.6) [template = constants.%.37] +// CHECK:STDOUT: %int.ssub.loc20: init %i32 = call %Sub.ref.loc20(%.loc20_40.2, %.loc20_43.6) [template = constants.%.37] // CHECK:STDOUT: %Negate.ref.loc20_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc20_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] // CHECK:STDOUT: %.loc20_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] @@ -464,12 +464,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.convert_checked.loc20_54: init %i32 = call %.loc20_54.4(%.loc20_54.1) [template = constants.%.34] // CHECK:STDOUT: %.loc20_54.5: %i32 = value_of_initializer %int.convert_checked.loc20_54 [template = constants.%.34] // CHECK:STDOUT: %.loc20_54.6: %i32 = converted %.loc20_54.1, %.loc20_54.5 [template = constants.%.34] -// CHECK:STDOUT: %int.snegate.loc20_53: init %i32 = call %Negate.ref.loc20_47(%.loc20_54.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc20_21.1: %i32 = value_of_initializer %int.ssub.loc20 [template = constants.%.37] -// CHECK:STDOUT: %.loc20_21.2: %i32 = converted %int.ssub.loc20, %.loc20_21.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc20_53.1: %i32 = value_of_initializer %int.snegate.loc20_53 [template = constants.%.35] -// CHECK:STDOUT: %.loc20_53.2: %i32 = converted %int.snegate.loc20_53, %.loc20_53.1 [template = constants.%.35] -// CHECK:STDOUT: %int.smod.loc20: init %i32 = call %Mod.ref.loc20(%.loc20_21.2, %.loc20_53.2) [template = constants.%.36] +// CHECK:STDOUT: %int.snegate.loc20_55: init %i32 = call %Negate.ref.loc20_47(%.loc20_54.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc20_44.1: %i32 = value_of_initializer %int.ssub.loc20 [template = constants.%.37] +// CHECK:STDOUT: %.loc20_44.2: %i32 = converted %int.ssub.loc20, %.loc20_44.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc20_55.1: %i32 = value_of_initializer %int.snegate.loc20_55 [template = constants.%.35] +// CHECK:STDOUT: %.loc20_55.2: %i32 = converted %int.snegate.loc20_55, %.loc20_55.1 [template = constants.%.35] +// CHECK:STDOUT: %int.smod.loc20: init %i32 = call %Mod.ref.loc20(%.loc20_44.2, %.loc20_55.2) [template = constants.%.36] // CHECK:STDOUT: %.loc20_57.1: %i32 = value_of_initializer %int.smod.loc20 [template = constants.%.36] // CHECK:STDOUT: %.loc20_57.2: %i32 = converted %int.smod.loc20, %.loc20_57.1 [template = constants.%.36] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc20_57.2 diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index bf2985d37fd1e..9667ab2beef8d 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -28,7 +28,7 @@ fn Mul(a: i32, b: i32) -> i32 = "int.smul"; let a: i32 = Mul(0x7FFF, 0x10000); // CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in calculation 32768 * 65536 [CompileTimeIntegerOverflow] // CHECK:STDERR: let b: i32 = Mul(0x8000, 0x10000); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: --- int_mul.carbon @@ -131,15 +131,15 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %int.smul: init %i32 = call %Mul.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.smul, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.smul [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.smul, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.smul, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.smul, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.smul [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.smul, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.smul, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index 521b2fc3e6d2d..43b07646572b0 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -44,23 +44,23 @@ fn JustRight(a: i32) -> i32 = "int.snegate"; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_few: [i32; TooFew()]; -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: var too_few: [i32; TooFew()]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_many: [i32; TooMany(1, 2)]; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: var too_many: [i32; TooMany(1, 2)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1)]; -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)]; -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn JustRight(a: i32) -> i32 = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -70,7 +70,7 @@ var bad_call: [i32; JustRight(1, 2)]; fn RuntimeCallTooFew(a: i32) -> i32 { // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooFew(a); - // CHECK:STDERR: ^~~~~~~ + // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooFew() -> i32 = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ @@ -81,7 +81,7 @@ fn RuntimeCallTooFew(a: i32) -> i32 { fn RuntimeCallTooMany(a: i32, b: i32, c: i32) -> i32 { // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooMany(a, b, c); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooMany(a: i32, b: i32) -> i32 = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -92,7 +92,7 @@ fn RuntimeCallTooMany(a: i32, b: i32, c: i32) -> i32 { fn RuntimeCallBadReturnType(a: i32, b: i32) -> bool { // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: return BadReturnType(a, b); - // CHECK:STDERR: ^~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn BadReturnType(a: i32) -> bool = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -113,7 +113,7 @@ let a: i32 = Negate(Negate(0x7FFFFFFF)); // -(-INT_MAX - 1) is too large for i32. // CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in negation of -2147483648 [CompileTimeIntegerNegateOverflow] // CHECK:STDERR: let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: --- int_negate.carbon @@ -200,21 +200,21 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %.loc4_30.4(%.loc4_30.1) [template = constants.%.29] // CHECK:STDOUT: %.loc4_30.5: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.29] // CHECK:STDOUT: %.loc4_30.6: %i32 = converted %.loc4_30.1, %.loc4_30.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc4_29: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_29.1: %i32 = value_of_initializer %int.snegate.loc4_29 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_29.2: %i32 = converted %int.snegate.loc4_29, %.loc4_29.1 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc4_22: init %i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc4_33: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.snegate.loc4_33 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.snegate.loc4_33, %.loc4_33.1 [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%.29] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_22.2: = bound_method %int.snegate.loc4_22, %.loc4_22.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_22.3: = specific_function %.loc4_22.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_22.4: %i32 = value_of_initializer %int.snegate.loc4_22 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_22.5: %i32 = converted %int.snegate.loc4_22, %.loc4_22.4 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_22: init Core.IntLiteral = call %.loc4_22.3(%.loc4_22.5) [template = constants.%.2] -// CHECK:STDOUT: %.loc4_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_22 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_22.7: Core.IntLiteral = converted %int.snegate.loc4_22, %.loc4_22.6 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_22.7, %i32 [template = constants.%.34] +// CHECK:STDOUT: %.loc4_34.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_34.2: = bound_method %int.snegate.loc4_34, %.loc4_34.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc4_34.3: = specific_function %.loc4_34.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_34.4: %i32 = value_of_initializer %int.snegate.loc4_34 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_34.5: %i32 = converted %int.snegate.loc4_34, %.loc4_34.4 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %.loc4_34.3(%.loc4_34.5) [template = constants.%.2] +// CHECK:STDOUT: %.loc4_34.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_34 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_34.7: Core.IntLiteral = converted %int.snegate.loc4_34, %.loc4_34.6 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_34.7, %i32 [template = constants.%.34] // CHECK:STDOUT: %arr.var: ref %.34 = var arr // CHECK:STDOUT: %arr: ref %.34 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -712,12 +712,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_28.4(%.loc8_28.1) [template = constants.%.29] // CHECK:STDOUT: %.loc8_28.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] // CHECK:STDOUT: %.loc8_28.6: %i32 = converted %.loc8_28.1, %.loc8_28.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc8_27: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.snegate.loc8_27 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int.snegate.loc8_27, %.loc8_27.1 [template = constants.%.30] -// CHECK:STDOUT: %int.snegate.loc8_20: init %i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.snegate.loc8_20 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.snegate.loc8_20, %.loc8_40.1 [template = constants.%.29] +// CHECK:STDOUT: %int.snegate.loc8_38: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc8_38.1: %i32 = value_of_initializer %int.snegate.loc8_38 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_38.2: %i32 = converted %int.snegate.loc8_38, %.loc8_38.1 [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc8_39: init %i32 = call %Negate.ref.loc8_14(%.loc8_38.2) [template = constants.%.29] +// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.snegate.loc8_39 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.snegate.loc8_39, %.loc8_40.1 [template = constants.%.29] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc8_40.2 // CHECK:STDOUT: %Negate.ref.loc14_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] @@ -729,22 +729,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.convert_checked.loc14_32: init %i32 = call %.loc14_32.4(%.loc14_32.1) [template = constants.%.29] // CHECK:STDOUT: %.loc14_32.5: %i32 = value_of_initializer %int.convert_checked.loc14_32 [template = constants.%.29] // CHECK:STDOUT: %.loc14_32.6: %i32 = converted %.loc14_32.1, %.loc14_32.5 [template = constants.%.29] -// CHECK:STDOUT: %int.snegate.loc14_31: init %i32 = call %Negate.ref.loc14_25(%.loc14_32.6) [template = constants.%.30] +// CHECK:STDOUT: %int.snegate.loc14_42: init %i32 = call %Negate.ref.loc14_25(%.loc14_32.6) [template = constants.%.30] // CHECK:STDOUT: %.loc14_45.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc14_31.1: %i32 = value_of_initializer %int.snegate.loc14_31 [template = constants.%.30] -// CHECK:STDOUT: %.loc14_31.2: %i32 = converted %int.snegate.loc14_31, %.loc14_31.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_42.1: %i32 = value_of_initializer %int.snegate.loc14_42 [template = constants.%.30] +// CHECK:STDOUT: %.loc14_42.2: %i32 = converted %int.snegate.loc14_42, %.loc14_42.1 [template = constants.%.30] // CHECK:STDOUT: %.loc14_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc14_45.3: = bound_method %.loc14_45.1, %.loc14_45.2 [template = constants.%.32] // CHECK:STDOUT: %.loc14_45.4: = specific_function %.loc14_45.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc14_45: init %i32 = call %.loc14_45.4(%.loc14_45.1) [template = constants.%.34] // CHECK:STDOUT: %.loc14_45.5: %i32 = value_of_initializer %int.convert_checked.loc14_45 [template = constants.%.34] // CHECK:STDOUT: %.loc14_45.6: %i32 = converted %.loc14_45.1, %.loc14_45.5 [template = constants.%.34] -// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc14_31.2, %.loc14_45.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc14_24.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] -// CHECK:STDOUT: %.loc14_24.2: %i32 = converted %int.ssub, %.loc14_24.1 [template = constants.%.35] -// CHECK:STDOUT: %int.snegate.loc14_20: init %i32 = call %Negate.ref.loc14_14(%.loc14_24.2) [template = constants.%.35] -// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.snegate.loc14_20 [template = constants.%.35] -// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.snegate.loc14_20, %.loc14_48.1 [template = constants.%.35] +// CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc14_42.2, %.loc14_45.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc14_46.1: %i32 = value_of_initializer %int.ssub [template = constants.%.35] +// CHECK:STDOUT: %.loc14_46.2: %i32 = converted %int.ssub, %.loc14_46.1 [template = constants.%.35] +// CHECK:STDOUT: %int.snegate.loc14_47: init %i32 = call %Negate.ref.loc14_14(%.loc14_46.2) [template = constants.%.35] +// CHECK:STDOUT: %.loc14_48.1: %i32 = value_of_initializer %int.snegate.loc14_47 [template = constants.%.35] +// CHECK:STDOUT: %.loc14_48.2: %i32 = converted %int.snegate.loc14_47, %.loc14_48.1 [template = constants.%.35] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc14_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index e3cdd30a650cc..36d2582d4d782 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -29,7 +29,7 @@ let a: i32 = Sub(0, 0x7FFFFFFF); let b: i32 = Sub(Sub(0, 0x7FFFFFFF), 1); // CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in calculation -2147483647 - 2 [CompileTimeIntegerOverflow] // CHECK:STDERR: let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: --- int_sub.carbon @@ -132,15 +132,15 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.ssub: init %i32 = call %Sub.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.ssub, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.ssub [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.ssub, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.ssub, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.ssub, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.ssub [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.ssub, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.ssub, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -331,19 +331,19 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %.loc7_25.4(%.loc7_25.1) [template = constants.%.33] // CHECK:STDOUT: %.loc7_25.5: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%.33] // CHECK:STDOUT: %.loc7_25.6: %i32 = converted %.loc7_25.1, %.loc7_25.5 [template = constants.%.33] -// CHECK:STDOUT: %int.ssub.loc7_21: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.34] +// CHECK:STDOUT: %int.ssub.loc7_35: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.34] // CHECK:STDOUT: %.loc7_38.1: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_21.1: %i32 = value_of_initializer %int.ssub.loc7_21 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_21.2: %i32 = converted %int.ssub.loc7_21, %.loc7_21.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %int.ssub.loc7_35 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_35.2: %i32 = converted %int.ssub.loc7_35, %.loc7_35.1 [template = constants.%.34] // CHECK:STDOUT: %.loc7_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc7_38.3: = bound_method %.loc7_38.1, %.loc7_38.2 [template = constants.%.36] // CHECK:STDOUT: %.loc7_38.4: = specific_function %.loc7_38.3, @Convert.2(constants.%.1) [template = constants.%.37] // CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %.loc7_38.4(%.loc7_38.1) [template = constants.%.38] // CHECK:STDOUT: %.loc7_38.5: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%.38] // CHECK:STDOUT: %.loc7_38.6: %i32 = converted %.loc7_38.1, %.loc7_38.5 [template = constants.%.38] -// CHECK:STDOUT: %int.ssub.loc7_17: init %i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.ssub.loc7_17 [template = constants.%.39] -// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.ssub.loc7_17, %.loc7_40.1 [template = constants.%.39] +// CHECK:STDOUT: %int.ssub.loc7_39: init %i32 = call %Sub.ref.loc7_14(%.loc7_35.2, %.loc7_38.6) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.ssub.loc7_39 [template = constants.%.39] +// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.ssub.loc7_39, %.loc7_40.1 [template = constants.%.39] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_40.2 // CHECK:STDOUT: %Sub.ref.loc11_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc11_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] @@ -361,19 +361,19 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.convert_checked.loc11_25: init %i32 = call %.loc11_25.4(%.loc11_25.1) [template = constants.%.33] // CHECK:STDOUT: %.loc11_25.5: %i32 = value_of_initializer %int.convert_checked.loc11_25 [template = constants.%.33] // CHECK:STDOUT: %.loc11_25.6: %i32 = converted %.loc11_25.1, %.loc11_25.5 [template = constants.%.33] -// CHECK:STDOUT: %int.ssub.loc11_21: init %i32 = call %Sub.ref.loc11_18(%.loc11_22.6, %.loc11_25.6) [template = constants.%.34] +// CHECK:STDOUT: %int.ssub.loc11_35: init %i32 = call %Sub.ref.loc11_18(%.loc11_22.6, %.loc11_25.6) [template = constants.%.34] // CHECK:STDOUT: %.loc11_38.1: Core.IntLiteral = int_value 2 [template = constants.%.40] -// CHECK:STDOUT: %.loc11_21.1: %i32 = value_of_initializer %int.ssub.loc11_21 [template = constants.%.34] -// CHECK:STDOUT: %.loc11_21.2: %i32 = converted %int.ssub.loc11_21, %.loc11_21.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_35.1: %i32 = value_of_initializer %int.ssub.loc11_35 [template = constants.%.34] +// CHECK:STDOUT: %.loc11_35.2: %i32 = converted %int.ssub.loc11_35, %.loc11_35.1 [template = constants.%.34] // CHECK:STDOUT: %.loc11_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc11_38.3: = bound_method %.loc11_38.1, %.loc11_38.2 [template = constants.%.41] // CHECK:STDOUT: %.loc11_38.4: = specific_function %.loc11_38.3, @Convert.2(constants.%.1) [template = constants.%.42] // CHECK:STDOUT: %int.convert_checked.loc11_38: init %i32 = call %.loc11_38.4(%.loc11_38.1) [template = constants.%.43] // CHECK:STDOUT: %.loc11_38.5: %i32 = value_of_initializer %int.convert_checked.loc11_38 [template = constants.%.43] // CHECK:STDOUT: %.loc11_38.6: %i32 = converted %.loc11_38.1, %.loc11_38.5 [template = constants.%.43] -// CHECK:STDOUT: %int.ssub.loc11_17: init %i32 = call %Sub.ref.loc11_14(%.loc11_21.2, %.loc11_38.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc11_40.1: %i32 = value_of_initializer %int.ssub.loc11_17 [template = constants.%.33] -// CHECK:STDOUT: %.loc11_40.2: %i32 = converted %int.ssub.loc11_17, %.loc11_40.1 [template = constants.%.33] +// CHECK:STDOUT: %int.ssub.loc11_39: init %i32 = call %Sub.ref.loc11_14(%.loc11_35.2, %.loc11_38.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc11_40.1: %i32 = value_of_initializer %int.ssub.loc11_39 [template = constants.%.33] +// CHECK:STDOUT: %.loc11_40.2: %i32 = converted %int.ssub.loc11_39, %.loc11_40.1 [template = constants.%.33] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc11_40.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index ae9bc75dd324f..2b8b858b1fdc6 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -42,23 +42,23 @@ fn JustRight(a: i32, b: i32) -> i32 = "int.uadd"; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_few: [i32; TooFew(1)]; -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: var too_few: [i32; TooFew(1)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_many: [i32; TooMany(1, 2, 3)]; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: var too_many: [i32; TooMany(1, 2, 3)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1, 2)]; -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1, 2)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:21: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2, 3)]; -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn JustRight(a: i32, b: i32) -> i32 = "int.uadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -186,15 +186,15 @@ let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDOUT: %int.uadd: init %i32 = call %Add.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.uadd, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.uadd [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.uadd, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.uadd, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.uadd, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.uadd [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.uadd, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.uadd, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index 7ba3aeab8c943..ffb8863b886b1 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -44,13 +44,13 @@ fn Div(a: i32, b: i32) -> i32 = "int.udiv"; // CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let a: i32 = Div(1, 0); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: let a: i32 = Div(1, 0); // CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let b: i32 = Div(0, 0); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~ let b: i32 = Div(0, 0); // CHECK:STDOUT: --- int_div.carbon @@ -153,15 +153,15 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.udiv: init %i32 = call %Div.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.udiv, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.udiv [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.udiv, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.udiv, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.udiv, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.udiv [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.udiv, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.udiv, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -376,7 +376,7 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] // CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] // CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] // CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] @@ -385,12 +385,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] // CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] // CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] -// CHECK:STDOUT: %int.unegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.35] -// CHECK:STDOUT: %int.udiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.36] +// CHECK:STDOUT: %int.unegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.unegate.loc9_36 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.unegate.loc9_36, %.loc9_36.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.unegate.loc9_47 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.unegate.loc9_47, %.loc9_47.1 [template = constants.%.35] +// CHECK:STDOUT: %int.udiv.loc9: init %i32 = call %Div.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%.36] // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.udiv.loc9 [template = constants.%.36] // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.udiv.loc9, %.loc9_49.1 [template = constants.%.36] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 @@ -406,25 +406,25 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] // CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] // CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.unegate.loc12, %.loc12_40.1 [template = constants.%.30] // CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] // CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] // CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] // CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.37] +// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.6) [template = constants.%.37] // CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.37] -// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.37] +// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.usub.loc12, %.loc12_44.1 [template = constants.%.37] // CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] // CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] // CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] // CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] -// CHECK:STDOUT: %int.udiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.37] +// CHECK:STDOUT: %int.udiv.loc12: init %i32 = call %Div.ref.loc12(%.loc12_44.2, %.loc12_47.6) [template = constants.%.37] // CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.udiv.loc12 [template = constants.%.37] // CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.udiv.loc12, %.loc12_49.1 [template = constants.%.37] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 @@ -438,17 +438,17 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %.loc15_29.4(%.loc15_29.1) [template = constants.%.29] // CHECK:STDOUT: %.loc15_29.5: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%.29] // CHECK:STDOUT: %.loc15_29.6: %i32 = converted %.loc15_29.1, %.loc15_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc15_28: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc15_40: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.30] // CHECK:STDOUT: %.loc15_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_28.1: %i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_28.2: %i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_40.1: %i32 = value_of_initializer %int.unegate.loc15_40 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_40.2: %i32 = converted %int.unegate.loc15_40, %.loc15_40.1 [template = constants.%.30] // CHECK:STDOUT: %.loc15_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc15_43.3: = bound_method %.loc15_43.1, %.loc15_43.2 [template = constants.%.32] // CHECK:STDOUT: %.loc15_43.4: = specific_function %.loc15_43.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %.loc15_43.4(%.loc15_43.1) [template = constants.%.34] // CHECK:STDOUT: %.loc15_43.5: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%.34] // CHECK:STDOUT: %.loc15_43.6: %i32 = converted %.loc15_43.1, %.loc15_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43.6) [template = constants.%.37] +// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_40.2, %.loc15_43.6) [template = constants.%.37] // CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] // CHECK:STDOUT: %.loc15_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] @@ -457,12 +457,12 @@ let b: i32 = Div(0, 0); // CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %.loc15_54.4(%.loc15_54.1) [template = constants.%.34] // CHECK:STDOUT: %.loc15_54.5: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%.34] // CHECK:STDOUT: %.loc15_54.6: %i32 = converted %.loc15_54.1, %.loc15_54.5 [template = constants.%.34] -// CHECK:STDOUT: %int.unegate.loc15_53: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc15_21.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.37] -// CHECK:STDOUT: %.loc15_21.2: %i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.37] -// CHECK:STDOUT: %.loc15_53.1: %i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_53.2: %i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.35] -// CHECK:STDOUT: %int.udiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.36] +// CHECK:STDOUT: %int.unegate.loc15_55: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc15_44.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.37] +// CHECK:STDOUT: %.loc15_44.2: %i32 = converted %int.usub.loc15, %.loc15_44.1 [template = constants.%.37] +// CHECK:STDOUT: %.loc15_55.1: %i32 = value_of_initializer %int.unegate.loc15_55 [template = constants.%.35] +// CHECK:STDOUT: %.loc15_55.2: %i32 = converted %int.unegate.loc15_55, %.loc15_55.1 [template = constants.%.35] +// CHECK:STDOUT: %int.udiv.loc15: init %i32 = call %Div.ref.loc15(%.loc15_44.2, %.loc15_55.2) [template = constants.%.36] // CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.udiv.loc15 [template = constants.%.36] // CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.udiv.loc15, %.loc15_57.1 [template = constants.%.36] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc15_57.2 diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index a25ddddfb2be6..6991cfa4c329d 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -46,13 +46,13 @@ fn Mod(a: i32, b: i32) -> i32 = "int.umod"; // CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let a: i32 = Mod(1, 0); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: let a: i32 = Mod(1, 0); // CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let b: i32 = Mod(0, 0); -// CHECK:STDERR: ^~~~ +// CHECK:STDERR: ^~~~~~~~~ let b: i32 = Mod(0, 0); // CHECK:STDOUT: --- int_div.carbon @@ -155,15 +155,15 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.umod: init %i32 = call %Mod.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.umod, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.umod [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.umod, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.umod, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.umod, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.umod [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.umod, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.umod, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -378,7 +378,7 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.convert_checked.loc9_25: init %i32 = call %.loc9_25.4(%.loc9_25.1) [template = constants.%.29] // CHECK:STDOUT: %.loc9_25.5: %i32 = value_of_initializer %int.convert_checked.loc9_25 [template = constants.%.29] // CHECK:STDOUT: %.loc9_25.6: %i32 = converted %.loc9_25.1, %.loc9_25.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc9_24: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc9_36: init %i32 = call %Negate.ref.loc9_18(%.loc9_25.6) [template = constants.%.30] // CHECK:STDOUT: %Negate.ref.loc9_39: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc9_46.1: Core.IntLiteral = int_value 1 [template = constants.%.31] // CHECK:STDOUT: %.loc9_46.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] @@ -387,12 +387,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.convert_checked.loc9_46: init %i32 = call %.loc9_46.4(%.loc9_46.1) [template = constants.%.34] // CHECK:STDOUT: %.loc9_46.5: %i32 = value_of_initializer %int.convert_checked.loc9_46 [template = constants.%.34] // CHECK:STDOUT: %.loc9_46.6: %i32 = converted %.loc9_46.1, %.loc9_46.5 [template = constants.%.34] -// CHECK:STDOUT: %int.unegate.loc9_45: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc9_24.1: %i32 = value_of_initializer %int.unegate.loc9_24 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_24.2: %i32 = converted %int.unegate.loc9_24, %.loc9_24.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_45.1: %i32 = value_of_initializer %int.unegate.loc9_45 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_45.2: %i32 = converted %int.unegate.loc9_45, %.loc9_45.1 [template = constants.%.35] -// CHECK:STDOUT: %int.umod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_24.2, %.loc9_45.2) [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc9_47: init %i32 = call %Negate.ref.loc9_39(%.loc9_46.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc9_36.1: %i32 = value_of_initializer %int.unegate.loc9_36 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_36.2: %i32 = converted %int.unegate.loc9_36, %.loc9_36.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %int.unegate.loc9_47 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int.unegate.loc9_47, %.loc9_47.1 [template = constants.%.35] +// CHECK:STDOUT: %int.umod.loc9: init %i32 = call %Mod.ref.loc9(%.loc9_36.2, %.loc9_47.2) [template = constants.%.30] // CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %int.umod.loc9 [template = constants.%.30] // CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int.umod.loc9, %.loc9_49.1 [template = constants.%.30] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc9_49.2 @@ -408,25 +408,25 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %.loc12_29.6: %i32 = converted %.loc12_29.1, %.loc12_29.5 [template = constants.%.29] // CHECK:STDOUT: %int.unegate.loc12: init %i32 = call %Negate.ref.loc12(%.loc12_29.6) [template = constants.%.30] // CHECK:STDOUT: %.loc12_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_28.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_28.2: %i32 = converted %int.unegate.loc12, %.loc12_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_40.1: %i32 = value_of_initializer %int.unegate.loc12 [template = constants.%.30] +// CHECK:STDOUT: %.loc12_40.2: %i32 = converted %int.unegate.loc12, %.loc12_40.1 [template = constants.%.30] // CHECK:STDOUT: %.loc12_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_43.3: = bound_method %.loc12_43.1, %.loc12_43.2 [template = constants.%.32] // CHECK:STDOUT: %.loc12_43.4: = specific_function %.loc12_43.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc12_43: init %i32 = call %.loc12_43.4(%.loc12_43.1) [template = constants.%.34] // CHECK:STDOUT: %.loc12_43.5: %i32 = value_of_initializer %int.convert_checked.loc12_43 [template = constants.%.34] // CHECK:STDOUT: %.loc12_43.6: %i32 = converted %.loc12_43.1, %.loc12_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_28.2, %.loc12_43.6) [template = constants.%.36] +// CHECK:STDOUT: %int.usub.loc12: init %i32 = call %Sub.ref.loc12(%.loc12_40.2, %.loc12_43.6) [template = constants.%.36] // CHECK:STDOUT: %.loc12_47.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc12_21.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.36] -// CHECK:STDOUT: %.loc12_21.2: %i32 = converted %int.usub.loc12, %.loc12_21.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_44.1: %i32 = value_of_initializer %int.usub.loc12 [template = constants.%.36] +// CHECK:STDOUT: %.loc12_44.2: %i32 = converted %int.usub.loc12, %.loc12_44.1 [template = constants.%.36] // CHECK:STDOUT: %.loc12_47.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc12_47.3: = bound_method %.loc12_47.1, %.loc12_47.2 [template = constants.%.32] // CHECK:STDOUT: %.loc12_47.4: = specific_function %.loc12_47.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc12_47: init %i32 = call %.loc12_47.4(%.loc12_47.1) [template = constants.%.34] // CHECK:STDOUT: %.loc12_47.5: %i32 = value_of_initializer %int.convert_checked.loc12_47 [template = constants.%.34] // CHECK:STDOUT: %.loc12_47.6: %i32 = converted %.loc12_47.1, %.loc12_47.5 [template = constants.%.34] -// CHECK:STDOUT: %int.umod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_21.2, %.loc12_47.6) [template = constants.%.37] +// CHECK:STDOUT: %int.umod.loc12: init %i32 = call %Mod.ref.loc12(%.loc12_44.2, %.loc12_47.6) [template = constants.%.37] // CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %int.umod.loc12 [template = constants.%.37] // CHECK:STDOUT: %.loc12_49.2: %i32 = converted %int.umod.loc12, %.loc12_49.1 [template = constants.%.37] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc12_49.2 @@ -440,17 +440,17 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.convert_checked.loc15_29: init %i32 = call %.loc15_29.4(%.loc15_29.1) [template = constants.%.29] // CHECK:STDOUT: %.loc15_29.5: %i32 = value_of_initializer %int.convert_checked.loc15_29 [template = constants.%.29] // CHECK:STDOUT: %.loc15_29.6: %i32 = converted %.loc15_29.1, %.loc15_29.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc15_28: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc15_40: init %i32 = call %Negate.ref.loc15_22(%.loc15_29.6) [template = constants.%.30] // CHECK:STDOUT: %.loc15_43.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc15_28.1: %i32 = value_of_initializer %int.unegate.loc15_28 [template = constants.%.30] -// CHECK:STDOUT: %.loc15_28.2: %i32 = converted %int.unegate.loc15_28, %.loc15_28.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_40.1: %i32 = value_of_initializer %int.unegate.loc15_40 [template = constants.%.30] +// CHECK:STDOUT: %.loc15_40.2: %i32 = converted %int.unegate.loc15_40, %.loc15_40.1 [template = constants.%.30] // CHECK:STDOUT: %.loc15_43.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc15_43.3: = bound_method %.loc15_43.1, %.loc15_43.2 [template = constants.%.32] // CHECK:STDOUT: %.loc15_43.4: = specific_function %.loc15_43.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc15_43: init %i32 = call %.loc15_43.4(%.loc15_43.1) [template = constants.%.34] // CHECK:STDOUT: %.loc15_43.5: %i32 = value_of_initializer %int.convert_checked.loc15_43 [template = constants.%.34] // CHECK:STDOUT: %.loc15_43.6: %i32 = converted %.loc15_43.1, %.loc15_43.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_28.2, %.loc15_43.6) [template = constants.%.36] +// CHECK:STDOUT: %int.usub.loc15: init %i32 = call %Sub.ref.loc15(%.loc15_40.2, %.loc15_43.6) [template = constants.%.36] // CHECK:STDOUT: %Negate.ref.loc15_47: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %.loc15_54.1: Core.IntLiteral = int_value 1 [template = constants.%.31] // CHECK:STDOUT: %.loc15_54.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] @@ -459,12 +459,12 @@ let b: i32 = Mod(0, 0); // CHECK:STDOUT: %int.convert_checked.loc15_54: init %i32 = call %.loc15_54.4(%.loc15_54.1) [template = constants.%.34] // CHECK:STDOUT: %.loc15_54.5: %i32 = value_of_initializer %int.convert_checked.loc15_54 [template = constants.%.34] // CHECK:STDOUT: %.loc15_54.6: %i32 = converted %.loc15_54.1, %.loc15_54.5 [template = constants.%.34] -// CHECK:STDOUT: %int.unegate.loc15_53: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc15_21.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_21.2: %i32 = converted %int.usub.loc15, %.loc15_21.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc15_53.1: %i32 = value_of_initializer %int.unegate.loc15_53 [template = constants.%.35] -// CHECK:STDOUT: %.loc15_53.2: %i32 = converted %int.unegate.loc15_53, %.loc15_53.1 [template = constants.%.35] -// CHECK:STDOUT: %int.umod.loc15: init %i32 = call %Mod.ref.loc15(%.loc15_21.2, %.loc15_53.2) [template = constants.%.36] +// CHECK:STDOUT: %int.unegate.loc15_55: init %i32 = call %Negate.ref.loc15_47(%.loc15_54.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc15_44.1: %i32 = value_of_initializer %int.usub.loc15 [template = constants.%.36] +// CHECK:STDOUT: %.loc15_44.2: %i32 = converted %int.usub.loc15, %.loc15_44.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc15_55.1: %i32 = value_of_initializer %int.unegate.loc15_55 [template = constants.%.35] +// CHECK:STDOUT: %.loc15_55.2: %i32 = converted %int.unegate.loc15_55, %.loc15_55.1 [template = constants.%.35] +// CHECK:STDOUT: %int.umod.loc15: init %i32 = call %Mod.ref.loc15(%.loc15_44.2, %.loc15_55.2) [template = constants.%.36] // CHECK:STDOUT: %.loc15_57.1: %i32 = value_of_initializer %int.umod.loc15 [template = constants.%.36] // CHECK:STDOUT: %.loc15_57.2: %i32 = converted %int.umod.loc15, %.loc15_57.1 [template = constants.%.36] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc15_57.2 diff --git a/toolchain/check/testdata/builtins/int/umul.carbon b/toolchain/check/testdata/builtins/int/umul.carbon index 9ffab00ac16ce..fcf263687843c 100644 --- a/toolchain/check/testdata/builtins/int/umul.carbon +++ b/toolchain/check/testdata/builtins/int/umul.carbon @@ -128,15 +128,15 @@ let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDOUT: %int.umul: init %i32 = call %Mul.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.umul, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.umul [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.umul, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.umul, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.umul, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.umul [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.umul, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.umul, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index 39d74f0a4832e..e59b33550d442 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -44,23 +44,23 @@ fn JustRight(a: i32) -> i32 = "int.unegate"; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_few: [i32; TooFew()]; -// CHECK:STDERR: ^~~~~~~ +// CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: var too_few: [i32; TooFew()]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_many: [i32; TooMany(1, 2)]; -// CHECK:STDERR: ^~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: var too_many: [i32; TooMany(1, 2)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1)]; -// CHECK:STDERR: ^~~~~~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1)]; // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)]; -// CHECK:STDERR: ^~~~~~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn JustRight(a: i32) -> i32 = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -70,7 +70,7 @@ var bad_call: [i32; JustRight(1, 2)]; fn RuntimeCallTooFew(a: i32) -> i32 { // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooFew(a); - // CHECK:STDERR: ^~~~~~~ + // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooFew() -> i32 = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ @@ -81,7 +81,7 @@ fn RuntimeCallTooFew(a: i32) -> i32 { fn RuntimeCallTooMany(a: i32, b: i32, c: i32) -> i32 { // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooMany(a, b, c); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooMany(a: i32, b: i32) -> i32 = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -92,7 +92,7 @@ fn RuntimeCallTooMany(a: i32, b: i32, c: i32) -> i32 { fn RuntimeCallBadReturnType(a: i32, b: i32) -> bool { // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:10: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: return BadReturnType(a, b); - // CHECK:STDERR: ^~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn BadReturnType(a: i32) -> bool = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -196,21 +196,21 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.convert_checked.loc4_30: init %i32 = call %.loc4_30.4(%.loc4_30.1) [template = constants.%.29] // CHECK:STDOUT: %.loc4_30.5: %i32 = value_of_initializer %int.convert_checked.loc4_30 [template = constants.%.29] // CHECK:STDOUT: %.loc4_30.6: %i32 = converted %.loc4_30.1, %.loc4_30.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc4_29: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc4_29.1: %i32 = value_of_initializer %int.unegate.loc4_29 [template = constants.%.30] -// CHECK:STDOUT: %.loc4_29.2: %i32 = converted %int.unegate.loc4_29, %.loc4_29.1 [template = constants.%.30] -// CHECK:STDOUT: %int.unegate.loc4_22: init %i32 = call %Negate.ref.loc4_16(%.loc4_29.2) [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc4_33: init %i32 = call %Negate.ref.loc4_23(%.loc4_30.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc4_33.1: %i32 = value_of_initializer %int.unegate.loc4_33 [template = constants.%.30] +// CHECK:STDOUT: %.loc4_33.2: %i32 = converted %int.unegate.loc4_33, %.loc4_33.1 [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc4_34: init %i32 = call %Negate.ref.loc4_16(%.loc4_33.2) [template = constants.%.29] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_22.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_22.2: = bound_method %int.unegate.loc4_22, %.loc4_22.1 [template = constants.%.32] -// CHECK:STDOUT: %.loc4_22.3: = specific_function %.loc4_22.2, @Convert.4(constants.%.1) [template = constants.%.33] -// CHECK:STDOUT: %.loc4_22.4: %i32 = value_of_initializer %int.unegate.loc4_22 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_22.5: %i32 = converted %int.unegate.loc4_22, %.loc4_22.4 [template = constants.%.29] -// CHECK:STDOUT: %int.convert_checked.loc4_22: init Core.IntLiteral = call %.loc4_22.3(%.loc4_22.5) [template = constants.%.2] -// CHECK:STDOUT: %.loc4_22.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_22 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_22.7: Core.IntLiteral = converted %int.unegate.loc4_22, %.loc4_22.6 [template = constants.%.2] -// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_22.7, %i32 [template = constants.%.34] +// CHECK:STDOUT: %.loc4_34.1: %Convert.type.6 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_34.2: = bound_method %int.unegate.loc4_34, %.loc4_34.1 [template = constants.%.32] +// CHECK:STDOUT: %.loc4_34.3: = specific_function %.loc4_34.2, @Convert.4(constants.%.1) [template = constants.%.33] +// CHECK:STDOUT: %.loc4_34.4: %i32 = value_of_initializer %int.unegate.loc4_34 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_34.5: %i32 = converted %int.unegate.loc4_34, %.loc4_34.4 [template = constants.%.29] +// CHECK:STDOUT: %int.convert_checked.loc4_34: init Core.IntLiteral = call %.loc4_34.3(%.loc4_34.5) [template = constants.%.2] +// CHECK:STDOUT: %.loc4_34.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_34 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_34.7: Core.IntLiteral = converted %int.unegate.loc4_34, %.loc4_34.6 [template = constants.%.2] +// CHECK:STDOUT: %.loc4_35: type = array_type %.loc4_34.7, %i32 [template = constants.%.34] // CHECK:STDOUT: %arr.var: ref %.34 = var arr // CHECK:STDOUT: %arr: ref %.34 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -708,12 +708,12 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_28.4(%.loc8_28.1) [template = constants.%.29] // CHECK:STDOUT: %.loc8_28.5: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.29] // CHECK:STDOUT: %.loc8_28.6: %i32 = converted %.loc8_28.1, %.loc8_28.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc8_27: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.30] -// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %int.unegate.loc8_27 [template = constants.%.30] -// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int.unegate.loc8_27, %.loc8_27.1 [template = constants.%.30] -// CHECK:STDOUT: %int.unegate.loc8_20: init %i32 = call %Negate.ref.loc8_14(%.loc8_27.2) [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.unegate.loc8_20 [template = constants.%.29] -// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.unegate.loc8_20, %.loc8_40.1 [template = constants.%.29] +// CHECK:STDOUT: %int.unegate.loc8_38: init %i32 = call %Negate.ref.loc8_21(%.loc8_28.6) [template = constants.%.30] +// CHECK:STDOUT: %.loc8_38.1: %i32 = value_of_initializer %int.unegate.loc8_38 [template = constants.%.30] +// CHECK:STDOUT: %.loc8_38.2: %i32 = converted %int.unegate.loc8_38, %.loc8_38.1 [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc8_39: init %i32 = call %Negate.ref.loc8_14(%.loc8_38.2) [template = constants.%.29] +// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.unegate.loc8_39 [template = constants.%.29] +// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.unegate.loc8_39, %.loc8_40.1 [template = constants.%.29] // CHECK:STDOUT: %a: %i32 = bind_name a, %.loc8_40.2 // CHECK:STDOUT: %Negate.ref.loc11_14: %Negate.type = name_ref Negate, file.%Negate.decl [template = constants.%Negate] // CHECK:STDOUT: %Sub.ref: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] @@ -725,22 +725,22 @@ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDOUT: %int.convert_checked.loc11_32: init %i32 = call %.loc11_32.4(%.loc11_32.1) [template = constants.%.29] // CHECK:STDOUT: %.loc11_32.5: %i32 = value_of_initializer %int.convert_checked.loc11_32 [template = constants.%.29] // CHECK:STDOUT: %.loc11_32.6: %i32 = converted %.loc11_32.1, %.loc11_32.5 [template = constants.%.29] -// CHECK:STDOUT: %int.unegate.loc11_31: init %i32 = call %Negate.ref.loc11_25(%.loc11_32.6) [template = constants.%.30] +// CHECK:STDOUT: %int.unegate.loc11_42: init %i32 = call %Negate.ref.loc11_25(%.loc11_32.6) [template = constants.%.30] // CHECK:STDOUT: %.loc11_45.1: Core.IntLiteral = int_value 1 [template = constants.%.31] -// CHECK:STDOUT: %.loc11_31.1: %i32 = value_of_initializer %int.unegate.loc11_31 [template = constants.%.30] -// CHECK:STDOUT: %.loc11_31.2: %i32 = converted %int.unegate.loc11_31, %.loc11_31.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_42.1: %i32 = value_of_initializer %int.unegate.loc11_42 [template = constants.%.30] +// CHECK:STDOUT: %.loc11_42.2: %i32 = converted %int.unegate.loc11_42, %.loc11_42.1 [template = constants.%.30] // CHECK:STDOUT: %.loc11_45.2: %Convert.type.2 = interface_witness_access constants.%.26, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc11_45.3: = bound_method %.loc11_45.1, %.loc11_45.2 [template = constants.%.32] // CHECK:STDOUT: %.loc11_45.4: = specific_function %.loc11_45.3, @Convert.2(constants.%.1) [template = constants.%.33] // CHECK:STDOUT: %int.convert_checked.loc11_45: init %i32 = call %.loc11_45.4(%.loc11_45.1) [template = constants.%.34] // CHECK:STDOUT: %.loc11_45.5: %i32 = value_of_initializer %int.convert_checked.loc11_45 [template = constants.%.34] // CHECK:STDOUT: %.loc11_45.6: %i32 = converted %.loc11_45.1, %.loc11_45.5 [template = constants.%.34] -// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc11_31.2, %.loc11_45.6) [template = constants.%.35] -// CHECK:STDOUT: %.loc11_24.1: %i32 = value_of_initializer %int.usub [template = constants.%.35] -// CHECK:STDOUT: %.loc11_24.2: %i32 = converted %int.usub, %.loc11_24.1 [template = constants.%.35] -// CHECK:STDOUT: %int.unegate.loc11_20: init %i32 = call %Negate.ref.loc11_14(%.loc11_24.2) [template = constants.%.35] -// CHECK:STDOUT: %.loc11_48.1: %i32 = value_of_initializer %int.unegate.loc11_20 [template = constants.%.35] -// CHECK:STDOUT: %.loc11_48.2: %i32 = converted %int.unegate.loc11_20, %.loc11_48.1 [template = constants.%.35] +// CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc11_42.2, %.loc11_45.6) [template = constants.%.35] +// CHECK:STDOUT: %.loc11_46.1: %i32 = value_of_initializer %int.usub [template = constants.%.35] +// CHECK:STDOUT: %.loc11_46.2: %i32 = converted %int.usub, %.loc11_46.1 [template = constants.%.35] +// CHECK:STDOUT: %int.unegate.loc11_47: init %i32 = call %Negate.ref.loc11_14(%.loc11_46.2) [template = constants.%.35] +// CHECK:STDOUT: %.loc11_48.1: %i32 = value_of_initializer %int.unegate.loc11_47 [template = constants.%.35] +// CHECK:STDOUT: %.loc11_48.2: %i32 = converted %int.unegate.loc11_47, %.loc11_48.1 [template = constants.%.35] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc11_48.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/usub.carbon b/toolchain/check/testdata/builtins/int/usub.carbon index 3e3e0a27d36ba..916aee3ed838e 100644 --- a/toolchain/check/testdata/builtins/int/usub.carbon +++ b/toolchain/check/testdata/builtins/int/usub.carbon @@ -129,15 +129,15 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.usub: init %i32 = call %Sub.ref(%.loc4_20.6, %.loc4_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.usub, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.usub [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.usub, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.usub, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_24.2: = bound_method %int.usub, %.loc4_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_24.3: = specific_function %.loc4_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_24.4: %i32 = value_of_initializer %int.usub [template = constants.%.34] +// CHECK:STDOUT: %.loc4_24.5: %i32 = converted %int.usub, %.loc4_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_24: init Core.IntLiteral = call %.loc4_24.3(%.loc4_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_24.7: Core.IntLiteral = converted %int.usub, %.loc4_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_25: type = array_type %.loc4_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] @@ -328,19 +328,19 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.convert_checked.loc7_25: init %i32 = call %.loc7_25.4(%.loc7_25.1) [template = constants.%.33] // CHECK:STDOUT: %.loc7_25.5: %i32 = value_of_initializer %int.convert_checked.loc7_25 [template = constants.%.33] // CHECK:STDOUT: %.loc7_25.6: %i32 = converted %.loc7_25.1, %.loc7_25.5 [template = constants.%.33] -// CHECK:STDOUT: %int.usub.loc7_21: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.34] +// CHECK:STDOUT: %int.usub.loc7_35: init %i32 = call %Sub.ref.loc7_18(%.loc7_22.6, %.loc7_25.6) [template = constants.%.34] // CHECK:STDOUT: %.loc7_38.1: Core.IntLiteral = int_value 1 [template = constants.%.35] -// CHECK:STDOUT: %.loc7_21.1: %i32 = value_of_initializer %int.usub.loc7_21 [template = constants.%.34] -// CHECK:STDOUT: %.loc7_21.2: %i32 = converted %int.usub.loc7_21, %.loc7_21.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %int.usub.loc7_35 [template = constants.%.34] +// CHECK:STDOUT: %.loc7_35.2: %i32 = converted %int.usub.loc7_35, %.loc7_35.1 [template = constants.%.34] // CHECK:STDOUT: %.loc7_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc7_38.3: = bound_method %.loc7_38.1, %.loc7_38.2 [template = constants.%.36] // CHECK:STDOUT: %.loc7_38.4: = specific_function %.loc7_38.3, @Convert.2(constants.%.1) [template = constants.%.37] // CHECK:STDOUT: %int.convert_checked.loc7_38: init %i32 = call %.loc7_38.4(%.loc7_38.1) [template = constants.%.38] // CHECK:STDOUT: %.loc7_38.5: %i32 = value_of_initializer %int.convert_checked.loc7_38 [template = constants.%.38] // CHECK:STDOUT: %.loc7_38.6: %i32 = converted %.loc7_38.1, %.loc7_38.5 [template = constants.%.38] -// CHECK:STDOUT: %int.usub.loc7_17: init %i32 = call %Sub.ref.loc7_14(%.loc7_21.2, %.loc7_38.6) [template = constants.%.39] -// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.usub.loc7_17 [template = constants.%.39] -// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.usub.loc7_17, %.loc7_40.1 [template = constants.%.39] +// CHECK:STDOUT: %int.usub.loc7_39: init %i32 = call %Sub.ref.loc7_14(%.loc7_35.2, %.loc7_38.6) [template = constants.%.39] +// CHECK:STDOUT: %.loc7_40.1: %i32 = value_of_initializer %int.usub.loc7_39 [template = constants.%.39] +// CHECK:STDOUT: %.loc7_40.2: %i32 = converted %int.usub.loc7_39, %.loc7_40.1 [template = constants.%.39] // CHECK:STDOUT: %b: %i32 = bind_name b, %.loc7_40.2 // CHECK:STDOUT: %Sub.ref.loc8_14: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] // CHECK:STDOUT: %Sub.ref.loc8_18: %Sub.type = name_ref Sub, file.%Sub.decl [template = constants.%Sub] @@ -358,19 +358,19 @@ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDOUT: %int.convert_checked.loc8_25: init %i32 = call %.loc8_25.4(%.loc8_25.1) [template = constants.%.33] // CHECK:STDOUT: %.loc8_25.5: %i32 = value_of_initializer %int.convert_checked.loc8_25 [template = constants.%.33] // CHECK:STDOUT: %.loc8_25.6: %i32 = converted %.loc8_25.1, %.loc8_25.5 [template = constants.%.33] -// CHECK:STDOUT: %int.usub.loc8_21: init %i32 = call %Sub.ref.loc8_18(%.loc8_22.6, %.loc8_25.6) [template = constants.%.34] +// CHECK:STDOUT: %int.usub.loc8_35: init %i32 = call %Sub.ref.loc8_18(%.loc8_22.6, %.loc8_25.6) [template = constants.%.34] // CHECK:STDOUT: %.loc8_38.1: Core.IntLiteral = int_value 2 [template = constants.%.40] -// CHECK:STDOUT: %.loc8_21.1: %i32 = value_of_initializer %int.usub.loc8_21 [template = constants.%.34] -// CHECK:STDOUT: %.loc8_21.2: %i32 = converted %int.usub.loc8_21, %.loc8_21.1 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_35.1: %i32 = value_of_initializer %int.usub.loc8_35 [template = constants.%.34] +// CHECK:STDOUT: %.loc8_35.2: %i32 = converted %int.usub.loc8_35, %.loc8_35.1 [template = constants.%.34] // CHECK:STDOUT: %.loc8_38.2: %Convert.type.2 = interface_witness_access constants.%.27, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc8_38.3: = bound_method %.loc8_38.1, %.loc8_38.2 [template = constants.%.41] // CHECK:STDOUT: %.loc8_38.4: = specific_function %.loc8_38.3, @Convert.2(constants.%.1) [template = constants.%.42] // CHECK:STDOUT: %int.convert_checked.loc8_38: init %i32 = call %.loc8_38.4(%.loc8_38.1) [template = constants.%.43] // CHECK:STDOUT: %.loc8_38.5: %i32 = value_of_initializer %int.convert_checked.loc8_38 [template = constants.%.43] // CHECK:STDOUT: %.loc8_38.6: %i32 = converted %.loc8_38.1, %.loc8_38.5 [template = constants.%.43] -// CHECK:STDOUT: %int.usub.loc8_17: init %i32 = call %Sub.ref.loc8_14(%.loc8_21.2, %.loc8_38.6) [template = constants.%.33] -// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.usub.loc8_17 [template = constants.%.33] -// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.usub.loc8_17, %.loc8_40.1 [template = constants.%.33] +// CHECK:STDOUT: %int.usub.loc8_39: init %i32 = call %Sub.ref.loc8_14(%.loc8_35.2, %.loc8_38.6) [template = constants.%.33] +// CHECK:STDOUT: %.loc8_40.1: %i32 = value_of_initializer %int.usub.loc8_39 [template = constants.%.33] +// CHECK:STDOUT: %.loc8_40.2: %i32 = converted %int.usub.loc8_39, %.loc8_40.1 [template = constants.%.33] // CHECK:STDOUT: %c: %i32 = bind_name c, %.loc8_40.2 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/builtins/int/xor.carbon b/toolchain/check/testdata/builtins/int/xor.carbon index 562d3d5e57cf1..a905e933bc33c 100644 --- a/toolchain/check/testdata/builtins/int/xor.carbon +++ b/toolchain/check/testdata/builtins/int/xor.carbon @@ -119,15 +119,15 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { // CHECK:STDOUT: %int.xor: init %i32 = call %Xor.ref(%.loc4_20.6, %.loc4_24.6) [template = constants.%.34] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed.loc4, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc4_19.2: = bound_method %int.xor, %.loc4_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc4_19.3: = specific_function %.loc4_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc4_19.4: %i32 = value_of_initializer %int.xor [template = constants.%.34] -// CHECK:STDOUT: %.loc4_19.5: %i32 = converted %int.xor, %.loc4_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc4_19: init Core.IntLiteral = call %.loc4_19.3(%.loc4_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_19.7: Core.IntLiteral = converted %int.xor, %.loc4_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc4_26.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc4_26.2: = bound_method %int.xor, %.loc4_26.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc4_26.3: = specific_function %.loc4_26.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc4_26.4: %i32 = value_of_initializer %int.xor [template = constants.%.34] +// CHECK:STDOUT: %.loc4_26.5: %i32 = converted %int.xor, %.loc4_26.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc4_26: init Core.IntLiteral = call %.loc4_26.3(%.loc4_26.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc4_26.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_26 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_26.7: Core.IntLiteral = converted %int.xor, %.loc4_26.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc4_27: type = array_type %.loc4_26.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: %.loc5_13.1: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index adfa357f35923..00305d2b765f8 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -279,11 +279,11 @@ class A { // 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: %Make.ref: %Make.type = name_ref Make, @Circle.%Make.decl [template = constants.%Make] -// CHECK:STDOUT: %.loc18_35.1: ref %Circle = temporary_storage -// CHECK:STDOUT: %Make.call: init %Circle = call %Make.ref() to %.loc18_35.1 -// CHECK:STDOUT: %.loc18_35.2: ref %Circle = temporary %.loc18_35.1, %Make.call -// CHECK:STDOUT: %.loc18_35.3: %Circle = bind_value %.loc18_35.2 -// CHECK:STDOUT: %circle: %Circle = bind_name circle, %.loc18_35.3 +// 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: %.loc26_15.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc26_15.1) [template = constants.%i32] // CHECK:STDOUT: %.loc26_15.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] diff --git a/toolchain/check/testdata/class/fail_method.carbon b/toolchain/check/testdata/class/fail_method.carbon index 997056e2d2280..48685573825e4 100644 --- a/toolchain/check/testdata/class/fail_method.carbon +++ b/toolchain/check/testdata/class/fail_method.carbon @@ -22,7 +22,7 @@ fn F(c: Class) { Class.NoSelf(); // CHECK:STDERR: fail_method.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall] // CHECK:STDERR: Class.WithSelf(); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_method.carbon:[[@LINE-13]]:3: note: calling function declared here [InCallToFunction] // CHECK:STDERR: fn WithSelf[self: Class](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -30,7 +30,7 @@ fn F(c: Class) { Class.WithSelf(); // CHECK:STDERR: fail_method.carbon:[[@LINE+7]]:3: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: Class.WithSelf(c); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_method.carbon:[[@LINE-21]]:3: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn WithSelf[self: Class](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -39,7 +39,7 @@ fn F(c: Class) { // CHECK:STDERR: fail_method.carbon:[[@LINE+6]]:3: error: missing object argument in method call [MissingObjectInMethodCall] // CHECK:STDERR: A(); - // CHECK:STDERR: ^~ + // CHECK:STDERR: ^~~ // CHECK:STDERR: fail_method.carbon:[[@LINE-30]]:3: note: calling function declared here [InCallToFunction] // CHECK:STDERR: fn WithSelf[self: Class](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/toolchain/check/testdata/class/generic/adapt.carbon b/toolchain/check/testdata/class/generic/adapt.carbon index d431aa263d23d..98eb0cc467af7 100644 --- a/toolchain/check/testdata/class/generic/adapt.carbon +++ b/toolchain/check/testdata/class/generic/adapt.carbon @@ -212,8 +212,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc9_11: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_11) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_10.2: type = converted %int.make_type_signed, %.loc9_10.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_14.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc9_14.2: type = converted %int.make_type_signed, %.loc9_14.1 [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] // CHECK:STDOUT: adapt_decl %C [template] // CHECK:STDOUT: %.loc10: = complete_type_witness %.6 [template = constants.%.7] @@ -229,8 +229,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc13: init type = call constants.%Int(%.loc13_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed.loc13, %.loc13_17.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_signed.loc13 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13, %.loc13_21.1 [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] // CHECK:STDOUT: %.loc13_13.1: %C.3 = as_compatible %a.ref // CHECK:STDOUT: %.loc13_13.2: %C.3 = converted %a.ref, %.loc13_13.1 @@ -359,8 +359,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.1] // CHECK:STDOUT: %.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_17.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_17.2: type = converted %int.make_type_signed.loc7, %.loc7_17.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_21.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_21.2: type = converted %int.make_type_signed.loc7, %.loc7_21.1 [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] // CHECK:STDOUT: %.loc7_13.1: %C.3 = as_compatible %a.ref // CHECK:STDOUT: %.loc7_13.2: %C.3 = converted %a.ref, %.loc7_13.1 @@ -484,8 +484,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc9_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc9_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc9_17.2: type = converted %int.make_type_signed, %.loc9_17.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc9_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc9_21.2: type = converted %int.make_type_signed, %.loc9_21.1 [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] // CHECK:STDOUT: adapt_decl %C [template] // CHECK:STDOUT: %.loc10: = complete_type_witness %.6 [template = constants.%.7] @@ -599,8 +599,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc12_18: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_signed, %.loc12_17.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_21.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_21.2: type = converted %int.make_type_signed, %.loc12_21.1 [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] // CHECK:STDOUT: adapt_decl %C [template] // CHECK:STDOUT: %.loc13: = complete_type_witness %.6 [template = constants.%.7] @@ -803,8 +803,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, file.%Adapter.decl [template = constants.%Adapter.1] // CHECK:STDOUT: %.loc8_23: Core.IntLiteral = int_value 32 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed.loc8_23: init type = call constants.%Int(%.loc8_23) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %int.make_type_signed.loc8_23 [template = constants.%i32] -// CHECK:STDOUT: %.loc8_22.2: type = converted %int.make_type_signed.loc8_23, %.loc8_22.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_26.1: type = value_of_initializer %int.make_type_signed.loc8_23 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_26.2: type = converted %int.make_type_signed.loc8_23, %.loc8_26.1 [template = constants.%i32] // CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.3] // CHECK:STDOUT: %.loc8_32.1: Core.IntLiteral = int_value 32 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed.loc8_32: init type = call constants.%Int(%.loc8_32.1) [template = constants.%i32] @@ -918,8 +918,8 @@ fn ImportedConvertLocal(a: Adapter(C)) -> i32 { // CHECK:STDOUT: %Adapter.ref: %Adapter.type = name_ref Adapter, imports.%import_ref.1 [template = constants.%Adapter.1] // CHECK:STDOUT: %.loc6_31: Core.IntLiteral = int_value 32 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed.loc6_31: init type = call constants.%Int(%.loc6_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_30.1: type = value_of_initializer %int.make_type_signed.loc6_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_30.2: type = converted %int.make_type_signed.loc6_31, %.loc6_30.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_34.1: type = value_of_initializer %int.make_type_signed.loc6_31 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_34.2: type = converted %int.make_type_signed.loc6_31, %.loc6_34.1 [template = constants.%i32] // CHECK:STDOUT: %Adapter: type = class_type @Adapter, @Adapter(constants.%i32) [template = constants.%Adapter.3] // CHECK:STDOUT: %.loc6_40.1: Core.IntLiteral = int_value 32 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed.loc6_40: init type = call constants.%Int(%.loc6_40.1) [template = constants.%i32] diff --git a/toolchain/check/testdata/class/generic/base_is_generic.carbon b/toolchain/check/testdata/class/generic/base_is_generic.carbon index d7dc83c957342..a9e4c0127b4b5 100644 --- a/toolchain/check/testdata/class/generic/base_is_generic.carbon +++ b/toolchain/check/testdata/class/generic/base_is_generic.carbon @@ -592,23 +592,23 @@ fn H() { // CHECK:STDOUT: %T.patt.loc8_9.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_9.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %X.loc9_17.2: type = class_type @X, @X(%T.loc8_9.2) [symbolic = %X.loc9_17.2 (constants.%X.3)] +// CHECK:STDOUT: %X.loc9_19.2: type = class_type @X, @X(%T.loc8_9.2) [symbolic = %X.loc9_19.2 (constants.%X.3)] // CHECK:STDOUT: %C: type = class_type @C, @C(%T.loc8_9.2) [symbolic = %C (constants.%C.2)] -// CHECK:STDOUT: %.loc9_20.2: type = unbound_element_type @C.%C (%C.2), @C.%X.loc9_17.2 (%X.3) [symbolic = %.loc9_20.2 (constants.%.5)] -// CHECK:STDOUT: %.loc10_1.2: type = struct_type {.base: @C.%X.loc9_17.2 (%X.3)} [symbolic = %.loc10_1.2 (constants.%.6)] +// CHECK:STDOUT: %.loc9_20.2: type = unbound_element_type @C.%C (%C.2), @C.%X.loc9_19.2 (%X.3) [symbolic = %.loc9_20.2 (constants.%.5)] +// CHECK:STDOUT: %.loc10_1.2: type = struct_type {.base: @C.%X.loc9_19.2 (%X.3)} [symbolic = %.loc10_1.2 (constants.%.6)] // CHECK:STDOUT: %.loc10_1.3: = complete_type_witness @C.%.loc10_1.2 (%.6) [symbolic = %.loc10_1.3 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %X.ref: %X.type = name_ref X, file.%X.decl [template = constants.%X.1] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_9.1 [symbolic = %T.loc8_9.2 (constants.%T)] -// CHECK:STDOUT: %X.loc9_17.1: type = class_type @X, @X(constants.%T) [symbolic = %X.loc9_17.2 (constants.%X.3)] -// CHECK:STDOUT: %.loc9_20.1: @C.%.loc9_20.2 (%.5) = base_decl %X.loc9_17.1, element0 [template] +// CHECK:STDOUT: %X.loc9_19.1: type = class_type @X, @X(constants.%T) [symbolic = %X.loc9_19.2 (constants.%X.3)] +// CHECK:STDOUT: %.loc9_20.1: @C.%.loc9_20.2 (%.5) = base_decl %X.loc9_19.1, element0 [template] // CHECK:STDOUT: %.loc10_1.1: = complete_type_witness %.6 [symbolic = %.loc10_1.3 (constants.%.7)] // CHECK:STDOUT: // CHECK:STDOUT: !members: // CHECK:STDOUT: .Self = constants.%C.2 // CHECK:STDOUT: .base = %.loc9_20.1 -// CHECK:STDOUT: extend %X.loc9_17.1 +// CHECK:STDOUT: extend %X.loc9_19.1 // CHECK:STDOUT: complete_type_witness = %.loc10_1.1 // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -642,8 +642,8 @@ fn H() { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc13_18: Core.IntLiteral = int_value 32 [template = constants.%.8] // CHECK:STDOUT: %int.make_type_signed.loc13_18: init type = call constants.%Int(%.loc13_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.1: type = value_of_initializer %int.make_type_signed.loc13_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_17.2: type = converted %int.make_type_signed.loc13_18, %.loc13_17.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_signed.loc13_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13_18, %.loc13_21.1 [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] // CHECK:STDOUT: %.loc13_22.1: %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.1 [template = constants.%G.3] @@ -716,7 +716,7 @@ fn H() { // CHECK:STDOUT: %T.patt.loc8_9.2 => constants.%i32 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %X.loc9_17.2 => constants.%X.4 +// CHECK:STDOUT: %X.loc9_19.2 => constants.%X.4 // CHECK:STDOUT: %C => constants.%C.3 // CHECK:STDOUT: %.loc9_20.2 => constants.%.9 // CHECK:STDOUT: %.loc10_1.2 => constants.%.10 @@ -854,8 +854,8 @@ fn H() { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.2 [template = constants.%C.1] // CHECK:STDOUT: %.loc7_18: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc7_18: init type = call constants.%Int(%.loc7_18) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_17.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_17.2: type = converted %int.make_type_signed.loc7_18, %.loc7_17.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_21.1: type = value_of_initializer %int.make_type_signed.loc7_18 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_21.2: type = converted %int.make_type_signed.loc7_18, %.loc7_21.1 [template = constants.%i32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%i32) [template = constants.%C.3] // CHECK:STDOUT: %.loc7_22.1: %G.type.3 = specific_constant imports.%import_ref.7, @X(constants.%i32) [template = constants.%G.3] // CHECK:STDOUT: %G.ref: %G.type.3 = name_ref G, %.loc7_22.1 [template = constants.%G.3] diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index 7b191ae1a8a45..2c0e970906d0a 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -27,7 +27,7 @@ class Class(T:! type, N:! i32) {} // CHECK:STDERR: fail_too_few.carbon:[[@LINE+7]]:8: error: 1 argument passed to generic class expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var a: Class(i32*); -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: note: calling generic class declared here [InCallToEntity] // CHECK:STDERR: class Class(T:! type, N:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -42,7 +42,7 @@ class Class(T:! type, N:! i32) {} // CHECK:STDERR: fail_too_many.carbon:[[@LINE+7]]:8: error: 3 arguments passed to generic class expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var a: Class(i32*, 1, 2); -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: note: calling generic class declared here [InCallToEntity] // CHECK:STDERR: class Class(T:! type, N:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -57,10 +57,10 @@ class Class(T:! type, N:! i32) {} // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+9]]:8: error: cannot implicitly convert from `Core.IntLiteral` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: var a: Class(5, i32*); -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+6]]:8: note: type `Core.IntLiteral` does not implement interface `ImplicitAs(type)` [MissingImplInMemberAccessNote] // CHECK:STDERR: var a: Class(5, i32*); -// CHECK:STDERR: ^~~~~~ +// CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: class Class(T:! type, N:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -158,25 +158,25 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc6_17.2: type = converted %int.make_type_signed, %.loc6_17.1 [template = constants.%i32] // CHECK:STDOUT: %.loc6_17.3: type = ptr_type %i32 [template = constants.%.4] // CHECK:STDOUT: %.loc6_20: Core.IntLiteral = int_value 5 [template = constants.%.5] -// CHECK:STDOUT: %.loc6_13.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc6_13.2: = bound_method %.loc6_20, %.loc6_13.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc6_13.3: = specific_function %.loc6_13.2, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_13.3(%.loc6_20) [template = constants.%.32] -// CHECK:STDOUT: %.loc6_13.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.32] -// CHECK:STDOUT: %.loc6_13.5: %i32 = converted %.loc6_20, %.loc6_13.4 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_21.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc6_21.2: = bound_method %.loc6_20, %.loc6_21.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc6_21.3: = specific_function %.loc6_21.2, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc6: init %i32 = call %.loc6_21.3(%.loc6_20) [template = constants.%.32] +// CHECK:STDOUT: %.loc6_21.4: %i32 = value_of_initializer %int.convert_checked.loc6 [template = constants.%.32] +// CHECK:STDOUT: %.loc6_21.5: %i32 = converted %.loc6_20, %.loc6_21.4 [template = constants.%.32] // CHECK:STDOUT: %Class.loc6: type = class_type @Class, @Class(constants.%.4, constants.%.32) [template = constants.%Class.3] // CHECK:STDOUT: %a.var: ref %Class.3 = var a // CHECK:STDOUT: %a: ref %Class.3 = bind_name a, %a.var // CHECK:STDOUT: %Class.ref.loc9: %Class.type = name_ref Class, %Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc9_15: %empty_tuple.type = tuple_literal () // CHECK:STDOUT: %.loc9_18: Core.IntLiteral = int_value 0 [template = constants.%.34] -// CHECK:STDOUT: %.loc9_13.1: type = converted %.loc9_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] -// CHECK:STDOUT: %.loc9_13.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_13.3: = bound_method %.loc9_18, %.loc9_13.2 [template = constants.%.35] -// CHECK:STDOUT: %.loc9_13.4: = specific_function %.loc9_13.3, @Convert.2(constants.%.1) [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_13.4(%.loc9_18) [template = constants.%.37] -// CHECK:STDOUT: %.loc9_13.5: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.37] -// CHECK:STDOUT: %.loc9_13.6: %i32 = converted %.loc9_18, %.loc9_13.5 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_19.1: type = converted %.loc9_15, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_19.2: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_19.3: = bound_method %.loc9_18, %.loc9_19.2 [template = constants.%.35] +// CHECK:STDOUT: %.loc9_19.4: = specific_function %.loc9_19.3, @Convert.2(constants.%.1) [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_19.4(%.loc9_18) [template = constants.%.37] +// CHECK:STDOUT: %.loc9_19.5: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.37] +// CHECK:STDOUT: %.loc9_19.6: %i32 = converted %.loc9_18, %.loc9_19.5 [template = constants.%.37] // CHECK:STDOUT: %Class.loc9: type = class_type @Class, @Class(constants.%empty_tuple.type, constants.%.37) [template = constants.%Class.4] // CHECK:STDOUT: %b.var: ref %Class.4 = var b // CHECK:STDOUT: %b: ref %Class.4 = bind_name b, %b.var @@ -452,7 +452,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %.loc15_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc15_20.2: type = converted %int.make_type_signed, %.loc15_20.1 [template = constants.%i32] // CHECK:STDOUT: %.loc15_20.3: type = ptr_type %i32 [template = constants.%.5] -// CHECK:STDOUT: %.loc15_13: type = converted %.loc15_14, [template = ] +// CHECK:STDOUT: %.loc15_21: type = converted %.loc15_14, [template = ] // CHECK:STDOUT: %a.var: ref = var a // CHECK:STDOUT: %a: ref = bind_name a, %a.var // CHECK:STDOUT: } @@ -586,46 +586,46 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %A.decl: @Inner.%A.type (%A.type.1) = fn_decl @A [symbolic = @Inner.%A (constants.%A.1)] { -// CHECK:STDOUT: %return.patt: @A.%Outer.loc4_20.1 (%Outer.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @A.%Outer.loc4_20.1 (%Outer.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @A.%Outer.loc4_22.1 (%Outer.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @A.%Outer.loc4_22.1 (%Outer.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] // CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc2_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Outer.loc4_20.2: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc4_20.1 (constants.%Outer.2)] -// CHECK:STDOUT: %return.param: ref @A.%Outer.loc4_20.1 (%Outer.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @A.%Outer.loc4_20.1 (%Outer.2) = return_slot %return.param +// CHECK:STDOUT: %Outer.loc4_22.2: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc4_22.1 (constants.%Outer.2)] +// CHECK:STDOUT: %return.param: ref @A.%Outer.loc4_22.1 (%Outer.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @A.%Outer.loc4_22.1 (%Outer.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %B.decl: @Inner.%B.type (%B.type.1) = fn_decl @B [symbolic = @Inner.%B (constants.%B.1)] { -// CHECK:STDOUT: %return.patt: @B.%Outer.loc7_20.1 (%Outer.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @B.%Outer.loc7_20.1 (%Outer.3) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @B.%Outer.loc7_22.1 (%Outer.3) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @B.%Outer.loc7_22.1 (%Outer.3) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Outer.ref: %Outer.type = name_ref Outer, file.%Outer.decl [template = constants.%Outer.1] // CHECK:STDOUT: %U.ref: type = name_ref U, @Inner.%U.loc3_15.1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %Outer.loc7_20.2: type = class_type @Outer, @Outer(constants.%U) [symbolic = %Outer.loc7_20.1 (constants.%Outer.3)] -// CHECK:STDOUT: %return.param: ref @B.%Outer.loc7_20.1 (%Outer.3) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @B.%Outer.loc7_20.1 (%Outer.3) = return_slot %return.param +// CHECK:STDOUT: %Outer.loc7_22.2: type = class_type @Outer, @Outer(constants.%U) [symbolic = %Outer.loc7_22.1 (constants.%Outer.3)] +// CHECK:STDOUT: %return.param: ref @B.%Outer.loc7_22.1 (%Outer.3) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @B.%Outer.loc7_22.1 (%Outer.3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %C.decl: @Inner.%C.type (%C.type.1) = fn_decl @C [symbolic = @Inner.%C (constants.%C.1)] { -// CHECK:STDOUT: %return.patt: @C.%Inner.loc10_20.1 (%Inner.3) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @C.%Inner.loc10_20.1 (%Inner.3) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @C.%Inner.loc10_22.1 (%Inner.3) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @C.%Inner.loc10_22.1 (%Inner.3) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc10: @C.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.loc10_15 (constants.%Inner.1)] // CHECK:STDOUT: %Inner.ref: @C.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc10 [symbolic = %Inner.loc10_15 (constants.%Inner.1)] // CHECK:STDOUT: %T.ref: type = name_ref T, @Outer.%T.loc2_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Inner.loc10_20.2: type = class_type @Inner, @Inner(constants.%T, constants.%T) [symbolic = %Inner.loc10_20.1 (constants.%Inner.3)] -// CHECK:STDOUT: %return.param: ref @C.%Inner.loc10_20.1 (%Inner.3) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @C.%Inner.loc10_20.1 (%Inner.3) = return_slot %return.param +// CHECK:STDOUT: %Inner.loc10_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%T) [symbolic = %Inner.loc10_22.1 (constants.%Inner.3)] +// CHECK:STDOUT: %return.param: ref @C.%Inner.loc10_22.1 (%Inner.3) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @C.%Inner.loc10_22.1 (%Inner.3) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %D.decl: @Inner.%D.type (%D.type.1) = fn_decl @D [symbolic = @Inner.%D (constants.%D.1)] { -// CHECK:STDOUT: %return.patt: @D.%Inner.loc13_20.1 (%Inner.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @D.%Inner.loc13_20.1 (%Inner.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @D.%Inner.loc13_22.1 (%Inner.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @D.%Inner.loc13_22.1 (%Inner.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %.loc13: @D.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.loc13_15 (constants.%Inner.1)] // CHECK:STDOUT: %Inner.ref: @D.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc13 [symbolic = %Inner.loc13_15 (constants.%Inner.1)] // CHECK:STDOUT: %U.ref: type = name_ref U, @Inner.%U.loc3_15.1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %Inner.loc13_20.2: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_20.1 (constants.%Inner.2)] -// CHECK:STDOUT: %return.param: ref @D.%Inner.loc13_20.1 (%Inner.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @D.%Inner.loc13_20.1 (%Inner.2) = return_slot %return.param +// CHECK:STDOUT: %Inner.loc13_22.2: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_22.1 (constants.%Inner.2)] +// CHECK:STDOUT: %return.param: ref @D.%Inner.loc13_22.1 (%Inner.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @D.%Inner.loc13_22.1 (%Inner.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc16: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: @@ -641,32 +641,32 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @A(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Outer.loc4_20.1: type = class_type @Outer, @Outer(%T) [symbolic = %Outer.loc4_20.1 (constants.%Outer.2)] +// CHECK:STDOUT: %Outer.loc4_22.1: type = class_type @Outer, @Outer(%T) [symbolic = %Outer.loc4_22.1 (constants.%Outer.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @A.%Outer.loc4_20.1 (%Outer.2) = struct_value () [symbolic = %struct (constants.%struct.1)] +// CHECK:STDOUT: %struct: @A.%Outer.loc4_22.1 (%Outer.2) = struct_value () [symbolic = %struct (constants.%struct.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @A.%Outer.loc4_20.1 (%Outer.2) { +// CHECK:STDOUT: fn() -> %return: @A.%Outer.loc4_22.1 (%Outer.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc5_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc5_15.2: init @A.%Outer.loc4_20.1 (%Outer.2) = class_init (), %return [symbolic = %struct (constants.%struct.1)] -// CHECK:STDOUT: %.loc5_16: init @A.%Outer.loc4_20.1 (%Outer.2) = converted %.loc5_15.1, %.loc5_15.2 [symbolic = %struct (constants.%struct.1)] +// CHECK:STDOUT: %.loc5_15.2: init @A.%Outer.loc4_22.1 (%Outer.2) = class_init (), %return [symbolic = %struct (constants.%struct.1)] +// CHECK:STDOUT: %.loc5_16: init @A.%Outer.loc4_22.1 (%Outer.2) = converted %.loc5_15.1, %.loc5_15.2 [symbolic = %struct (constants.%struct.1)] // CHECK:STDOUT: return %.loc5_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic fn @B(@Outer.%T.loc2_13.1: type, @Inner.%U.loc3_15.1: type) { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %Outer.loc7_20.1: type = class_type @Outer, @Outer(%U) [symbolic = %Outer.loc7_20.1 (constants.%Outer.3)] +// CHECK:STDOUT: %Outer.loc7_22.1: type = class_type @Outer, @Outer(%U) [symbolic = %Outer.loc7_22.1 (constants.%Outer.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @B.%Outer.loc7_20.1 (%Outer.3) = struct_value () [symbolic = %struct (constants.%struct.2)] +// CHECK:STDOUT: %struct: @B.%Outer.loc7_22.1 (%Outer.3) = struct_value () [symbolic = %struct (constants.%struct.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @B.%Outer.loc7_20.1 (%Outer.3) { +// CHECK:STDOUT: fn() -> %return: @B.%Outer.loc7_22.1 (%Outer.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc8_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc8_15.2: init @B.%Outer.loc7_20.1 (%Outer.3) = class_init (), %return [symbolic = %struct (constants.%struct.2)] -// CHECK:STDOUT: %.loc8_16: init @B.%Outer.loc7_20.1 (%Outer.3) = converted %.loc8_15.1, %.loc8_15.2 [symbolic = %struct (constants.%struct.2)] +// CHECK:STDOUT: %.loc8_15.2: init @B.%Outer.loc7_22.1 (%Outer.3) = class_init (), %return [symbolic = %struct (constants.%struct.2)] +// CHECK:STDOUT: %.loc8_16: init @B.%Outer.loc7_22.1 (%Outer.3) = converted %.loc8_15.1, %.loc8_15.2 [symbolic = %struct (constants.%struct.2)] // CHECK:STDOUT: return %.loc8_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -675,16 +675,16 @@ class Outer(T:! type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T) [symbolic = %Inner.type (constants.%Inner.type.1)] // CHECK:STDOUT: %Inner.loc10_15: @C.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.loc10_15 (constants.%Inner.1)] -// CHECK:STDOUT: %Inner.loc10_20.1: type = class_type @Inner, @Inner(%T, %T) [symbolic = %Inner.loc10_20.1 (constants.%Inner.3)] +// CHECK:STDOUT: %Inner.loc10_22.1: type = class_type @Inner, @Inner(%T, %T) [symbolic = %Inner.loc10_22.1 (constants.%Inner.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @C.%Inner.loc10_20.1 (%Inner.3) = struct_value () [symbolic = %struct (constants.%struct.3)] +// CHECK:STDOUT: %struct: @C.%Inner.loc10_22.1 (%Inner.3) = struct_value () [symbolic = %struct (constants.%struct.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @C.%Inner.loc10_20.1 (%Inner.3) { +// CHECK:STDOUT: fn() -> %return: @C.%Inner.loc10_22.1 (%Inner.3) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc11_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc11_15.2: init @C.%Inner.loc10_20.1 (%Inner.3) = class_init (), %return [symbolic = %struct (constants.%struct.3)] -// CHECK:STDOUT: %.loc11_16: init @C.%Inner.loc10_20.1 (%Inner.3) = converted %.loc11_15.1, %.loc11_15.2 [symbolic = %struct (constants.%struct.3)] +// CHECK:STDOUT: %.loc11_15.2: init @C.%Inner.loc10_22.1 (%Inner.3) = class_init (), %return [symbolic = %struct (constants.%struct.3)] +// CHECK:STDOUT: %.loc11_16: init @C.%Inner.loc10_22.1 (%Inner.3) = converted %.loc11_15.1, %.loc11_15.2 [symbolic = %struct (constants.%struct.3)] // CHECK:STDOUT: return %.loc11_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -694,16 +694,16 @@ class Outer(T:! type) { // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T) [symbolic = %Inner.type (constants.%Inner.type.1)] // CHECK:STDOUT: %Inner.loc13_15: @D.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.loc13_15 (constants.%Inner.1)] // CHECK:STDOUT: %U: type = bind_symbolic_name U, 1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %Inner.loc13_20.1: type = class_type @Inner, @Inner(%T, %U) [symbolic = %Inner.loc13_20.1 (constants.%Inner.2)] +// CHECK:STDOUT: %Inner.loc13_22.1: type = class_type @Inner, @Inner(%T, %U) [symbolic = %Inner.loc13_22.1 (constants.%Inner.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @D.%Inner.loc13_20.1 (%Inner.2) = struct_value () [symbolic = %struct (constants.%struct.4)] +// CHECK:STDOUT: %struct: @D.%Inner.loc13_22.1 (%Inner.2) = struct_value () [symbolic = %struct (constants.%struct.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @D.%Inner.loc13_20.1 (%Inner.2) { +// CHECK:STDOUT: fn() -> %return: @D.%Inner.loc13_22.1 (%Inner.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_15.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc14_15.2: init @D.%Inner.loc13_20.1 (%Inner.2) = class_init (), %return [symbolic = %struct (constants.%struct.4)] -// CHECK:STDOUT: %.loc14_16: init @D.%Inner.loc13_20.1 (%Inner.2) = converted %.loc14_15.1, %.loc14_15.2 [symbolic = %struct (constants.%struct.4)] +// CHECK:STDOUT: %.loc14_15.2: init @D.%Inner.loc13_22.1 (%Inner.2) = class_init (), %return [symbolic = %struct (constants.%struct.4)] +// CHECK:STDOUT: %.loc14_16: init @D.%Inner.loc13_22.1 (%Inner.2) = converted %.loc14_15.1, %.loc14_15.2 [symbolic = %struct (constants.%struct.4)] // CHECK:STDOUT: return %.loc14_16 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -740,7 +740,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%T, constants.%U) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Outer.loc4_20.1 => constants.%Outer.2 +// CHECK:STDOUT: %Outer.loc4_22.1 => constants.%Outer.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(constants.%U) { @@ -759,7 +759,7 @@ class Outer(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @B(constants.%T, constants.%U) { // CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %Outer.loc7_20.1 => constants.%Outer.3 +// CHECK:STDOUT: %Outer.loc7_22.1 => constants.%Outer.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(constants.%T, constants.%T) { @@ -792,7 +792,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %T => constants.%T // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 // CHECK:STDOUT: %Inner.loc10_15 => constants.%Inner.1 -// CHECK:STDOUT: %Inner.loc10_20.1 => constants.%Inner.3 +// CHECK:STDOUT: %Inner.loc10_22.1 => constants.%Inner.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Outer(@D.%T) { @@ -810,7 +810,7 @@ class Outer(T:! type) { // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 // CHECK:STDOUT: %Inner.loc13_15 => constants.%Inner.1 // CHECK:STDOUT: %U => constants.%U -// CHECK:STDOUT: %Inner.loc13_20.1 => constants.%Inner.2 +// CHECK:STDOUT: %Inner.loc13_22.1 => constants.%Inner.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Inner(%T, %U.loc3_15.2) { diff --git a/toolchain/check/testdata/class/generic/field.carbon b/toolchain/check/testdata/class/generic/field.carbon index f207652601580..468cd2d8bfa01 100644 --- a/toolchain/check/testdata/class/generic/field.carbon +++ b/toolchain/check/testdata/class/generic/field.carbon @@ -90,8 +90,8 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc15_15: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc15_15: init type = call constants.%Int(%.loc15_15) [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14.1: type = value_of_initializer %int.make_type_signed.loc15_15 [template = constants.%i32] -// CHECK:STDOUT: %.loc15_14.2: type = converted %int.make_type_signed.loc15_15, %.loc15_14.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_18.1: type = value_of_initializer %int.make_type_signed.loc15_15 [template = constants.%i32] +// CHECK:STDOUT: %.loc15_18.2: type = converted %int.make_type_signed.loc15_15, %.loc15_18.1 [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] // CHECK:STDOUT: %.loc15_24.1: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc15_24: init type = call constants.%Int(%.loc15_24.1) [template = constants.%i32] @@ -105,38 +105,38 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %T.patt.loc19_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc19_6.1, runtime_param [symbolic = %T.patt.loc19_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %c.patt: @G.%Class.loc19_24.2 (%Class.2) = binding_pattern c -// CHECK:STDOUT: %c.param_patt: @G.%Class.loc19_24.2 (%Class.2) = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: @G.%Class.loc19_26.2 (%Class.2) = binding_pattern c +// CHECK:STDOUT: %c.param_patt: @G.%Class.loc19_26.2 (%Class.2) = value_param_pattern %c.patt, runtime_param0 // 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.1] // 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_24.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_24.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc19_26.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc19_26.2 (constants.%Class.2)] // 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_24.2 (%Class.2) = value_param runtime_param0 -// CHECK:STDOUT: %c: @G.%Class.loc19_24.2 (%Class.2) = bind_name c, %c.param +// CHECK:STDOUT: %c.param: @G.%Class.loc19_26.2 (%Class.2) = value_param runtime_param0 +// CHECK:STDOUT: %c: @G.%Class.loc19_26.2 (%Class.2) = 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 // CHECK:STDOUT: } // CHECK:STDOUT: %H.decl: %H.type = fn_decl @H [template = constants.%H] { // CHECK:STDOUT: %U.patt.loc23_6.1: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc23_6.1, runtime_param [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)] -// CHECK:STDOUT: %c.patt: @H.%Class.loc23_24.2 (%Class.4) = binding_pattern c -// CHECK:STDOUT: %c.param_patt: @H.%Class.loc23_24.2 (%Class.4) = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: @H.%Class.loc23_26.2 (%Class.4) = binding_pattern c +// CHECK:STDOUT: %c.param_patt: @H.%Class.loc23_26.2 (%Class.4) = value_param_pattern %c.patt, runtime_param0 // 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.1] // 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_24.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc23_24.2 (constants.%Class.4)] +// CHECK:STDOUT: %Class.loc23_26.1: type = class_type @Class, @Class(constants.%U) [symbolic = %Class.loc23_26.2 (constants.%Class.4)] // 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_24.2 (%Class.4) = value_param runtime_param0 -// CHECK:STDOUT: %c: @H.%Class.loc23_24.2 (%Class.4) = bind_name c, %c.param +// CHECK:STDOUT: %c.param: @H.%Class.loc23_26.2 (%Class.4) = value_param runtime_param0 +// CHECK:STDOUT: %c: @H.%Class.loc23_26.2 (%Class.4) = 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 // CHECK:STDOUT: } @@ -176,14 +176,14 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: generic fn @G(%T.loc19_6.1: type) { // CHECK:STDOUT: %T.loc19_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc19_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %Class.loc19_24.2: type = class_type @Class, @Class(%T.loc19_6.2) [symbolic = %Class.loc19_24.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc19_26.2: type = class_type @Class, @Class(%T.loc19_6.2) [symbolic = %Class.loc19_26.2 (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc20_11.3: type = unbound_element_type @G.%Class.loc19_24.2 (%Class.2), @G.%T.loc19_6.2 (%T) [symbolic = %.loc20_11.3 (constants.%.1)] +// CHECK:STDOUT: %.loc20_11.3: type = unbound_element_type @G.%Class.loc19_26.2 (%Class.2), @G.%T.loc19_6.2 (%T) [symbolic = %.loc20_11.3 (constants.%.1)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type, %c.param_patt: @G.%Class.loc19_24.2 (%Class.2)) -> @G.%T.loc19_6.2 (%T) { +// CHECK:STDOUT: fn(%T.param_patt: type, %c.param_patt: @G.%Class.loc19_26.2 (%Class.2)) -> @G.%T.loc19_6.2 (%T) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: @G.%Class.loc19_24.2 (%Class.2) = name_ref c, %c +// CHECK:STDOUT: %c.ref: @G.%Class.loc19_26.2 (%Class.2) = name_ref c, %c // CHECK:STDOUT: %x.ref: @G.%.loc20_11.3 (%.1) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] // CHECK:STDOUT: %.loc20_11.1: ref @G.%T.loc19_6.2 (%T) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc20_11.2: @G.%T.loc19_6.2 (%T) = bind_value %.loc20_11.1 @@ -194,14 +194,14 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: generic fn @H(%U.loc23_6.1: type) { // CHECK:STDOUT: %U.loc23_6.2: type = bind_symbolic_name U, 0 [symbolic = %U.loc23_6.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc23_6.2: type = symbolic_binding_pattern U, 0 [symbolic = %U.patt.loc23_6.2 (constants.%U.patt)] -// CHECK:STDOUT: %Class.loc23_24.2: type = class_type @Class, @Class(%U.loc23_6.2) [symbolic = %Class.loc23_24.2 (constants.%Class.4)] +// CHECK:STDOUT: %Class.loc23_26.2: type = class_type @Class, @Class(%U.loc23_6.2) [symbolic = %Class.loc23_26.2 (constants.%Class.4)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc24_11.3: type = unbound_element_type @H.%Class.loc23_24.2 (%Class.4), @H.%U.loc23_6.2 (%U) [symbolic = %.loc24_11.3 (constants.%.10)] +// CHECK:STDOUT: %.loc24_11.3: type = unbound_element_type @H.%Class.loc23_26.2 (%Class.4), @H.%U.loc23_6.2 (%U) [symbolic = %.loc24_11.3 (constants.%.10)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%U.param_patt: type, %c.param_patt: @H.%Class.loc23_24.2 (%Class.4)) -> @H.%U.loc23_6.2 (%U) { +// CHECK:STDOUT: fn(%U.param_patt: type, %c.param_patt: @H.%Class.loc23_26.2 (%Class.4)) -> @H.%U.loc23_6.2 (%U) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %c.ref: @H.%Class.loc23_24.2 (%Class.4) = name_ref c, %c +// CHECK:STDOUT: %c.ref: @H.%Class.loc23_26.2 (%Class.4) = name_ref c, %c // CHECK:STDOUT: %x.ref: @H.%.loc24_11.3 (%.10) = name_ref x, @Class.%.loc12_8.1 [template = @Class.%.loc12_8.1] // CHECK:STDOUT: %.loc24_11.1: ref @H.%U.loc23_6.2 (%U) = class_element_access %c.ref, element0 // CHECK:STDOUT: %.loc24_11.2: @H.%U.loc23_6.2 (%U) = bind_value %.loc24_11.1 @@ -244,7 +244,7 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: specific @G(constants.%T) { // CHECK:STDOUT: %T.loc19_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc19_6.2 => constants.%T -// CHECK:STDOUT: %Class.loc19_24.2 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc19_26.2 => constants.%Class.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Class(constants.%U) { @@ -266,6 +266,6 @@ fn H(U:! type, c: Class(U)) -> U { // CHECK:STDOUT: specific @H(constants.%U) { // CHECK:STDOUT: %U.loc23_6.2 => constants.%U // CHECK:STDOUT: %U.patt.loc23_6.2 => constants.%U -// CHECK:STDOUT: %Class.loc23_24.2 => constants.%Class.4 +// CHECK:STDOUT: %Class.loc23_26.2 => constants.%Class.4 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index 65cb75b1abdba..7a09fe9623180 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -154,8 +154,8 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, file.%CompleteClass.decl [template = constants.%CompleteClass.1] // CHECK:STDOUT: %.loc11_25: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc11_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc11_24.2: type = converted %int.make_type_signed, %.loc11_24.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc11_28.2: type = converted %int.make_type_signed, %.loc11_28.1 [template = constants.%i32] // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3] // CHECK:STDOUT: %return.param: ref %CompleteClass.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %CompleteClass.3 = return_slot %return.param @@ -430,8 +430,8 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1] // CHECK:STDOUT: %.loc8_25: Core.IntLiteral = int_value 32 [template = constants.%.24] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc8_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc8_24.2: type = converted %int.make_type_signed, %.loc8_24.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc8_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc8_28.2: type = converted %int.make_type_signed, %.loc8_28.1 [template = constants.%i32] // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3] // CHECK:STDOUT: %return.param: ref %CompleteClass.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %CompleteClass.3 = return_slot %return.param @@ -1192,8 +1192,8 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1] // CHECK:STDOUT: %.loc6_24: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc6: init type = call constants.%Int(%.loc6_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc6_23.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] -// CHECK:STDOUT: %.loc6_23.2: type = converted %int.make_type_signed.loc6, %.loc6_23.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_27.1: type = value_of_initializer %int.make_type_signed.loc6 [template = constants.%i32] +// CHECK:STDOUT: %.loc6_27.2: type = converted %int.make_type_signed.loc6, %.loc6_27.1 [template = constants.%i32] // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3] // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var @@ -1224,8 +1224,8 @@ class Class(U:! type) { // CHECK:STDOUT: %CompleteClass.ref: %CompleteClass.type = name_ref CompleteClass, imports.%import_ref.2 [template = constants.%CompleteClass.1] // CHECK:STDOUT: %.loc11_24: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc11: init type = call constants.%Int(%.loc11_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] -// CHECK:STDOUT: %.loc11_23.2: type = converted %int.make_type_signed.loc11, %.loc11_23.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_27.1: type = value_of_initializer %int.make_type_signed.loc11 [template = constants.%i32] +// CHECK:STDOUT: %.loc11_27.2: type = converted %int.make_type_signed.loc11, %.loc11_27.1 [template = constants.%i32] // CHECK:STDOUT: %CompleteClass: type = class_type @CompleteClass, @CompleteClass(constants.%i32) [template = constants.%CompleteClass.3] // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var @@ -1594,8 +1594,8 @@ class Class(U:! type) { // CHECK:STDOUT: %v.var: ref %CompleteClass.3 = var v // CHECK:STDOUT: %v: ref %CompleteClass.3 = bind_name v, %v.var // CHECK:STDOUT: %F.ref: %F.type.3 = name_ref F, imports.%import_ref.3 [template = constants.%F.3] -// CHECK:STDOUT: %.loc14_33: ref %CompleteClass.4 = temporary_storage -// CHECK:STDOUT: %F.call: init %CompleteClass.4 = call %F.ref() to %.loc14_33 +// CHECK:STDOUT: %.loc14_34: ref %CompleteClass.4 = temporary_storage +// CHECK:STDOUT: %F.call: init %CompleteClass.4 = call %F.ref() to %.loc14_34 // CHECK:STDOUT: %.loc14_35: %CompleteClass.3 = converted %F.call, [template = ] // CHECK:STDOUT: assign %v.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/generic/init.carbon b/toolchain/check/testdata/class/generic/init.carbon index cd2e2ee3813b5..847d095f078d8 100644 --- a/toolchain/check/testdata/class/generic/init.carbon +++ b/toolchain/check/testdata/class/generic/init.carbon @@ -155,25 +155,25 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc8_26.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_26.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Class.loc9_15.2: type = class_type @Class, @Class(%T.loc8_26.2) [symbolic = %Class.loc9_15.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc9_17.2: type = class_type @Class, @Class(%T.loc8_26.2) [symbolic = %Class.loc9_17.2 (constants.%Class.2)] // CHECK:STDOUT: %.loc9_28.5: type = struct_type {.k: @InitFromStructGeneric.%T.loc8_26.2 (%T)} [symbolic = %.loc9_28.5 (constants.%.2)] -// CHECK:STDOUT: %.loc10_11.3: type = unbound_element_type @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2), @InitFromStructGeneric.%T.loc8_26.2 (%T) [symbolic = %.loc10_11.3 (constants.%.1)] +// CHECK:STDOUT: %.loc10_11.3: type = unbound_element_type @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2), @InitFromStructGeneric.%T.loc8_26.2 (%T) [symbolic = %.loc10_11.3 (constants.%.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.1] // CHECK:STDOUT: %T.ref.loc9: type = name_ref T, %T.loc8_26.1 [symbolic = %T.loc8_26.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc9_15.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc9_15.2 (constants.%Class.2)] -// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2) = var v -// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2) = bind_name v, %v.var +// CHECK:STDOUT: %Class.loc9_17.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc9_17.2 (constants.%Class.2)] +// CHECK:STDOUT: %v.var: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = var v +// CHECK:STDOUT: %v: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = 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.%.loc9_28.5 (%.2) = 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_15.2 (%Class.2) = class_init (%.loc9_28.3), %v.var -// CHECK:STDOUT: %.loc9_29: init @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2) = converted %.loc9_28.1, %.loc9_28.4 +// CHECK:STDOUT: %.loc9_28.4: init @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = class_init (%.loc9_28.3), %v.var +// CHECK:STDOUT: %.loc9_29: init @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = converted %.loc9_28.1, %.loc9_28.4 // CHECK:STDOUT: assign %v.var, %.loc9_29 -// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.loc9_15.2 (%Class.2) = name_ref v, %v +// CHECK:STDOUT: %v.ref: ref @InitFromStructGeneric.%Class.loc9_17.2 (%Class.2) = name_ref v, %v // CHECK:STDOUT: %k.ref: @InitFromStructGeneric.%.loc10_11.3 (%.1) = name_ref k, @Class.%.loc5_8.1 [template = @Class.%.loc5_8.1] // 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 @@ -186,8 +186,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 32 [template = constants.%.5] // CHECK:STDOUT: %int.make_type_signed.loc14: init type = call constants.%Int(%.loc14_16) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_15.2: type = converted %int.make_type_signed.loc14, %.loc14_15.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_19.1: type = value_of_initializer %int.make_type_signed.loc14 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_19.2: type = converted %int.make_type_signed.loc14, %.loc14_19.1 [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] // CHECK:STDOUT: %v.var: ref %Class.3 = var v // CHECK:STDOUT: %v: ref %Class.3 = bind_name v, %v.var @@ -347,16 +347,16 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %T.patt.loc8_27.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_27.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %Adapt.loc9_21.2: type = class_type @Adapt, @Adapt(%T.loc8_27.2) [symbolic = %Adapt.loc9_21.2 (constants.%Adapt.2)] +// CHECK:STDOUT: %Adapt.loc9_23.2: type = class_type @Adapt, @Adapt(%T.loc8_27.2) [symbolic = %Adapt.loc9_23.2 (constants.%Adapt.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type, %x.param_patt: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T)) -> @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %x.ref: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = name_ref x, %x // CHECK:STDOUT: %Adapt.ref: %Adapt.type = name_ref Adapt, file.%Adapt.decl [template = constants.%Adapt.1] // CHECK:STDOUT: %T.ref.loc9_22: type = name_ref T, %T.loc8_27.1 [symbolic = %T.loc8_27.2 (constants.%T)] -// CHECK:STDOUT: %Adapt.loc9_21.1: type = class_type @Adapt, @Adapt(constants.%T) [symbolic = %Adapt.loc9_21.2 (constants.%Adapt.2)] -// CHECK:STDOUT: %.loc9_13.1: @InitFromAdaptedGeneric.%Adapt.loc9_21.2 (%Adapt.2) = as_compatible %x.ref -// CHECK:STDOUT: %.loc9_13.2: @InitFromAdaptedGeneric.%Adapt.loc9_21.2 (%Adapt.2) = converted %x.ref, %.loc9_13.1 +// CHECK:STDOUT: %Adapt.loc9_23.1: type = class_type @Adapt, @Adapt(constants.%T) [symbolic = %Adapt.loc9_23.2 (constants.%Adapt.2)] +// CHECK:STDOUT: %.loc9_13.1: @InitFromAdaptedGeneric.%Adapt.loc9_23.2 (%Adapt.2) = as_compatible %x.ref +// CHECK:STDOUT: %.loc9_13.2: @InitFromAdaptedGeneric.%Adapt.loc9_23.2 (%Adapt.2) = converted %x.ref, %.loc9_13.1 // CHECK:STDOUT: %T.ref.loc9_29: type = name_ref T, %T.loc8_27.1 [symbolic = %T.loc8_27.2 (constants.%T)] // CHECK:STDOUT: %.loc9_26.1: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = as_compatible %.loc9_13.2 // CHECK:STDOUT: %.loc9_26.2: @InitFromAdaptedGeneric.%T.loc8_27.2 (%T) = converted %.loc9_13.2, %.loc9_26.1 @@ -370,8 +370,8 @@ fn InitFromAdaptedSpecific(x: i32) -> i32 { // CHECK:STDOUT: %Adapt.ref: %Adapt.type = name_ref Adapt, file.%Adapt.decl [template = constants.%Adapt.1] // CHECK:STDOUT: %.loc13_22: Core.IntLiteral = int_value 32 [template = constants.%.2] // CHECK:STDOUT: %int.make_type_signed.loc13_22: init type = call constants.%Int(%.loc13_22) [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.1: type = value_of_initializer %int.make_type_signed.loc13_22 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_21.2: type = converted %int.make_type_signed.loc13_22, %.loc13_21.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_25.1: type = value_of_initializer %int.make_type_signed.loc13_22 [template = constants.%i32] +// CHECK:STDOUT: %.loc13_25.2: type = converted %int.make_type_signed.loc13_22, %.loc13_25.1 [template = constants.%i32] // CHECK:STDOUT: %Adapt: type = class_type @Adapt, @Adapt(constants.%i32) [template = constants.%Adapt.3] // CHECK:STDOUT: %.loc13_13.1: %Adapt.3 = as_compatible %x.ref // CHECK:STDOUT: %.loc13_13.2: %Adapt.3 = converted %x.ref, %.loc13_13.1 diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index 0e3ffe557f9fd..4c832f216d1a6 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -120,8 +120,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc10_31: Core.IntLiteral = int_value 32 [template = constants.%.7] // CHECK:STDOUT: %int.make_type_signed.loc10_31: init type = call constants.%Int(%.loc10_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc10_30.1: type = value_of_initializer %int.make_type_signed.loc10_31 [template = constants.%i32] -// CHECK:STDOUT: %.loc10_30.2: type = converted %int.make_type_signed.loc10_31, %.loc10_30.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_34.1: type = value_of_initializer %int.make_type_signed.loc10_31 [template = constants.%i32] +// CHECK:STDOUT: %.loc10_34.2: type = converted %int.make_type_signed.loc10_31, %.loc10_34.1 [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] // CHECK:STDOUT: %.loc10_40.1: Core.IntLiteral = int_value 32 [template = constants.%.7] // CHECK:STDOUT: %int.make_type_signed.loc10_40: init type = call constants.%Int(%.loc10_40.1) [template = constants.%i32] @@ -141,8 +141,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc14_24: Core.IntLiteral = int_value 32 [template = constants.%.7] // CHECK:STDOUT: %int.make_type_signed.loc14_24: init type = call constants.%Int(%.loc14_24) [template = constants.%i32] -// CHECK:STDOUT: %.loc14_23.1: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32] -// CHECK:STDOUT: %.loc14_23.2: type = converted %int.make_type_signed.loc14_24, %.loc14_23.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_27.1: type = value_of_initializer %int.make_type_signed.loc14_24 [template = constants.%i32] +// CHECK:STDOUT: %.loc14_27.2: type = converted %int.make_type_signed.loc14_24, %.loc14_27.1 [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] // CHECK:STDOUT: %.loc14_33.1: Core.IntLiteral = int_value 32 [template = constants.%.7] // CHECK:STDOUT: %int.make_type_signed.loc14_33: init type = call constants.%Int(%.loc14_33.1) [template = constants.%i32] @@ -162,8 +162,8 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %.loc18_28: Core.IntLiteral = int_value 32 [template = constants.%.7] // CHECK:STDOUT: %int.make_type_signed.loc18_28: init type = call constants.%Int(%.loc18_28) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_27.1: type = value_of_initializer %int.make_type_signed.loc18_28 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_27.2: type = converted %int.make_type_signed.loc18_28, %.loc18_27.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_31.1: type = value_of_initializer %int.make_type_signed.loc18_28 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_31.2: type = converted %int.make_type_signed.loc18_28, %.loc18_31.1 [template = constants.%i32] // CHECK:STDOUT: %Class: type = class_type @Class, @Class(constants.%i32) [template = constants.%Class.3] // CHECK:STDOUT: %.loc18_32: type = ptr_type %Class.3 [template = constants.%.12] // CHECK:STDOUT: %.loc18_38.1: Core.IntLiteral = int_value 32 [template = constants.%.7] @@ -305,9 +305,9 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %.loc19_12.4: = specific_function %.loc19_12.3, @GetAddr(constants.%i32) // CHECK:STDOUT: %.loc19_12.5: %.12 = addr_of %.loc19_12.1 // CHECK:STDOUT: %GetAddr.call: init %.13 = call %.loc19_12.4(%.loc19_12.5) -// CHECK:STDOUT: %.loc19_21.1: %.13 = value_of_initializer %GetAddr.call -// CHECK:STDOUT: %.loc19_21.2: %.13 = converted %GetAddr.call, %.loc19_21.1 -// CHECK:STDOUT: %.loc19_10.1: ref %i32 = deref %.loc19_21.2 +// CHECK:STDOUT: %.loc19_22.1: %.13 = value_of_initializer %GetAddr.call +// CHECK:STDOUT: %.loc19_22.2: %.13 = converted %GetAddr.call, %.loc19_22.1 +// CHECK:STDOUT: %.loc19_10.1: ref %i32 = deref %.loc19_22.2 // CHECK:STDOUT: %.loc19_10.2: %i32 = bind_value %.loc19_10.1 // CHECK:STDOUT: return %.loc19_10.2 // CHECK:STDOUT: } @@ -430,16 +430,16 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: %StaticMemberFunctionCall.decl: %StaticMemberFunctionCall.type = fn_decl @StaticMemberFunctionCall [template = constants.%StaticMemberFunctionCall] { // CHECK:STDOUT: %T.patt.loc8_29.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_29.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc8_29.1, runtime_param [symbolic = %T.patt.loc8_29.2 (constants.%T.patt)] -// CHECK:STDOUT: %return.patt: @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref.loc8: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc8_29.1 [symbolic = %T.loc8_29.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc8_47.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_47.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc8_49.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_29.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_29.2 (constants.%T)] -// CHECK:STDOUT: %return.param: ref @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = return_slot %return.param +// CHECK:STDOUT: %return.param: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: @@ -453,14 +453,14 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: class { // CHECK:STDOUT: %Make.decl: @Class.%Make.type (%Make.type) = fn_decl @Make [symbolic = @Class.%Make (constants.%Make)] { -// CHECK:STDOUT: %return.patt: @Make.%Class.loc5_21.1 (%Class.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @Make.%Class.loc5_21.1 (%Class.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @Make.%Class.loc5_23.1 (%Class.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @Make.%Class.loc5_23.1 (%Class.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc4_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc5_21.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc5_21.1 (constants.%Class.2)] -// CHECK:STDOUT: %return.param: ref @Make.%Class.loc5_21.1 (%Class.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @Make.%Class.loc5_21.1 (%Class.2) = return_slot %return.param +// CHECK:STDOUT: %Class.loc5_23.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc5_23.1 (constants.%Class.2)] +// CHECK:STDOUT: %return.param: ref @Make.%Class.loc5_23.1 (%Class.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @Make.%Class.loc5_23.1 (%Class.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc6: = complete_type_witness %.1 [template = constants.%.2] // CHECK:STDOUT: @@ -473,16 +473,16 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @Make(@Class.%T.loc4_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc5_21.1: type = class_type @Class, @Class(%T) [symbolic = %Class.loc5_21.1 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc5_23.1: type = class_type @Class, @Class(%T) [symbolic = %Class.loc5_23.1 (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @Make.%Class.loc5_21.1 (%Class.2) = struct_value () [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %struct: @Make.%Class.loc5_23.1 (%Class.2) = struct_value () [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @Make.%Class.loc5_21.1 (%Class.2) { +// CHECK:STDOUT: fn() -> %return: @Make.%Class.loc5_23.1 (%Class.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc5_35.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc5_35.2: init @Make.%Class.loc5_21.1 (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] -// CHECK:STDOUT: %.loc5_36: init @Make.%Class.loc5_21.1 (%Class.2) = converted %.loc5_35.1, %.loc5_35.2 [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %.loc5_35.2: init @Make.%Class.loc5_23.1 (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %.loc5_36: init @Make.%Class.loc5_23.1 (%Class.2) = converted %.loc5_35.1, %.loc5_35.2 [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: return %.loc5_36 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -490,24 +490,24 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: generic fn @StaticMemberFunctionCall(%T.loc8_29.1: type) { // CHECK:STDOUT: %T.loc8_29.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_29.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_29.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_29.2 (constants.%T.patt)] -// CHECK:STDOUT: %Class.loc8_47.2: type = class_type @Class, @Class(%T.loc8_29.2) [symbolic = %Class.loc8_47.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc8_49.2: type = class_type @Class, @Class(%T.loc8_29.2) [symbolic = %Class.loc8_49.2 (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %Make.type: type = fn_type @Make, @Class(%T.loc8_29.2) [symbolic = %Make.type (constants.%Make.type)] // CHECK:STDOUT: %Make: @StaticMemberFunctionCall.%Make.type (%Make.type) = struct_value () [symbolic = %Make (constants.%Make)] // CHECK:STDOUT: %.loc15_18.3: = specific_function %Make, @Make(%T.loc8_29.2) [symbolic = %.loc15_18.3 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%T.param_patt: type) -> %return: @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) { +// CHECK:STDOUT: fn(%T.param_patt: type) -> %return: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref.loc15: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref.loc15: type = name_ref T, %T.loc8_29.1 [symbolic = %T.loc8_29.2 (constants.%T)] -// CHECK:STDOUT: %Class.loc15: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_47.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc15: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc8_49.2 (constants.%Class.2)] // CHECK:STDOUT: %.loc15_18.1: @StaticMemberFunctionCall.%Make.type (%Make.type) = specific_constant @Class.%Make.decl, @Class(constants.%T) [symbolic = %Make (constants.%Make)] // CHECK:STDOUT: %Make.ref: @StaticMemberFunctionCall.%Make.type (%Make.type) = name_ref Make, %.loc15_18.1 [symbolic = %Make (constants.%Make)] // CHECK:STDOUT: %.loc15_18.2: = specific_function %Make.ref, @Make(constants.%T) [symbolic = %.loc15_18.3 (constants.%.4)] -// CHECK:STDOUT: %.loc15_23: ref @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = temporary_storage -// CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = call %.loc15_18.2() to %.loc15_23 -// CHECK:STDOUT: %.loc15_25: @StaticMemberFunctionCall.%Class.loc8_47.2 (%Class.2) = converted %Make.call, [template = ] +// CHECK:STDOUT: %.loc15_24: ref @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = temporary_storage +// CHECK:STDOUT: %Make.call: init @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = call %.loc15_18.2() to %.loc15_24 +// CHECK:STDOUT: %.loc15_25: @StaticMemberFunctionCall.%Class.loc8_49.2 (%Class.2) = converted %Make.call, [template = ] // CHECK:STDOUT: return to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -528,7 +528,7 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: // CHECK:STDOUT: specific @Make(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class.loc5_21.1 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc5_23.1 => constants.%Class.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %struct => constants.%struct @@ -547,11 +547,11 @@ fn StaticMemberFunctionCall(T:! type) -> Class(T) { // CHECK:STDOUT: specific @StaticMemberFunctionCall(constants.%T) { // CHECK:STDOUT: %T.loc8_29.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_29.2 => constants.%T -// CHECK:STDOUT: %Class.loc8_47.2 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc8_49.2 => constants.%Class.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @Make(@StaticMemberFunctionCall.%T.loc8_29.2) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class.loc5_21.1 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc5_23.1 => constants.%Class.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 bd8d94d3bfb2b..04710568a7839 100644 --- a/toolchain/check/testdata/class/generic/method_deduce.carbon +++ b/toolchain/check/testdata/class/generic/method_deduce.carbon @@ -214,19 +214,19 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %Get.ref: @Get.%Get.type (%Get.type.1) = name_ref Get, %.loc15_39.1 [symbolic = %Get (constants.%Get.1)] // CHECK:STDOUT: %U.ref.loc15_43: type = name_ref U, %U.loc15_10.2 [symbolic = %U.loc15_10.1 (constants.%U)] // CHECK:STDOUT: %.loc15_39.2: = specific_function %Get.ref, @Get(constants.%T, constants.%U) [symbolic = %.loc15_39.3 (constants.%.4)] -// CHECK:STDOUT: %.loc15_42.1: ref @Get.%tuple.type (%tuple.type.2) = temporary_storage -// CHECK:STDOUT: %Get.call: init @Get.%tuple.type (%tuple.type.2) = call %.loc15_39.2() to %.loc15_42.1 -// CHECK:STDOUT: %.loc15_42.2: ref @Get.%tuple.type (%tuple.type.2) = temporary %.loc15_42.1, %Get.call -// CHECK:STDOUT: %.loc15_42.3: ref @Get.%T (%T) = tuple_access %.loc15_42.2, element0 -// CHECK:STDOUT: %.loc15_42.4: @Get.%T (%T) = bind_value %.loc15_42.3 -// CHECK:STDOUT: %.loc15_42.5: ref @Get.%T (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc15_42.6: init @Get.%T (%T) = initialize_from %.loc15_42.4 to %.loc15_42.5 -// CHECK:STDOUT: %.loc15_42.7: ref @Get.%U.loc15_10.1 (%U) = tuple_access %.loc15_42.2, element1 -// CHECK:STDOUT: %.loc15_42.8: @Get.%U.loc15_10.1 (%U) = bind_value %.loc15_42.7 -// CHECK:STDOUT: %.loc15_42.9: ref @Get.%U.loc15_10.1 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc15_42.10: init @Get.%U.loc15_10.1 (%U) = initialize_from %.loc15_42.8 to %.loc15_42.9 -// CHECK:STDOUT: %.loc15_42.11: init @Get.%tuple.type (%tuple.type.2) = tuple_init (%.loc15_42.6, %.loc15_42.10) to %return -// CHECK:STDOUT: %.loc15_45: init @Get.%tuple.type (%tuple.type.2) = converted %Get.call, %.loc15_42.11 +// CHECK:STDOUT: %.loc15_44.1: ref @Get.%tuple.type (%tuple.type.2) = temporary_storage +// CHECK:STDOUT: %Get.call: init @Get.%tuple.type (%tuple.type.2) = call %.loc15_39.2() to %.loc15_44.1 +// CHECK:STDOUT: %.loc15_44.2: ref @Get.%tuple.type (%tuple.type.2) = temporary %.loc15_44.1, %Get.call +// CHECK:STDOUT: %.loc15_44.3: ref @Get.%T (%T) = tuple_access %.loc15_44.2, element0 +// CHECK:STDOUT: %.loc15_44.4: @Get.%T (%T) = bind_value %.loc15_44.3 +// CHECK:STDOUT: %.loc15_44.5: ref @Get.%T (%T) = tuple_access %return, element0 +// CHECK:STDOUT: %.loc15_44.6: init @Get.%T (%T) = initialize_from %.loc15_44.4 to %.loc15_44.5 +// CHECK:STDOUT: %.loc15_44.7: ref @Get.%U.loc15_10.1 (%U) = tuple_access %.loc15_44.2, element1 +// CHECK:STDOUT: %.loc15_44.8: @Get.%U.loc15_10.1 (%U) = bind_value %.loc15_44.7 +// CHECK:STDOUT: %.loc15_44.9: ref @Get.%U.loc15_10.1 (%U) = tuple_access %return, element1 +// CHECK:STDOUT: %.loc15_44.10: init @Get.%U.loc15_10.1 (%U) = initialize_from %.loc15_44.8 to %.loc15_44.9 +// CHECK:STDOUT: %.loc15_44.11: init @Get.%tuple.type (%tuple.type.2) = tuple_init (%.loc15_44.6, %.loc15_44.10) to %return +// CHECK:STDOUT: %.loc15_45: init @Get.%tuple.type (%tuple.type.2) = converted %Get.call, %.loc15_44.11 // CHECK:STDOUT: return %.loc15_45 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -249,19 +249,19 @@ fn CallGenericMethodWithNonDeducedParam(c: Class(A)) -> (A, B) { // CHECK:STDOUT: %x.ref: @GetNoDeduce.%T (%T) = name_ref x, %x // CHECK:STDOUT: %U.ref.loc16_68: type = name_ref U, %U.loc16_24.2 [symbolic = %U.loc16_24.1 (constants.%U)] // CHECK:STDOUT: %.loc16_53.2: = specific_function %GetNoDeduce.ref, @GetNoDeduce(constants.%T, constants.%U) [symbolic = %.loc16_53.3 (constants.%.5)] -// CHECK:STDOUT: %.loc16_64.1: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = temporary_storage -// CHECK:STDOUT: %GetNoDeduce.call: init @GetNoDeduce.%tuple.type (%tuple.type.2) = call %.loc16_53.2(%x.ref) to %.loc16_64.1 -// CHECK:STDOUT: %.loc16_64.2: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = temporary %.loc16_64.1, %GetNoDeduce.call -// CHECK:STDOUT: %.loc16_64.3: ref @GetNoDeduce.%T (%T) = tuple_access %.loc16_64.2, element0 -// CHECK:STDOUT: %.loc16_64.4: @GetNoDeduce.%T (%T) = bind_value %.loc16_64.3 -// CHECK:STDOUT: %.loc16_64.5: ref @GetNoDeduce.%T (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc16_64.6: init @GetNoDeduce.%T (%T) = initialize_from %.loc16_64.4 to %.loc16_64.5 -// CHECK:STDOUT: %.loc16_64.7: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %.loc16_64.2, element1 -// CHECK:STDOUT: %.loc16_64.8: @GetNoDeduce.%U.loc16_24.1 (%U) = bind_value %.loc16_64.7 -// CHECK:STDOUT: %.loc16_64.9: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc16_64.10: init @GetNoDeduce.%U.loc16_24.1 (%U) = initialize_from %.loc16_64.8 to %.loc16_64.9 -// CHECK:STDOUT: %.loc16_64.11: init @GetNoDeduce.%tuple.type (%tuple.type.2) = tuple_init (%.loc16_64.6, %.loc16_64.10) to %return -// CHECK:STDOUT: %.loc16_70: init @GetNoDeduce.%tuple.type (%tuple.type.2) = converted %GetNoDeduce.call, %.loc16_64.11 +// CHECK:STDOUT: %.loc16_69.1: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = temporary_storage +// CHECK:STDOUT: %GetNoDeduce.call: init @GetNoDeduce.%tuple.type (%tuple.type.2) = call %.loc16_53.2(%x.ref) to %.loc16_69.1 +// CHECK:STDOUT: %.loc16_69.2: ref @GetNoDeduce.%tuple.type (%tuple.type.2) = temporary %.loc16_69.1, %GetNoDeduce.call +// CHECK:STDOUT: %.loc16_69.3: ref @GetNoDeduce.%T (%T) = tuple_access %.loc16_69.2, element0 +// CHECK:STDOUT: %.loc16_69.4: @GetNoDeduce.%T (%T) = bind_value %.loc16_69.3 +// CHECK:STDOUT: %.loc16_69.5: ref @GetNoDeduce.%T (%T) = tuple_access %return, element0 +// CHECK:STDOUT: %.loc16_69.6: init @GetNoDeduce.%T (%T) = initialize_from %.loc16_69.4 to %.loc16_69.5 +// CHECK:STDOUT: %.loc16_69.7: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %.loc16_69.2, element1 +// CHECK:STDOUT: %.loc16_69.8: @GetNoDeduce.%U.loc16_24.1 (%U) = bind_value %.loc16_69.7 +// CHECK:STDOUT: %.loc16_69.9: ref @GetNoDeduce.%U.loc16_24.1 (%U) = tuple_access %return, element1 +// CHECK:STDOUT: %.loc16_69.10: init @GetNoDeduce.%U.loc16_24.1 (%U) = initialize_from %.loc16_69.8 to %.loc16_69.9 +// CHECK:STDOUT: %.loc16_69.11: init @GetNoDeduce.%tuple.type (%tuple.type.2) = tuple_init (%.loc16_69.6, %.loc16_69.10) to %return +// CHECK:STDOUT: %.loc16_70: init @GetNoDeduce.%tuple.type (%tuple.type.2) = converted %GetNoDeduce.call, %.loc16_69.11 // CHECK:STDOUT: return %.loc16_70 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/generic/self.carbon b/toolchain/check/testdata/class/generic/self.carbon index ba0315cd8e132..50fd35c491b92 100644 --- a/toolchain/check/testdata/class/generic/self.carbon +++ b/toolchain/check/testdata/class/generic/self.carbon @@ -85,14 +85,14 @@ class Class(T:! type) { // CHECK:STDOUT: %return: ref @MakeSelf.%Class (%Class.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %MakeClass.decl: @Class.%MakeClass.type (%MakeClass.type) = fn_decl @MakeClass [symbolic = @Class.%MakeClass (constants.%MakeClass)] { -// CHECK:STDOUT: %return.patt: @MakeClass.%Class.loc15_26.1 (%Class.2) = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: @MakeClass.%Class.loc15_26.1 (%Class.2) = out_param_pattern %return.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: @MakeClass.%Class.loc15_28.1 (%Class.2) = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: @MakeClass.%Class.loc15_28.1 (%Class.2) = out_param_pattern %return.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc15_26.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc15_26.1 (constants.%Class.2)] -// CHECK:STDOUT: %return.param: ref @MakeClass.%Class.loc15_26.1 (%Class.2) = out_param runtime_param0 -// CHECK:STDOUT: %return: ref @MakeClass.%Class.loc15_26.1 (%Class.2) = return_slot %return.param +// CHECK:STDOUT: %Class.loc15_28.2: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc15_28.1 (constants.%Class.2)] +// CHECK:STDOUT: %return.param: ref @MakeClass.%Class.loc15_28.1 (%Class.2) = out_param runtime_param0 +// CHECK:STDOUT: %return: ref @MakeClass.%Class.loc15_28.1 (%Class.2) = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: @Class.%F.type (%F.type) = fn_decl @F [symbolic = @Class.%F (constants.%F)] {} {} // CHECK:STDOUT: %.loc20: = complete_type_witness %.1 [template = constants.%.2] @@ -124,16 +124,16 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @MakeClass(@Class.%T.loc11_13.1: type) { // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc15_26.1: type = class_type @Class, @Class(%T) [symbolic = %Class.loc15_26.1 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc15_28.1: type = class_type @Class, @Class(%T) [symbolic = %Class.loc15_28.1 (constants.%Class.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %struct: @MakeClass.%Class.loc15_26.1 (%Class.2) = struct_value () [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %struct: @MakeClass.%Class.loc15_28.1 (%Class.2) = struct_value () [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: -// CHECK:STDOUT: fn() -> %return: @MakeClass.%Class.loc15_26.1 (%Class.2) { +// CHECK:STDOUT: fn() -> %return: @MakeClass.%Class.loc15_28.1 (%Class.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc15_40.1: %.1 = struct_literal () -// CHECK:STDOUT: %.loc15_40.2: init @MakeClass.%Class.loc15_26.1 (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] -// CHECK:STDOUT: %.loc15_41: init @MakeClass.%Class.loc15_26.1 (%Class.2) = converted %.loc15_40.1, %.loc15_40.2 [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %.loc15_40.2: init @MakeClass.%Class.loc15_28.1 (%Class.2) = class_init (), %return [symbolic = %struct (constants.%struct)] +// CHECK:STDOUT: %.loc15_41: init @MakeClass.%Class.loc15_28.1 (%Class.2) = converted %.loc15_40.1, %.loc15_40.2 [symbolic = %struct (constants.%struct)] // CHECK:STDOUT: return %.loc15_41 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -141,7 +141,7 @@ 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_17.2: type = class_type @Class, @Class(%T) [symbolic = %Class.loc17_17.2 (constants.%Class.2)] +// CHECK:STDOUT: %Class.loc17_19.2: type = class_type @Class, @Class(%T) [symbolic = %Class.loc17_19.2 (constants.%Class.2)] // 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: %.loc17_23.3: = specific_function %MakeSelf, @MakeSelf(%T) [symbolic = %.loc17_23.3 (constants.%.4)] @@ -153,24 +153,24 @@ class Class(T:! type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Class.ref: %Class.type = name_ref Class, file.%Class.decl [template = constants.%Class.1] // CHECK:STDOUT: %T.ref: type = name_ref T, @Class.%T.loc11_13.1 [symbolic = %T (constants.%T)] -// CHECK:STDOUT: %Class.loc17_17.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc17_17.2 (constants.%Class.2)] -// CHECK:STDOUT: %c.var: ref @F.%Class.loc17_17.2 (%Class.2) = var c -// CHECK:STDOUT: %c: ref @F.%Class.loc17_17.2 (%Class.2) = bind_name c, %c.var +// CHECK:STDOUT: %Class.loc17_19.1: type = class_type @Class, @Class(constants.%T) [symbolic = %Class.loc17_19.2 (constants.%Class.2)] +// CHECK:STDOUT: %c.var: ref @F.%Class.loc17_19.2 (%Class.2) = var c +// CHECK:STDOUT: %c: ref @F.%Class.loc17_19.2 (%Class.2) = bind_name c, %c.var // CHECK:STDOUT: %.loc17_23.1: @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.1 [symbolic = %MakeSelf (constants.%MakeSelf)] // CHECK:STDOUT: %.loc17_23.2: = specific_function %MakeSelf.ref, @MakeSelf(constants.%T) [symbolic = %.loc17_23.3 (constants.%.4)] -// CHECK:STDOUT: %.loc17_9: ref @F.%Class.loc17_17.2 (%Class.2) = splice_block %c.var {} -// CHECK:STDOUT: %MakeSelf.call: init @F.%Class.loc17_17.2 (%Class.2) = call %.loc17_23.2() to %.loc17_9 +// CHECK:STDOUT: %.loc17_9: ref @F.%Class.loc17_19.2 (%Class.2) = splice_block %c.var {} +// CHECK:STDOUT: %MakeSelf.call: init @F.%Class.loc17_19.2 (%Class.2) = call %.loc17_23.2() to %.loc17_9 // CHECK:STDOUT: assign %c.var, %MakeSelf.call -// CHECK:STDOUT: %.loc18_12: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class.loc17_17.2 (constants.%Class.2)] -// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_12 [symbolic = %Class.loc17_17.2 (constants.%Class.2)] -// CHECK:STDOUT: %s.var: ref @F.%Class.loc17_17.2 (%Class.2) = var s -// CHECK:STDOUT: %s: ref @F.%Class.loc17_17.2 (%Class.2) = bind_name s, %s.var +// CHECK:STDOUT: %.loc18_12: type = specific_constant constants.%Class.2, @Class(constants.%T) [symbolic = %Class.loc17_19.2 (constants.%Class.2)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, %.loc18_12 [symbolic = %Class.loc17_19.2 (constants.%Class.2)] +// CHECK:STDOUT: %s.var: ref @F.%Class.loc17_19.2 (%Class.2) = var s +// CHECK:STDOUT: %s: ref @F.%Class.loc17_19.2 (%Class.2) = bind_name s, %s.var // CHECK:STDOUT: %.loc18_19.1: @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.1 [symbolic = %MakeClass (constants.%MakeClass)] // CHECK:STDOUT: %.loc18_19.2: = specific_function %MakeClass.ref, @MakeClass(constants.%T) [symbolic = %.loc18_19.3 (constants.%.5)] -// CHECK:STDOUT: %.loc18_9: ref @F.%Class.loc17_17.2 (%Class.2) = splice_block %s.var {} -// CHECK:STDOUT: %MakeClass.call: init @F.%Class.loc17_17.2 (%Class.2) = call %.loc18_19.2() to %.loc18_9 +// CHECK:STDOUT: %.loc18_9: ref @F.%Class.loc17_19.2 (%Class.2) = splice_block %s.var {} +// CHECK:STDOUT: %MakeClass.call: init @F.%Class.loc17_19.2 (%Class.2) = call %.loc18_19.2() to %.loc18_9 // CHECK:STDOUT: assign %s.var, %MakeClass.call // CHECK:STDOUT: return // CHECK:STDOUT: } @@ -209,7 +209,7 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @MakeClass(constants.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class.loc15_26.1 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc15_28.1 => constants.%Class.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %struct => constants.%struct @@ -234,6 +234,6 @@ class Class(T:! type) { // CHECK:STDOUT: // CHECK:STDOUT: specific @MakeClass(@F.%T) { // CHECK:STDOUT: %T => constants.%T -// CHECK:STDOUT: %Class.loc15_26.1 => constants.%Class.2 +// CHECK:STDOUT: %Class.loc15_28.1 => constants.%Class.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 4520149cafee7..61745ebb7a236 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -464,8 +464,8 @@ class B { // CHECK:STDOUT: %self.ref: %C = name_ref self, %self // CHECK:STDOUT: %F.ref: %F.type.1 = name_ref F, @A.%F.decl [template = constants.%F.1] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() -// CHECK:STDOUT: %.loc15_43.1: ref %empty_tuple.type = temporary_storage -// CHECK:STDOUT: %.loc15_43.2: ref %empty_tuple.type = temporary %.loc15_43.1, %F.call +// CHECK:STDOUT: %.loc15_44.1: ref %empty_tuple.type = temporary_storage +// CHECK:STDOUT: %.loc15_44.2: ref %empty_tuple.type = temporary %.loc15_44.1, %F.call // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc15_45: %empty_tuple.type = converted %F.call, %tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc15_45 diff --git a/toolchain/check/testdata/class/init_adapt.carbon b/toolchain/check/testdata/class/init_adapt.carbon index 3571b044084ac..c2e8735dc7dd8 100644 --- a/toolchain/check/testdata/class/init_adapt.carbon +++ b/toolchain/check/testdata/class/init_adapt.carbon @@ -411,13 +411,13 @@ var e: C = MakeAdaptC(); // CHECK:STDOUT: %.loc33: %C = converted %b.ref, [template = ] // CHECK:STDOUT: %c: %C = bind_name c, // CHECK:STDOUT: %MakeC.ref: %MakeC.type = name_ref MakeC, file.%MakeC.decl [template = constants.%MakeC] -// CHECK:STDOUT: %.loc46_22: ref %C = temporary_storage -// CHECK:STDOUT: %MakeC.call: init %C = call %MakeC.ref() to %.loc46_22 +// CHECK:STDOUT: %.loc46_23: ref %C = temporary_storage +// CHECK:STDOUT: %MakeC.call: init %C = call %MakeC.ref() to %.loc46_23 // CHECK:STDOUT: %.loc46_24: %AdaptC = converted %MakeC.call, [template = ] // CHECK:STDOUT: assign file.%d.var, // CHECK:STDOUT: %MakeAdaptC.ref: %MakeAdaptC.type = name_ref MakeAdaptC, file.%MakeAdaptC.decl [template = constants.%MakeAdaptC] -// CHECK:STDOUT: %.loc54_22: ref %AdaptC = temporary_storage -// CHECK:STDOUT: %MakeAdaptC.call: init %AdaptC = call %MakeAdaptC.ref() to %.loc54_22 +// CHECK:STDOUT: %.loc54_23: ref %AdaptC = temporary_storage +// CHECK:STDOUT: %MakeAdaptC.call: init %AdaptC = call %MakeAdaptC.ref() to %.loc54_23 // CHECK:STDOUT: %.loc54_24: %C = converted %MakeAdaptC.call, [template = ] // CHECK:STDOUT: assign file.%e.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/class/init_nested.carbon b/toolchain/check/testdata/class/init_nested.carbon index f8fb860c2488f..fb03e7038e8e4 100644 --- a/toolchain/check/testdata/class/init_nested.carbon +++ b/toolchain/check/testdata/class/init_nested.carbon @@ -122,12 +122,12 @@ fn MakeOuter() -> Outer { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %MakeInner.ref.loc24_16: %MakeInner.type = name_ref MakeInner, file.%MakeInner.decl [template = constants.%MakeInner] // CHECK:STDOUT: %.loc24_45.1: ref %Inner = class_element_access %return, element0 -// CHECK:STDOUT: %MakeInner.call.loc24_25: init %Inner = call %MakeInner.ref.loc24_16() to %.loc24_45.1 +// CHECK:STDOUT: %MakeInner.call.loc24_26: init %Inner = call %MakeInner.ref.loc24_16() to %.loc24_45.1 // CHECK:STDOUT: %MakeInner.ref.loc24_34: %MakeInner.type = name_ref MakeInner, file.%MakeInner.decl [template = constants.%MakeInner] // CHECK:STDOUT: %.loc24_45.2: ref %Inner = class_element_access %return, element1 -// CHECK:STDOUT: %MakeInner.call.loc24_43: init %Inner = call %MakeInner.ref.loc24_34() to %.loc24_45.2 -// CHECK:STDOUT: %.loc24_45.3: %.7 = struct_literal (%MakeInner.call.loc24_25, %MakeInner.call.loc24_43) -// CHECK:STDOUT: %.loc24_45.4: init %Outer = class_init (%MakeInner.call.loc24_25, %MakeInner.call.loc24_43), %return +// CHECK:STDOUT: %MakeInner.call.loc24_44: init %Inner = call %MakeInner.ref.loc24_34() to %.loc24_45.2 +// CHECK:STDOUT: %.loc24_45.3: %.7 = struct_literal (%MakeInner.call.loc24_26, %MakeInner.call.loc24_44) +// CHECK:STDOUT: %.loc24_45.4: init %Outer = class_init (%MakeInner.call.loc24_26, %MakeInner.call.loc24_44), %return // CHECK:STDOUT: %.loc24_46: init %Outer = converted %.loc24_45.3, %.loc24_45.4 // CHECK:STDOUT: return %.loc24_46 to %return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/class/method.carbon b/toolchain/check/testdata/class/method.carbon index 29099815ac34f..bb27361be6c08 100644 --- a/toolchain/check/testdata/class/method.carbon +++ b/toolchain/check/testdata/class/method.carbon @@ -422,13 +422,13 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: fn @CallFOnInitializingExpr() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] -// CHECK:STDOUT: %.loc54_14.1: ref %Class = temporary_storage -// CHECK:STDOUT: %Make.call: init %Class = call %Make.ref() to %.loc54_14.1 -// CHECK:STDOUT: %.loc54_14.2: ref %Class = temporary %.loc54_14.1, %Make.call +// CHECK:STDOUT: %.loc54_15.1: ref %Class = temporary_storage +// CHECK:STDOUT: %Make.call: init %Class = call %Make.ref() to %.loc54_15.1 +// CHECK:STDOUT: %.loc54_15.2: ref %Class = temporary %.loc54_15.1, %Make.call // CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc54_16: = bound_method %.loc54_14.2, %F.ref -// CHECK:STDOUT: %.loc54_14.3: %Class = bind_value %.loc54_14.2 -// CHECK:STDOUT: %F.call: init %i32 = call %.loc54_16(%.loc54_14.3) +// CHECK:STDOUT: %.loc54_16: = bound_method %.loc54_15.2, %F.ref +// CHECK:STDOUT: %.loc54_15.3: %Class = bind_value %.loc54_15.2 +// CHECK:STDOUT: %F.call: init %i32 = call %.loc54_16(%.loc54_15.3) // CHECK:STDOUT: %.loc54_20.1: %i32 = value_of_initializer %F.call // CHECK:STDOUT: %.loc54_20.2: %i32 = converted %F.call, %.loc54_20.1 // CHECK:STDOUT: return %.loc54_20.2 @@ -437,13 +437,13 @@ fn CallGOnInitializingExpr() -> i32 { // CHECK:STDOUT: fn @CallGOnInitializingExpr() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, file.%Make.decl [template = constants.%Make] -// CHECK:STDOUT: %.loc58_14.1: ref %Class = temporary_storage -// CHECK:STDOUT: %Make.call: init %Class = call %Make.ref() to %.loc58_14.1 -// CHECK:STDOUT: %.loc58_14.2: ref %Class = temporary %.loc58_14.1, %Make.call +// CHECK:STDOUT: %.loc58_15.1: ref %Class = temporary_storage +// CHECK:STDOUT: %Make.call: init %Class = call %Make.ref() to %.loc58_15.1 +// CHECK:STDOUT: %.loc58_15.2: ref %Class = temporary %.loc58_15.1, %Make.call // CHECK:STDOUT: %G.ref: %G.type = name_ref G, @Class.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc58_16: = bound_method %.loc58_14.2, %G.ref -// CHECK:STDOUT: %.loc58_14.3: %.2 = addr_of %.loc58_14.2 -// CHECK:STDOUT: %G.call: init %i32 = call %.loc58_16(%.loc58_14.3) +// CHECK:STDOUT: %.loc58_16: = bound_method %.loc58_15.2, %G.ref +// CHECK:STDOUT: %.loc58_15.3: %.2 = addr_of %.loc58_15.2 +// CHECK:STDOUT: %G.call: init %i32 = call %.loc58_16(%.loc58_15.3) // CHECK:STDOUT: %.loc58_20.1: %i32 = value_of_initializer %G.call // CHECK:STDOUT: %.loc58_20.2: %i32 = converted %G.call, %.loc58_20.1 // CHECK:STDOUT: return %.loc58_20.2 diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index 168978ba2c106..12e7a3fd7784b 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -91,12 +91,12 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc3: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc3_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc3_14.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc3_14.2: = bound_method %.loc3_15, %.loc3_14.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc3_14.3: = specific_function %.loc3_14.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc3: init %i32 = call %.loc3_14.3(%.loc3_15) [template = constants.%.31] -// CHECK:STDOUT: %.loc3_14.4: %i32 = value_of_initializer %int.convert_checked.loc3 [template = constants.%.31] -// CHECK:STDOUT: %.loc3_14.5: %i32 = converted %.loc3_15, %.loc3_14.4 [template = constants.%.31] +// CHECK:STDOUT: %.loc3_20.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc3_20.2: = bound_method %.loc3_15, %.loc3_20.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc3_20.3: = specific_function %.loc3_20.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc3: init %i32 = call %.loc3_20.3(%.loc3_15) [template = constants.%.31] +// CHECK:STDOUT: %.loc3_20.4: %i32 = value_of_initializer %int.convert_checked.loc3 [template = constants.%.31] +// CHECK:STDOUT: %.loc3_20.5: %i32 = converted %.loc3_15, %.loc3_20.4 [template = constants.%.31] // CHECK:STDOUT: %C.loc3: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] // CHECK:STDOUT: %b.param.loc3: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc3_9.1: %C.3 = bind_symbolic_name b, 0, %b.param.loc3 [symbolic = %b.loc3_9.2 (constants.%b)] @@ -107,12 +107,12 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref.loc4: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc4_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc4_14.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc4_14.2: = bound_method %.loc4_15, %.loc4_14.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc4_14.3: = specific_function %.loc4_14.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_14.3(%.loc4_15) [template = constants.%.31] -// CHECK:STDOUT: %.loc4_14.4: %i32 = value_of_initializer %int.convert_checked.loc4 [template = constants.%.31] -// CHECK:STDOUT: %.loc4_14.5: %i32 = converted %.loc4_15, %.loc4_14.4 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_20.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc4_20.2: = bound_method %.loc4_15, %.loc4_20.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc4_20.3: = specific_function %.loc4_20.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked.loc4: init %i32 = call %.loc4_20.3(%.loc4_15) [template = constants.%.31] +// CHECK:STDOUT: %.loc4_20.4: %i32 = value_of_initializer %int.convert_checked.loc4 [template = constants.%.31] +// CHECK:STDOUT: %.loc4_20.5: %i32 = converted %.loc4_15, %.loc4_20.4 [template = constants.%.31] // CHECK:STDOUT: %C.loc4: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] // CHECK:STDOUT: %b.param.loc4: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc4: %C.3 = bind_symbolic_name b, 0, %b.param.loc4 [symbolic = constants.%b] @@ -229,12 +229,12 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc3_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc3_14.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc3_14.2: = bound_method %.loc3_15, %.loc3_14.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc3_14.3: = specific_function %.loc3_14.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc3_14.3(%.loc3_15) [template = constants.%.31] -// CHECK:STDOUT: %.loc3_14.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc3_14.5: %i32 = converted %.loc3_15, %.loc3_14.4 [template = constants.%.31] +// CHECK:STDOUT: %.loc3_19.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc3_19.2: = bound_method %.loc3_15, %.loc3_19.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc3_19.3: = specific_function %.loc3_19.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc3_19.3(%.loc3_15) [template = constants.%.31] +// CHECK:STDOUT: %.loc3_19.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] +// CHECK:STDOUT: %.loc3_19.5: %i32 = converted %.loc3_15, %.loc3_19.4 [template = constants.%.31] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] // CHECK:STDOUT: %b.param: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc3_9.1: %C.3 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc3_9.2 (constants.%b)] @@ -245,12 +245,12 @@ class D(b:! C(1_000)) {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc10_15: Core.IntLiteral = int_value 1000 [template = constants.%.4] -// CHECK:STDOUT: %.loc10_14.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc10_14.2: = bound_method %.loc10_15, %.loc10_14.1 [template = constants.%.29] -// CHECK:STDOUT: %.loc10_14.3: = specific_function %.loc10_14.2, @Convert.2(constants.%.1) [template = constants.%.30] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_14.3(%.loc10_15) [template = constants.%.31] -// CHECK:STDOUT: %.loc10_14.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] -// CHECK:STDOUT: %.loc10_14.5: %i32 = converted %.loc10_15, %.loc10_14.4 [template = constants.%.31] +// CHECK:STDOUT: %.loc10_20.1: %Convert.type.2 = interface_witness_access constants.%.28, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc10_20.2: = bound_method %.loc10_15, %.loc10_20.1 [template = constants.%.29] +// CHECK:STDOUT: %.loc10_20.3: = specific_function %.loc10_20.2, @Convert.2(constants.%.1) [template = constants.%.30] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_20.3(%.loc10_15) [template = constants.%.31] +// CHECK:STDOUT: %.loc10_20.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.31] +// CHECK:STDOUT: %.loc10_20.5: %i32 = converted %.loc10_15, %.loc10_20.4 [template = constants.%.31] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.31) [template = constants.%C.3] // CHECK:STDOUT: %b.param: %C.3 = value_param runtime_param // CHECK:STDOUT: %b.loc10_9.1: %C.3 = bind_symbolic_name b, 0, %b.param [symbolic = %b.loc10_9.2 (constants.%b)] diff --git a/toolchain/check/testdata/deduce/generic_type.carbon b/toolchain/check/testdata/deduce/generic_type.carbon index 00852b1647b3f..b7433279f3677 100644 --- a/toolchain/check/testdata/deduce/generic_type.carbon +++ b/toolchain/check/testdata/deduce/generic_type.carbon @@ -112,19 +112,19 @@ fn G() -> i32 { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc7_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_6.1, runtime_param [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%C.loc7_20.2 (%C.2) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%C.loc7_20.2 (%C.2) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%C.loc7_22.2 (%C.2) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%C.loc7_22.2 (%C.2) = value_param_pattern %p.patt, runtime_param0 // 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.1] // 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_20.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_20.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc7_22.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc7_22.2 (constants.%C.2)] // 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_20.2 (%C.2) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%C.loc7_20.2 (%C.2) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%C.loc7_22.2 (%C.2) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%C.loc7_22.2 (%C.2) = 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 // CHECK:STDOUT: } @@ -171,15 +171,15 @@ fn G() -> i32 { // CHECK:STDOUT: generic fn @F(%T.loc7_6.1: type) { // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc7_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %C.loc7_20.2: type = class_type @C, @C(%T.loc7_6.2) [symbolic = %C.loc7_20.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc7_22.2: type = class_type @C, @C(%T.loc7_6.2) [symbolic = %C.loc7_22.2 (constants.%C.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc7_39.2 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%C.loc7_20.2 (%C.2)) -> @F.%T.loc7_6.2 (%T) { +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%C.loc7_22.2 (%C.2)) -> @F.%T.loc7_6.2 (%T) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%C.loc7_20.2 (%C.2) = name_ref p, %p +// CHECK:STDOUT: %p.ref: @F.%C.loc7_22.2 (%C.2) = name_ref p, %p // CHECK:STDOUT: %.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_39.2 (constants.%.4)] // CHECK:STDOUT: %F.call: init @F.%T.loc7_6.2 (%T) = call %.loc7_39.1(%p.ref) // CHECK:STDOUT: %.loc7_43.1: @F.%T.loc7_6.2 (%T) = value_of_initializer %F.call @@ -213,7 +213,7 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T -// CHECK:STDOUT: %C.loc7_20.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc7_22.2 => constants.%C.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc7_39.2 => constants.%.4 @@ -222,7 +222,7 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(%T.loc7_6.2) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T -// CHECK:STDOUT: %C.loc7_20.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc7_22.2 => constants.%C.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%D) { @@ -235,7 +235,7 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%D) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%D // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%D -// CHECK:STDOUT: %C.loc7_20.2 => constants.%C.3 +// CHECK:STDOUT: %C.loc7_22.2 => constants.%C.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc7_39.2 => constants.%.5 @@ -288,19 +288,19 @@ fn G() -> i32 { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %T.patt.loc7_6.1: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc7_6.1, runtime_param [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %p.patt: @F.%I.loc7_20.2 (%I.2) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%I.loc7_20.2 (%I.2) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%I.loc7_22.2 (%I.2) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%I.loc7_22.2 (%I.2) = value_param_pattern %p.patt, runtime_param0 // 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.1] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_6.1 [symbolic = %T.loc7_6.2 (constants.%T)] -// CHECK:STDOUT: %I.loc7_20.1: type = class_type @I, @I(constants.%T) [symbolic = %I.loc7_20.2 (constants.%I.2)] +// CHECK:STDOUT: %I.loc7_22.1: type = class_type @I, @I(constants.%T) [symbolic = %I.loc7_22.2 (constants.%I.2)] // 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_20.2 (%I.2) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%I.loc7_20.2 (%I.2) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%I.loc7_22.2 (%I.2) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%I.loc7_22.2 (%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 // CHECK:STDOUT: } @@ -347,15 +347,15 @@ fn G() -> i32 { // CHECK:STDOUT: generic fn @F(%T.loc7_6.1: type) { // CHECK:STDOUT: %T.loc7_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_6.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc7_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_6.2 (constants.%T.patt)] -// CHECK:STDOUT: %I.loc7_20.2: type = class_type @I, @I(%T.loc7_6.2) [symbolic = %I.loc7_20.2 (constants.%I.2)] +// CHECK:STDOUT: %I.loc7_22.2: type = class_type @I, @I(%T.loc7_6.2) [symbolic = %I.loc7_22.2 (constants.%I.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc7_39.2: = specific_function constants.%F, @F(%T.loc7_6.2) [symbolic = %.loc7_39.2 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%I.loc7_20.2 (%I.2)) -> %return: %C { +// CHECK:STDOUT: fn[%T.param_patt: type](%p.param_patt: @F.%I.loc7_22.2 (%I.2)) -> %return: %C { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%I.loc7_20.2 (%I.2) = name_ref p, %p +// CHECK:STDOUT: %p.ref: @F.%I.loc7_22.2 (%I.2) = name_ref p, %p // CHECK:STDOUT: %.loc7_39.1: = specific_function %F.ref, @F(constants.%T) [symbolic = %.loc7_39.2 (constants.%.4)] // CHECK:STDOUT: %.loc7_25.2: ref %C = splice_block %return {} // CHECK:STDOUT: %F.call: init %C = call %.loc7_39.1(%p.ref) to %.loc7_25.2 @@ -388,7 +388,7 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%T) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T -// CHECK:STDOUT: %I.loc7_20.2 => constants.%I.2 +// CHECK:STDOUT: %I.loc7_22.2 => constants.%I.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc7_39.2 => constants.%.4 @@ -397,7 +397,7 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(%T.loc7_6.2) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%T -// CHECK:STDOUT: %I.loc7_20.2 => constants.%I.2 +// CHECK:STDOUT: %I.loc7_22.2 => constants.%I.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%C) { @@ -410,7 +410,7 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%C) { // CHECK:STDOUT: %T.loc7_6.2 => constants.%C // CHECK:STDOUT: %T.patt.loc7_6.2 => constants.%C -// CHECK:STDOUT: %I.loc7_20.2 => constants.%I.3 +// CHECK:STDOUT: %I.loc7_22.2 => constants.%I.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc7_39.2 => constants.%.5 @@ -479,18 +479,18 @@ fn G() -> i32 { // CHECK:STDOUT: %T.param_patt: type = value_param_pattern %T.patt.loc13_6.1, runtime_param [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.patt.loc13_16.1: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] // CHECK:STDOUT: %U.param_patt: type = value_param_pattern %U.patt.loc13_16.1, runtime_param [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %p.patt: @F.%Inner.loc13_43.2 (%Inner.2) = binding_pattern p -// CHECK:STDOUT: %p.param_patt: @F.%Inner.loc13_43.2 (%Inner.2) = value_param_pattern %p.patt, runtime_param0 +// CHECK:STDOUT: %p.patt: @F.%Inner.loc13_45.2 (%Inner.2) = binding_pattern p +// CHECK:STDOUT: %p.param_patt: @F.%Inner.loc13_45.2 (%Inner.2) = value_param_pattern %p.patt, runtime_param0 // 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.1] // 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_34.1: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc13_34.2 (constants.%Outer.2)] +// CHECK:STDOUT: %Outer.loc13_36.1: type = class_type @Outer, @Outer(constants.%T) [symbolic = %Outer.loc13_36.2 (constants.%Outer.2)] // CHECK:STDOUT: %.loc13_37: @F.%Inner.type (%Inner.type.1) = specific_constant @Outer.%Inner.decl, @Outer(constants.%T) [symbolic = %Inner.loc13_37 (constants.%Inner.1)] // CHECK:STDOUT: %Inner.ref: @F.%Inner.type (%Inner.type.1) = name_ref Inner, %.loc13_37 [symbolic = %Inner.loc13_37 (constants.%Inner.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_43.1: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_43.2 (constants.%Inner.2)] +// CHECK:STDOUT: %Inner.loc13_45.1: type = class_type @Inner, @Inner(constants.%T, constants.%U) [symbolic = %Inner.loc13_45.2 (constants.%Inner.2)] // 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) @@ -499,8 +499,8 @@ fn G() -> i32 { // CHECK:STDOUT: %T.loc13_6.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc13_6.2 (constants.%T)] // 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_43.2 (%Inner.2) = value_param runtime_param0 -// CHECK:STDOUT: %p: @F.%Inner.loc13_43.2 (%Inner.2) = bind_name p, %p.param +// CHECK:STDOUT: %p.param: @F.%Inner.loc13_45.2 (%Inner.2) = value_param runtime_param0 +// CHECK:STDOUT: %p: @F.%Inner.loc13_45.2 (%Inner.2) = 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 // CHECK:STDOUT: } @@ -589,33 +589,33 @@ fn G() -> i32 { // CHECK:STDOUT: %T.patt.loc13_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc13_6.2 (constants.%T.patt)] // CHECK:STDOUT: %U.loc13_16.2: type = bind_symbolic_name U, 1 [symbolic = %U.loc13_16.2 (constants.%U)] // CHECK:STDOUT: %U.patt.loc13_16.2: type = symbolic_binding_pattern U, 1 [symbolic = %U.patt.loc13_16.2 (constants.%U.patt)] -// CHECK:STDOUT: %Outer.loc13_34.2: type = class_type @Outer, @Outer(%T.loc13_6.2) [symbolic = %Outer.loc13_34.2 (constants.%Outer.2)] +// CHECK:STDOUT: %Outer.loc13_36.2: type = class_type @Outer, @Outer(%T.loc13_6.2) [symbolic = %Outer.loc13_36.2 (constants.%Outer.2)] // CHECK:STDOUT: %Inner.type: type = generic_class_type @Inner, @Outer(%T.loc13_6.2) [symbolic = %Inner.type (constants.%Inner.type.1)] // CHECK:STDOUT: %Inner.loc13_37: @F.%Inner.type (%Inner.type.1) = struct_value () [symbolic = %Inner.loc13_37 (constants.%Inner.1)] -// CHECK:STDOUT: %Inner.loc13_43.2: type = class_type @Inner, @Inner(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %Inner.loc13_43.2 (constants.%Inner.2)] +// CHECK:STDOUT: %Inner.loc13_45.2: type = class_type @Inner, @Inner(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %Inner.loc13_45.2 (constants.%Inner.2)] // CHECK:STDOUT: %tuple.type: type = tuple_type (@F.%T.loc13_6.2 (%T), @F.%U.loc13_16.2 (%U)) [symbolic = %tuple.type (constants.%tuple.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc13_67.2: = specific_function constants.%F, @F(%T.loc13_6.2, %U.loc13_16.2) [symbolic = %.loc13_67.2 (constants.%.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%T.param_patt: type, %U.param_patt: type](%p.param_patt: @F.%Inner.loc13_43.2 (%Inner.2)) -> %return: @F.%tuple.type (%tuple.type.2) { +// CHECK:STDOUT: fn[%T.param_patt: type, %U.param_patt: type](%p.param_patt: @F.%Inner.loc13_45.2 (%Inner.2)) -> %return: @F.%tuple.type (%tuple.type.2) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %p.ref: @F.%Inner.loc13_43.2 (%Inner.2) = name_ref p, %p +// CHECK:STDOUT: %p.ref: @F.%Inner.loc13_45.2 (%Inner.2) = name_ref p, %p // CHECK:STDOUT: %.loc13_67.1: = specific_function %F.ref, @F(constants.%T, constants.%U) [symbolic = %.loc13_67.2 (constants.%.5)] -// CHECK:STDOUT: %.loc13_68.1: ref @F.%tuple.type (%tuple.type.2) = temporary_storage -// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.2) = call %.loc13_67.1(%p.ref) to %.loc13_68.1 -// CHECK:STDOUT: %.loc13_68.2: ref @F.%tuple.type (%tuple.type.2) = temporary %.loc13_68.1, %F.call -// CHECK:STDOUT: %.loc13_68.3: ref @F.%T.loc13_6.2 (%T) = tuple_access %.loc13_68.2, element0 -// CHECK:STDOUT: %.loc13_68.4: @F.%T.loc13_6.2 (%T) = bind_value %.loc13_68.3 -// CHECK:STDOUT: %.loc13_68.5: ref @F.%T.loc13_6.2 (%T) = tuple_access %return, element0 -// CHECK:STDOUT: %.loc13_68.6: init @F.%T.loc13_6.2 (%T) = initialize_from %.loc13_68.4 to %.loc13_68.5 -// CHECK:STDOUT: %.loc13_68.7: ref @F.%U.loc13_16.2 (%U) = tuple_access %.loc13_68.2, element1 -// CHECK:STDOUT: %.loc13_68.8: @F.%U.loc13_16.2 (%U) = bind_value %.loc13_68.7 -// CHECK:STDOUT: %.loc13_68.9: ref @F.%U.loc13_16.2 (%U) = tuple_access %return, element1 -// CHECK:STDOUT: %.loc13_68.10: init @F.%U.loc13_16.2 (%U) = initialize_from %.loc13_68.8 to %.loc13_68.9 -// CHECK:STDOUT: %.loc13_68.11: init @F.%tuple.type (%tuple.type.2) = tuple_init (%.loc13_68.6, %.loc13_68.10) to %return -// CHECK:STDOUT: %.loc13_71: init @F.%tuple.type (%tuple.type.2) = converted %F.call, %.loc13_68.11 +// CHECK:STDOUT: %.loc13_70.1: ref @F.%tuple.type (%tuple.type.2) = temporary_storage +// CHECK:STDOUT: %F.call: init @F.%tuple.type (%tuple.type.2) = call %.loc13_67.1(%p.ref) to %.loc13_70.1 +// CHECK:STDOUT: %.loc13_70.2: ref @F.%tuple.type (%tuple.type.2) = temporary %.loc13_70.1, %F.call +// CHECK:STDOUT: %.loc13_70.3: ref @F.%T.loc13_6.2 (%T) = tuple_access %.loc13_70.2, element0 +// CHECK:STDOUT: %.loc13_70.4: @F.%T.loc13_6.2 (%T) = bind_value %.loc13_70.3 +// CHECK:STDOUT: %.loc13_70.5: ref @F.%T.loc13_6.2 (%T) = tuple_access %return, element0 +// CHECK:STDOUT: %.loc13_70.6: init @F.%T.loc13_6.2 (%T) = initialize_from %.loc13_70.4 to %.loc13_70.5 +// CHECK:STDOUT: %.loc13_70.7: ref @F.%U.loc13_16.2 (%U) = tuple_access %.loc13_70.2, element1 +// CHECK:STDOUT: %.loc13_70.8: @F.%U.loc13_16.2 (%U) = bind_value %.loc13_70.7 +// CHECK:STDOUT: %.loc13_70.9: ref @F.%U.loc13_16.2 (%U) = tuple_access %return, element1 +// CHECK:STDOUT: %.loc13_70.10: init @F.%U.loc13_16.2 (%U) = initialize_from %.loc13_70.8 to %.loc13_70.9 +// CHECK:STDOUT: %.loc13_70.11: init @F.%tuple.type (%tuple.type.2) = tuple_init (%.loc13_70.6, %.loc13_70.10) to %return +// CHECK:STDOUT: %.loc13_71: init @F.%tuple.type (%tuple.type.2) = converted %F.call, %.loc13_70.11 // CHECK:STDOUT: return %.loc13_71 to %return // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -666,10 +666,10 @@ fn G() -> i32 { // CHECK:STDOUT: %T.patt.loc13_6.2 => constants.%T // CHECK:STDOUT: %U.loc13_16.2 => constants.%U // CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%U -// CHECK:STDOUT: %Outer.loc13_34.2 => constants.%Outer.2 +// CHECK:STDOUT: %Outer.loc13_36.2 => constants.%Outer.2 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 // CHECK:STDOUT: %Inner.loc13_37 => constants.%Inner.1 -// CHECK:STDOUT: %Inner.loc13_43.2 => constants.%Inner.2 +// CHECK:STDOUT: %Inner.loc13_45.2 => constants.%Inner.2 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -681,10 +681,10 @@ fn G() -> i32 { // CHECK:STDOUT: %T.patt.loc13_6.2 => constants.%T // CHECK:STDOUT: %U.loc13_16.2 => constants.%U // CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%U -// CHECK:STDOUT: %Outer.loc13_34.2 => constants.%Outer.2 +// CHECK:STDOUT: %Outer.loc13_36.2 => constants.%Outer.2 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.1 // CHECK:STDOUT: %Inner.loc13_37 => constants.%Inner.1 -// CHECK:STDOUT: %Inner.loc13_43.2 => constants.%Inner.2 +// CHECK:STDOUT: %Inner.loc13_45.2 => constants.%Inner.2 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -709,10 +709,10 @@ fn G() -> i32 { // CHECK:STDOUT: %T.patt.loc13_6.2 => constants.%C // CHECK:STDOUT: %U.loc13_16.2 => constants.%D // CHECK:STDOUT: %U.patt.loc13_16.2 => constants.%D -// CHECK:STDOUT: %Outer.loc13_34.2 => constants.%Outer.3 +// CHECK:STDOUT: %Outer.loc13_36.2 => constants.%Outer.3 // CHECK:STDOUT: %Inner.type => constants.%Inner.type.2 // CHECK:STDOUT: %Inner.loc13_37 => constants.%Inner.3 -// CHECK:STDOUT: %Inner.loc13_43.2 => constants.%Inner.4 +// CHECK:STDOUT: %Inner.loc13_45.2 => constants.%Inner.4 // CHECK:STDOUT: %tuple.type => constants.%tuple.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: @@ -781,8 +781,8 @@ fn G() -> i32 { // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { // CHECK:STDOUT: %N.patt.loc6_6.1: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.1)] // CHECK:STDOUT: %N.param_patt: %i32 = value_param_pattern %N.patt.loc6_6.1, runtime_param [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %x.patt: @F.%WithNontype.loc6_29.2 (%WithNontype.2) = binding_pattern x -// CHECK:STDOUT: %x.param_patt: @F.%WithNontype.loc6_29.2 (%WithNontype.2) = value_param_pattern %x.patt, runtime_param0 +// CHECK:STDOUT: %x.patt: @F.%WithNontype.loc6_31.2 (%WithNontype.2) = binding_pattern x +// CHECK:STDOUT: %x.param_patt: @F.%WithNontype.loc6_31.2 (%WithNontype.2) = value_param_pattern %x.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: } { @@ -792,15 +792,15 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc6_10.3: type = converted %int.make_type_signed.loc6_10, %.loc6_10.2 [template = constants.%i32] // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.1] // CHECK:STDOUT: %N.ref.loc6_30: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.1)] -// CHECK:STDOUT: %WithNontype.loc6_29.1: type = class_type @WithNontype, @WithNontype(constants.%N.1) [symbolic = %WithNontype.loc6_29.2 (constants.%WithNontype.2)] +// CHECK:STDOUT: %WithNontype.loc6_31.1: type = class_type @WithNontype, @WithNontype(constants.%N.1) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.2)] // CHECK:STDOUT: %.loc6_37.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc6_37: init type = call constants.%Int(%.loc6_37.1) [template = constants.%i32] // CHECK:STDOUT: %.loc6_37.2: type = value_of_initializer %int.make_type_signed.loc6_37 [template = constants.%i32] // CHECK:STDOUT: %.loc6_37.3: type = converted %int.make_type_signed.loc6_37, %.loc6_37.2 [template = constants.%i32] // CHECK:STDOUT: %N.param: %i32 = value_param runtime_param // CHECK:STDOUT: %N.loc6_6.1: %i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc6_6.2 (constants.%N.1)] -// CHECK:STDOUT: %x.param: @F.%WithNontype.loc6_29.2 (%WithNontype.2) = value_param runtime_param0 -// CHECK:STDOUT: %x: @F.%WithNontype.loc6_29.2 (%WithNontype.2) = bind_name x, %x.param +// CHECK:STDOUT: %x.param: @F.%WithNontype.loc6_31.2 (%WithNontype.2) = value_param runtime_param0 +// CHECK:STDOUT: %x: @F.%WithNontype.loc6_31.2 (%WithNontype.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 // CHECK:STDOUT: } @@ -835,11 +835,11 @@ fn G() -> i32 { // CHECK:STDOUT: generic fn @F(%N.loc6_6.1: %i32) { // CHECK:STDOUT: %N.loc6_6.2: %i32 = bind_symbolic_name N, 0 [symbolic = %N.loc6_6.2 (constants.%N.1)] // CHECK:STDOUT: %N.patt.loc6_6.2: %i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc6_6.2 (constants.%N.patt.1)] -// CHECK:STDOUT: %WithNontype.loc6_29.2: type = class_type @WithNontype, @WithNontype(%N.loc6_6.2) [symbolic = %WithNontype.loc6_29.2 (constants.%WithNontype.2)] +// CHECK:STDOUT: %WithNontype.loc6_31.2: type = class_type @WithNontype, @WithNontype(%N.loc6_6.2) [symbolic = %WithNontype.loc6_31.2 (constants.%WithNontype.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%N.param_patt: %i32](%x.param_patt: @F.%WithNontype.loc6_29.2 (%WithNontype.2)) -> %i32 { +// CHECK:STDOUT: fn[%N.param_patt: %i32](%x.param_patt: @F.%WithNontype.loc6_31.2 (%WithNontype.2)) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %N.ref.loc6_50: %i32 = name_ref N, %N.loc6_6.1 [symbolic = %N.loc6_6.2 (constants.%N.1)] // CHECK:STDOUT: return %N.ref.loc6_50 @@ -852,12 +852,12 @@ fn G() -> i32 { // CHECK:STDOUT: %.loc9_13.1: %.2 = struct_literal () // CHECK:STDOUT: %WithNontype.ref: %WithNontype.type = name_ref WithNontype, file.%WithNontype.decl [template = constants.%WithNontype.1] // CHECK:STDOUT: %.loc9_30: Core.IntLiteral = int_value 0 [template = constants.%.5] -// CHECK:STDOUT: %.loc9_29.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] -// CHECK:STDOUT: %.loc9_29.2: = bound_method %.loc9_30, %.loc9_29.1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_29.3: = specific_function %.loc9_29.2, @Convert.2(constants.%.1) [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_29.3(%.loc9_30) [template = constants.%.32] -// CHECK:STDOUT: %.loc9_29.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc9_29.5: %i32 = converted %.loc9_30, %.loc9_29.4 [template = constants.%.32] +// CHECK:STDOUT: %.loc9_31.1: %Convert.type.2 = interface_witness_access constants.%.29, element0 [template = constants.%Convert.14] +// CHECK:STDOUT: %.loc9_31.2: = bound_method %.loc9_30, %.loc9_31.1 [template = constants.%.30] +// CHECK:STDOUT: %.loc9_31.3: = specific_function %.loc9_31.2, @Convert.2(constants.%.1) [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc9_31.3(%.loc9_30) [template = constants.%.32] +// CHECK:STDOUT: %.loc9_31.4: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] +// CHECK:STDOUT: %.loc9_31.5: %i32 = converted %.loc9_30, %.loc9_31.4 [template = constants.%.32] // CHECK:STDOUT: %WithNontype: type = class_type @WithNontype, @WithNontype(constants.%.32) [template = constants.%WithNontype.3] // CHECK:STDOUT: %.loc9_13.2: ref %WithNontype.3 = temporary_storage // CHECK:STDOUT: %.loc9_13.3: init %WithNontype.3 = class_init (), %.loc9_13.2 [template = constants.%struct] @@ -886,7 +886,7 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%N.1) { // CHECK:STDOUT: %N.loc6_6.2 => constants.%N.1 // CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%N.1 -// CHECK:STDOUT: %WithNontype.loc6_29.2 => constants.%WithNontype.2 +// CHECK:STDOUT: %WithNontype.loc6_31.2 => constants.%WithNontype.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @WithNontype(constants.%.32) { @@ -899,7 +899,7 @@ fn G() -> i32 { // CHECK:STDOUT: specific @F(constants.%.32) { // CHECK:STDOUT: %N.loc6_6.2 => constants.%.32 // CHECK:STDOUT: %N.patt.loc6_6.2 => constants.%.32 -// CHECK:STDOUT: %WithNontype.loc6_29.2 => constants.%WithNontype.3 +// CHECK:STDOUT: %WithNontype.loc6_31.2 => constants.%WithNontype.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index 48bd83fd74390..bd5d69faf06b7 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -83,9 +83,9 @@ fn G(a: f64) -> Core.IntLiteral() { // 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_25: init type = call %IntLiteral.ref.loc4_14() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_26.1: type = value_of_initializer %int_literal.make_type.loc4_25 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_26.2: type = converted %int_literal.make_type.loc4_25, %.loc4_26.1 [template = Core.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] // CHECK:STDOUT: %N.ref.loc4: Core.IntLiteral = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] @@ -94,9 +94,9 @@ fn G(a: f64) -> Core.IntLiteral() { // CHECK:STDOUT: %.loc4_42.2: type = converted %int.make_type_signed, %.loc4_42.1 [symbolic = %iN (constants.%iN)] // 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_63: init type = call %IntLiteral.ref.loc4_52() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_64.1: type = value_of_initializer %int_literal.make_type.loc4_63 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc4_64.2: type = converted %int_literal.make_type.loc4_63, %.loc4_64.1 [template = Core.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: %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.%iN (%iN) = value_param runtime_param0 @@ -209,9 +209,9 @@ fn G(a: f64) -> Core.IntLiteral() { // 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_25: init type = call %IntLiteral.ref.loc8_14() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_26.1: type = value_of_initializer %int_literal.make_type.loc8_25 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_26.2: type = converted %int_literal.make_type.loc8_25, %.loc8_26.1 [template = Core.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)] @@ -220,9 +220,9 @@ fn G(a: f64) -> Core.IntLiteral() { // 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_65: init type = call %IntLiteral.ref.loc8_54() [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_66.1: type = value_of_initializer %int_literal.make_type.loc8_65 [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc8_66.2: type = converted %int_literal.make_type.loc8_65, %.loc8_66.1 [template = Core.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: %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 diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index d226c75c86c2b..b8423b076e9c3 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -45,7 +45,7 @@ fn F[T:! type](pair: (T, T)) -> T; fn G(pair: (C, D)) -> D { // CHECK:STDERR: fail_inconsistent.carbon:[[@LINE+6]]:10: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent] // CHECK:STDERR: return F(pair); - // CHECK:STDERR: ^~ + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_inconsistent.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn F[T:! type](pair: (T, T)) -> T; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -295,8 +295,8 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %A.param_patt: %i32 = value_param_pattern %A.patt.loc6_6.1, runtime_param [symbolic = %A.patt.loc6_6.2 (constants.%A.patt)] // CHECK:STDOUT: %B.patt.loc6_15.1: %i32 = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc6_15.2 (constants.%B.patt)] // CHECK:STDOUT: %B.param_patt: %i32 = value_param_pattern %B.patt.loc6_15.1, runtime_param [symbolic = %B.patt.loc6_15.2 (constants.%B.patt)] -// CHECK:STDOUT: %h.patt: @F.%HasPair.loc6_34.2 (%HasPair.3) = binding_pattern h -// CHECK:STDOUT: %h.param_patt: @F.%HasPair.loc6_34.2 (%HasPair.3) = value_param_pattern %h.patt, runtime_param0 +// CHECK:STDOUT: %h.patt: @F.%HasPair.loc6_41.2 (%HasPair.3) = binding_pattern h +// CHECK:STDOUT: %h.param_patt: @F.%HasPair.loc6_41.2 (%HasPair.3) = value_param_pattern %h.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: } { @@ -313,8 +313,8 @@ fn G(pair: (C, D)) -> D { // 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_34: %tuple.type.2 = converted %.loc6_40, %tuple.loc6_40.1 [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] -// CHECK:STDOUT: %HasPair.loc6_34.1: type = class_type @HasPair, @HasPair(constants.%tuple.1) [symbolic = %HasPair.loc6_34.2 (constants.%HasPair.3)] +// 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.3)] // CHECK:STDOUT: %.loc6_47.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc6_47: init type = call constants.%Int(%.loc6_47.1) [template = constants.%i32] // CHECK:STDOUT: %.loc6_47.2: type = value_of_initializer %int.make_type_signed.loc6_47 [template = constants.%i32] @@ -323,8 +323,8 @@ fn G(pair: (C, D)) -> D { // 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: %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_34.2 (%HasPair.3) = value_param runtime_param0 -// CHECK:STDOUT: %h: @F.%HasPair.loc6_34.2 (%HasPair.3) = bind_name h, %h.param +// CHECK:STDOUT: %h.param: @F.%HasPair.loc6_41.2 (%HasPair.3) = value_param runtime_param0 +// CHECK:STDOUT: %h: @F.%HasPair.loc6_41.2 (%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 // CHECK:STDOUT: } @@ -351,7 +351,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %.loc8_22.10: %i32 = value_of_initializer %int.convert_checked.loc8_22.2 [template = constants.%.37] // CHECK:STDOUT: %.loc8_22.11: %i32 = converted %.loc8_21, %.loc8_22.10 [template = constants.%.37] // CHECK:STDOUT: %tuple: %tuple.type.2 = tuple_value (%.loc8_22.6, %.loc8_22.11) [template = constants.%tuple.2] -// CHECK:STDOUT: %.loc8_16: %tuple.type.2 = converted %.loc8_22.1, %tuple [template = constants.%tuple.2] +// CHECK:STDOUT: %.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.4] // CHECK:STDOUT: %.loc8_29.1: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_29.1) [template = constants.%i32] @@ -385,11 +385,11 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %B.loc6_15.2: %i32 = bind_symbolic_name B, 1 [symbolic = %B.loc6_15.2 (constants.%B)] // CHECK:STDOUT: %B.patt.loc6_15.2: %i32 = symbolic_binding_pattern B, 1 [symbolic = %B.patt.loc6_15.2 (constants.%B.patt)] // CHECK:STDOUT: %tuple.loc6_40.2: %tuple.type.2 = tuple_value (%A.loc6_6.2, %B.loc6_15.2) [symbolic = %tuple.loc6_40.2 (constants.%tuple.1)] -// CHECK:STDOUT: %HasPair.loc6_34.2: type = class_type @HasPair, @HasPair(%tuple.loc6_40.2) [symbolic = %HasPair.loc6_34.2 (constants.%HasPair.3)] +// CHECK:STDOUT: %HasPair.loc6_41.2: type = class_type @HasPair, @HasPair(%tuple.loc6_40.2) [symbolic = %HasPair.loc6_41.2 (constants.%HasPair.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%A.param_patt: %i32, %B.param_patt: %i32](%h.param_patt: @F.%HasPair.loc6_34.2 (%HasPair.3)) -> %i32 { +// CHECK:STDOUT: fn[%A.param_patt: %i32, %B.param_patt: %i32](%h.param_patt: @F.%HasPair.loc6_41.2 (%HasPair.3)) -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %B.ref.loc6_60: %i32 = name_ref B, %B.loc6_15.1 [symbolic = %B.loc6_15.2 (constants.%B)] // CHECK:STDOUT: return %B.ref.loc6_60 @@ -430,7 +430,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %B.loc6_15.2 => constants.%B // CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%B // CHECK:STDOUT: %tuple.loc6_40.2 => constants.%tuple.1 -// CHECK:STDOUT: %HasPair.loc6_34.2 => constants.%HasPair.3 +// CHECK:STDOUT: %HasPair.loc6_41.2 => constants.%HasPair.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasPair(constants.%tuple.2) { @@ -446,7 +446,7 @@ fn G(pair: (C, D)) -> D { // CHECK:STDOUT: %B.loc6_15.2 => constants.%.37 // CHECK:STDOUT: %B.patt.loc6_15.2 => constants.%.37 // CHECK:STDOUT: %tuple.loc6_40.2 => constants.%tuple.2 -// CHECK:STDOUT: %HasPair.loc6_34.2 => constants.%HasPair.4 +// CHECK:STDOUT: %HasPair.loc6_41.2 => constants.%HasPair.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index 49b323088a1cb..f21ffd8435b41 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -55,7 +55,7 @@ fn F[T:! type](p: const T*) -> T { return F(p); } fn G(p: C*) -> const C { // CHECK:STDERR: fail_const_from_nonconst.carbon:[[@LINE+6]]:10: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: return F(p); - // CHECK:STDERR: ^~ + // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_const_from_nonconst.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn F[T:! type](p: const T*) -> T { return F(p); } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 08f5cad1097e9..2a60c442dd636 100644 --- a/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon +++ b/toolchain/check/testdata/expr_category/in_place_tuple_init.carbon @@ -135,11 +135,11 @@ fn H() -> i32 { // CHECK:STDOUT: fn @H() -> %i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc20_11.1: ref %tuple.type.2 = temporary_storage -// CHECK:STDOUT: %G.call: init %tuple.type.2 = call %G.ref() to %.loc20_11.1 +// CHECK:STDOUT: %.loc20_12.1: ref %tuple.type.2 = temporary_storage +// CHECK:STDOUT: %G.call: init %tuple.type.2 = call %G.ref() to %.loc20_12.1 // CHECK:STDOUT: %.loc20_14: Core.IntLiteral = int_value 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc20_11.2: ref %tuple.type.2 = temporary %.loc20_11.1, %G.call -// CHECK:STDOUT: %.loc20_13.1: ref %i32 = tuple_access %.loc20_11.2, element0 +// CHECK:STDOUT: %.loc20_12.2: ref %tuple.type.2 = temporary %.loc20_12.1, %G.call +// CHECK:STDOUT: %.loc20_13.1: ref %i32 = tuple_access %.loc20_12.2, element0 // CHECK:STDOUT: %.loc20_13.2: %i32 = bind_value %.loc20_13.1 // CHECK:STDOUT: return %.loc20_13.2 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/call.carbon b/toolchain/check/testdata/function/builtin/call.carbon index 5a565eb51558f..a18d7d69fdf8b 100644 --- a/toolchain/check/testdata/function/builtin/call.carbon +++ b/toolchain/check/testdata/function/builtin/call.carbon @@ -107,15 +107,15 @@ var arr: [i32; Add(1, 2)]; // CHECK:STDOUT: %int.sadd: init %i32 = call %Add.ref(%.loc13_20.6, %.loc13_23.6) [template = constants.%.34] // CHECK:STDOUT: %.loc13_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc13_11.3: type = converted %int.make_type_signed, %.loc13_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc13_19.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] -// CHECK:STDOUT: %.loc13_19.2: = bound_method %int.sadd, %.loc13_19.1 [template = constants.%.36] -// CHECK:STDOUT: %.loc13_19.3: = specific_function %.loc13_19.2, @Convert.4(constants.%.1) [template = constants.%.37] -// CHECK:STDOUT: %.loc13_19.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] -// CHECK:STDOUT: %.loc13_19.5: %i32 = converted %int.sadd, %.loc13_19.4 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc13_19: init Core.IntLiteral = call %.loc13_19.3(%.loc13_19.5) [template = constants.%.38] -// CHECK:STDOUT: %.loc13_19.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc13_19 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_19.7: Core.IntLiteral = converted %int.sadd, %.loc13_19.6 [template = constants.%.38] -// CHECK:STDOUT: %.loc13_25: type = array_type %.loc13_19.7, %i32 [template = constants.%.39] +// CHECK:STDOUT: %.loc13_24.1: %Convert.type.6 = interface_witness_access constants.%.35, element0 [template = constants.%Convert.15] +// CHECK:STDOUT: %.loc13_24.2: = bound_method %int.sadd, %.loc13_24.1 [template = constants.%.36] +// CHECK:STDOUT: %.loc13_24.3: = specific_function %.loc13_24.2, @Convert.4(constants.%.1) [template = constants.%.37] +// CHECK:STDOUT: %.loc13_24.4: %i32 = value_of_initializer %int.sadd [template = constants.%.34] +// CHECK:STDOUT: %.loc13_24.5: %i32 = converted %int.sadd, %.loc13_24.4 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc13_24: init Core.IntLiteral = call %.loc13_24.3(%.loc13_24.5) [template = constants.%.38] +// CHECK:STDOUT: %.loc13_24.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc13_24 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_24.7: Core.IntLiteral = converted %int.sadd, %.loc13_24.6 [template = constants.%.38] +// CHECK:STDOUT: %.loc13_25: type = array_type %.loc13_24.7, %i32 [template = constants.%.39] // CHECK:STDOUT: %arr.var: ref %.39 = var arr // CHECK:STDOUT: %arr: ref %.39 = bind_name arr, %arr.var // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/builtin/method.carbon b/toolchain/check/testdata/function/builtin/method.carbon index a0f3618bd78b5..dec1a833344d5 100644 --- a/toolchain/check/testdata/function/builtin/method.carbon +++ b/toolchain/check/testdata/function/builtin/method.carbon @@ -116,15 +116,15 @@ var arr: [i32; (1 as i32).(I.F)(2)]; // CHECK:STDOUT: %int.sadd: init %i32 = call %.loc19_26.2(%.loc19_19.5, %.loc19_33.6) [template = constants.%.44] // CHECK:STDOUT: %.loc19_11.2: type = value_of_initializer %int.make_type_signed.loc19_11 [template = constants.%i32] // CHECK:STDOUT: %.loc19_11.3: type = converted %int.make_type_signed.loc19_11, %.loc19_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc19_32.1: %Convert.type.7 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.17] -// CHECK:STDOUT: %.loc19_32.2: = bound_method %int.sadd, %.loc19_32.1 [template = constants.%.46] -// CHECK:STDOUT: %.loc19_32.3: = specific_function %.loc19_32.2, @Convert.5(constants.%.4) [template = constants.%.47] -// CHECK:STDOUT: %.loc19_32.4: %i32 = value_of_initializer %int.sadd [template = constants.%.44] -// CHECK:STDOUT: %.loc19_32.5: %i32 = converted %int.sadd, %.loc19_32.4 [template = constants.%.44] -// CHECK:STDOUT: %int.convert_checked.loc19_32: init Core.IntLiteral = call %.loc19_32.3(%.loc19_32.5) [template = constants.%.48] -// CHECK:STDOUT: %.loc19_32.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_32 [template = constants.%.48] -// CHECK:STDOUT: %.loc19_32.7: Core.IntLiteral = converted %int.sadd, %.loc19_32.6 [template = constants.%.48] -// CHECK:STDOUT: %.loc19_35: type = array_type %.loc19_32.7, %i32 [template = constants.%.49] +// CHECK:STDOUT: %.loc19_34.1: %Convert.type.7 = interface_witness_access constants.%.45, element0 [template = constants.%Convert.17] +// CHECK:STDOUT: %.loc19_34.2: = bound_method %int.sadd, %.loc19_34.1 [template = constants.%.46] +// CHECK:STDOUT: %.loc19_34.3: = specific_function %.loc19_34.2, @Convert.5(constants.%.4) [template = constants.%.47] +// CHECK:STDOUT: %.loc19_34.4: %i32 = value_of_initializer %int.sadd [template = constants.%.44] +// CHECK:STDOUT: %.loc19_34.5: %i32 = converted %int.sadd, %.loc19_34.4 [template = constants.%.44] +// CHECK:STDOUT: %int.convert_checked.loc19_34: init Core.IntLiteral = call %.loc19_34.3(%.loc19_34.5) [template = constants.%.48] +// CHECK:STDOUT: %.loc19_34.6: Core.IntLiteral = value_of_initializer %int.convert_checked.loc19_34 [template = constants.%.48] +// CHECK:STDOUT: %.loc19_34.7: Core.IntLiteral = converted %int.sadd, %.loc19_34.6 [template = constants.%.48] +// CHECK:STDOUT: %.loc19_35: type = array_type %.loc19_34.7, %i32 [template = constants.%.49] // CHECK:STDOUT: %arr.var: ref %.49 = var arr // CHECK:STDOUT: %arr: ref %.49 = bind_name arr, %arr.var // CHECK:STDOUT: } 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 f2c841aaac431..78288993e0e2c 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 @@ -178,8 +178,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %As.ref: %As.type.1 = name_ref As, file.%As.decl [template = constants.%As] // CHECK:STDOUT: %.loc23_25: Core.IntLiteral = int_value 32 [template = constants.%.10] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc23_25) [template = constants.%i32] -// CHECK:STDOUT: %.loc23_24.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc23_24.2: type = converted %int.make_type_signed, %.loc23_24.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc23_28.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc23_28.2: type = converted %int.make_type_signed, %.loc23_28.1 [template = constants.%i32] // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32)> [template = constants.%As.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.3 [template] {} { @@ -190,8 +190,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs] // CHECK:STDOUT: %.loc27_33: Core.IntLiteral = int_value 32 [template = constants.%.10] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc27_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc27_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc27_32.2: type = converted %int.make_type_signed, %.loc27_32.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc27_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc27_36.2: type = converted %int.make_type_signed, %.loc27_36.1 [template = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: impl_decl @impl.4 [template] {} { @@ -202,8 +202,8 @@ var arr: [i32; (1 as i32) + (2 as i32)] = (3, 4, (3 as i32) + (4 as i32)); // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs] // 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_23.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] -// CHECK:STDOUT: %.loc31_23.2: type = converted %int_literal.make_type, %.loc31_23.1 [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc31_36.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral] +// CHECK:STDOUT: %.loc31_36.2: type = converted %int_literal.make_type, %.loc31_36.1 [template = Core.IntLiteral] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // 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 7e0c2e20975d4..513fc1c387428 100644 --- a/toolchain/check/testdata/function/builtin/no_prelude/import.carbon +++ b/toolchain/check/testdata/function/builtin/no_prelude/import.carbon @@ -204,24 +204,24 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // 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: %.loc4_58: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %int.convert_checked.loc4_57: init %i32 = call %AsI32.ref.loc4_51(%.loc4_58) [template = constants.%.3] +// CHECK:STDOUT: %int.convert_checked.loc4_59: init %i32 = call %AsI32.ref.loc4_51(%.loc4_58) [template = constants.%.3] // 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: %.loc4_73: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %int.convert_checked.loc4_72: init %i32 = call %AsI32.ref.loc4_66(%.loc4_73) [template = constants.%.5] -// CHECK:STDOUT: %.loc4_57.1: %i32 = value_of_initializer %int.convert_checked.loc4_57 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_57.2: %i32 = converted %int.convert_checked.loc4_57, %.loc4_57.1 [template = constants.%.3] -// CHECK:STDOUT: %.loc4_72.1: %i32 = value_of_initializer %int.convert_checked.loc4_72 [template = constants.%.5] -// CHECK:STDOUT: %.loc4_72.2: %i32 = converted %int.convert_checked.loc4_72, %.loc4_72.1 [template = constants.%.5] -// CHECK:STDOUT: %int.sadd: init %i32 = call %TestAdd.ref(%.loc4_57.2, %.loc4_72.2) [template = constants.%.6] -// CHECK:STDOUT: %.loc4_46.1: %i32 = value_of_initializer %int.sadd [template = constants.%.6] -// CHECK:STDOUT: %.loc4_46.2: %i32 = converted %int.sadd, %.loc4_46.1 [template = constants.%.6] -// CHECK:STDOUT: %int.convert_checked.loc4_33: init Core.IntLiteral = call %AsIntLiteral.ref(%.loc4_46.2) [template = constants.%.7] +// CHECK:STDOUT: %int.convert_checked.loc4_74: init %i32 = call %AsI32.ref.loc4_66(%.loc4_73) [template = constants.%.5] +// CHECK:STDOUT: %.loc4_59.1: %i32 = value_of_initializer %int.convert_checked.loc4_59 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_59.2: %i32 = converted %int.convert_checked.loc4_59, %.loc4_59.1 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_74.1: %i32 = value_of_initializer %int.convert_checked.loc4_74 [template = constants.%.5] +// CHECK:STDOUT: %.loc4_74.2: %i32 = converted %int.convert_checked.loc4_74, %.loc4_74.1 [template = constants.%.5] +// CHECK:STDOUT: %int.sadd: init %i32 = call %TestAdd.ref(%.loc4_59.2, %.loc4_74.2) [template = constants.%.6] +// CHECK:STDOUT: %.loc4_75.1: %i32 = value_of_initializer %int.sadd [template = constants.%.6] +// CHECK:STDOUT: %.loc4_75.2: %i32 = converted %int.sadd, %.loc4_75.1 [template = constants.%.6] +// CHECK:STDOUT: %int.convert_checked.loc4_76: init Core.IntLiteral = call %AsIntLiteral.ref(%.loc4_75.2) [template = constants.%.7] // CHECK:STDOUT: %.loc4_11.2: type = value_of_initializer %int.make_type_signed [template = constants.%i32] // CHECK:STDOUT: %.loc4_11.3: type = converted %int.make_type_signed, %.loc4_11.2 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_33.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_33 [template = constants.%.7] -// CHECK:STDOUT: %.loc4_33.2: Core.IntLiteral = converted %int.convert_checked.loc4_33, %.loc4_33.1 [template = constants.%.7] -// CHECK:STDOUT: %.loc4_77: type = array_type %.loc4_33.2, %i32 [template = constants.%.8] +// CHECK:STDOUT: %.loc4_76.1: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_76 [template = constants.%.7] +// CHECK:STDOUT: %.loc4_76.2: Core.IntLiteral = converted %int.convert_checked.loc4_76, %.loc4_76.1 [template = constants.%.7] +// CHECK:STDOUT: %.loc4_77: type = array_type %.loc4_76.2, %i32 [template = constants.%.8] // CHECK:STDOUT: %arr.var: ref %.8 = var arr // CHECK:STDOUT: %arr: ref %.8 = bind_name arr, %arr.var // CHECK:STDOUT: } @@ -239,25 +239,25 @@ var arr: [i32; Core.AsIntLiteral(Core.TestAdd(Core.AsI32(1), Core.AsI32(2)))] = // CHECK:STDOUT: %Core.ref.loc4_82: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_86: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] // CHECK:STDOUT: %.loc4_93: Core.IntLiteral = int_value 1 [template = constants.%.2] -// CHECK:STDOUT: %int.convert_checked.loc4_92: init %i32 = call %AsI32.ref.loc4_86(%.loc4_93) [template = constants.%.3] +// CHECK:STDOUT: %int.convert_checked.loc4_94: init %i32 = call %AsI32.ref.loc4_86(%.loc4_93) [template = constants.%.3] // CHECK:STDOUT: %Core.ref.loc4_97: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_101: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] // CHECK:STDOUT: %.loc4_108: Core.IntLiteral = int_value 2 [template = constants.%.4] -// CHECK:STDOUT: %int.convert_checked.loc4_107: init %i32 = call %AsI32.ref.loc4_101(%.loc4_108) [template = constants.%.5] +// CHECK:STDOUT: %int.convert_checked.loc4_109: init %i32 = call %AsI32.ref.loc4_101(%.loc4_108) [template = constants.%.5] // CHECK:STDOUT: %Core.ref.loc4_112: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %AsI32.ref.loc4_116: %AsI32.type = name_ref AsI32, imports.%import_ref.4 [template = constants.%AsI32] // CHECK:STDOUT: %.loc4_123: Core.IntLiteral = int_value 3 [template = constants.%.7] -// CHECK:STDOUT: %int.convert_checked.loc4_122: init %i32 = call %AsI32.ref.loc4_116(%.loc4_123) [template = constants.%.6] -// CHECK:STDOUT: %.loc4_125.1: %tuple.type = tuple_literal (%int.convert_checked.loc4_92, %int.convert_checked.loc4_107, %int.convert_checked.loc4_122) +// CHECK:STDOUT: %int.convert_checked.loc4_124: init %i32 = call %AsI32.ref.loc4_116(%.loc4_123) [template = constants.%.6] +// CHECK:STDOUT: %.loc4_125.1: %tuple.type = tuple_literal (%int.convert_checked.loc4_94, %int.convert_checked.loc4_109, %int.convert_checked.loc4_124) // CHECK:STDOUT: %.loc4_125.2: Core.IntLiteral = int_value 0 [template = constants.%.10] // CHECK:STDOUT: %.loc4_125.3: ref %i32 = array_index file.%arr.var, %.loc4_125.2 -// CHECK:STDOUT: %.loc4_125.4: init %i32 = initialize_from %int.convert_checked.loc4_92 to %.loc4_125.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc4_125.4: init %i32 = initialize_from %int.convert_checked.loc4_94 to %.loc4_125.3 [template = constants.%.3] // CHECK:STDOUT: %.loc4_125.5: Core.IntLiteral = int_value 1 [template = constants.%.2] // CHECK:STDOUT: %.loc4_125.6: ref %i32 = array_index file.%arr.var, %.loc4_125.5 -// CHECK:STDOUT: %.loc4_125.7: init %i32 = initialize_from %int.convert_checked.loc4_107 to %.loc4_125.6 [template = constants.%.5] +// CHECK:STDOUT: %.loc4_125.7: init %i32 = initialize_from %int.convert_checked.loc4_109 to %.loc4_125.6 [template = constants.%.5] // CHECK:STDOUT: %.loc4_125.8: Core.IntLiteral = int_value 2 [template = constants.%.4] // CHECK:STDOUT: %.loc4_125.9: ref %i32 = array_index file.%arr.var, %.loc4_125.8 -// CHECK:STDOUT: %.loc4_125.10: init %i32 = initialize_from %int.convert_checked.loc4_122 to %.loc4_125.9 [template = constants.%.6] +// CHECK:STDOUT: %.loc4_125.10: init %i32 = initialize_from %int.convert_checked.loc4_124 to %.loc4_125.9 [template = constants.%.6] // CHECK:STDOUT: %.loc4_125.11: init %.8 = array_init (%.loc4_125.4, %.loc4_125.7, %.loc4_125.10) to file.%arr.var [template = constants.%array] // CHECK:STDOUT: %.loc4_126: init %.8 = converted %.loc4_125.1, %.loc4_125.11 [template = constants.%array] // CHECK:STDOUT: assign file.%arr.var, %.loc4_126 diff --git a/toolchain/check/testdata/function/call/fail_not_callable.carbon b/toolchain/check/testdata/function/call/fail_not_callable.carbon index 27185323d7729..10b2d0bb059dc 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -11,7 +11,7 @@ fn Run() { // CHECK:STDERR: fail_not_callable.carbon:[[@LINE+3]]:16: error: value of type `String` is not callable [CallToNonCallable] // CHECK:STDERR: var x: i32 = "hello"(); - // CHECK:STDERR: ^~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~ var x: i32 = "hello"(); } diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index 4ccfca6e199d1..0fbdf3d3928c0 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -15,7 +15,7 @@ fn Run2(a: i32, b: i32) {} fn Main() { // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: Run0(1); - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-8]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run0() {} // CHECK:STDERR: ^~~~~~~~~~~ @@ -23,7 +23,7 @@ fn Main() { Run0(1); // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 2 arguments passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: Run0(0, 1); - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-16]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run0() {} // CHECK:STDERR: ^~~~~~~~~~~ @@ -32,7 +32,7 @@ fn Main() { // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: Run1(); - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-24]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run1(a: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ @@ -40,7 +40,7 @@ fn Main() { Run1(); // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: Run1(0, 1); - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-32]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run1(a: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ @@ -49,7 +49,7 @@ fn Main() { // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 0 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: Run2(); - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-40]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run2(a: i32, b: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ @@ -57,7 +57,7 @@ fn Main() { Run2(); // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:3: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: Run2(0); - // CHECK:STDERR: ^~~~~ + // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-48]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run2(a: i32, b: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon index 0f2609017d520..e8f69ecc3e605 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon @@ -238,13 +238,13 @@ fn CallFAndGIncomplete() { // CHECK:STDOUT: %ReturnCUsed.ref: %ReturnCUsed.type = name_ref ReturnCUsed, imports.%import_ref.4 [template = constants.%ReturnCUsed] // CHECK:STDOUT: %ReturnCUsed.call: init = call %ReturnCUsed.ref() // CHECK:STDOUT: %ReturnDUnused.ref: %ReturnDUnused.type = name_ref ReturnDUnused, imports.%import_ref.5 [template = constants.%ReturnDUnused] -// CHECK:STDOUT: %.loc32_16.1: ref %D = temporary_storage -// CHECK:STDOUT: %ReturnDUnused.call: init %D = call %ReturnDUnused.ref() to %.loc32_16.1 -// CHECK:STDOUT: %.loc32_16.2: ref %D = temporary %.loc32_16.1, %ReturnDUnused.call +// CHECK:STDOUT: %.loc32_17.1: ref %D = temporary_storage +// CHECK:STDOUT: %ReturnDUnused.call: init %D = call %ReturnDUnused.ref() to %.loc32_17.1 +// CHECK:STDOUT: %.loc32_17.2: ref %D = temporary %.loc32_17.1, %ReturnDUnused.call // CHECK:STDOUT: %ReturnDUsed.ref: %ReturnDUsed.type = name_ref ReturnDUsed, imports.%import_ref.6 [template = constants.%ReturnDUsed] -// CHECK:STDOUT: %.loc33_14.1: ref %D = temporary_storage -// CHECK:STDOUT: %ReturnDUsed.call: init %D = call %ReturnDUsed.ref() to %.loc33_14.1 -// CHECK:STDOUT: %.loc33_14.2: ref %D = temporary %.loc33_14.1, %ReturnDUsed.call +// CHECK:STDOUT: %.loc33_15.1: ref %D = temporary_storage +// CHECK:STDOUT: %ReturnDUsed.call: init %D = call %ReturnDUsed.ref() to %.loc33_15.1 +// CHECK:STDOUT: %.loc33_15.2: ref %D = temporary %.loc33_15.1, %ReturnDUsed.call // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 75d02ca2bf211..64fc86e6cd56f 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -35,7 +35,7 @@ fn CallExplicitGenericParamConst(T:! type) { fn CallExplicitGenericParamNonConst(T: type) { // CHECK:STDERR: fail_deduce_explicit_non_constant.carbon:[[@LINE+7]]:3: error: argument for generic parameter is not a compile-time constant [CompTimeArgumentNotConstant] // CHECK:STDERR: ExplicitGenericParam(T); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_explicit_non_constant.carbon:[[@LINE-10]]:25: note: initializing generic parameter `T` declared here [InitializingGenericParam] // CHECK:STDERR: fn ExplicitGenericParam(T:! type) -> T* { return ExplicitGenericParam(T); } // CHECK:STDERR: ^ @@ -96,7 +96,7 @@ fn BigStructParam[T:! type](x: {.c: T, .d: i32, .e: i32}) {} fn CallBigStructParam() { // CHECK:STDERR: fail_deduce_bigger_struct.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: BigStructParam({.c = 3, .d = 4}); - // CHECK:STDERR: ^~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_bigger_struct.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn BigStructParam[T:! type](x: {.c: T, .d: i32, .e: i32}) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -113,7 +113,7 @@ fn SmallStructParam[T:! type](x: {.f: T, .g: i32}) {} fn CallSmallStructParam() { // CHECK:STDERR: fail_deduce_smaller_struct.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: SmallStructParam({.f = 5, .g = 6, .h = 7}); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_smaller_struct.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn SmallStructParam[T:! type](x: {.f: T, .g: i32}) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -130,7 +130,7 @@ fn WrongNameStructParam[T:! type](x: {.i: T, .different: i32}) {} fn CallWrongNameStructParam() { // CHECK:STDERR: fail_deduce_struct_wrong_name.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: WrongNameStructParam({.i = 8, .j = 9}); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_struct_wrong_name.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn WrongNameStructParam[T:! type](x: {.i: T, .different: i32}) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -147,7 +147,7 @@ fn WrongOrderStructParam[T:! type](x: {.first: T, .second: i32}) {} fn CallWrongOrderStructParam() { // CHECK:STDERR: fail_todo_deduce_struct_wrong_order.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: WrongOrderStructParam({.second = 11, .first = 10}); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_deduce_struct_wrong_order.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn WrongOrderStructParam[T:! type](x: {.first: T, .second: i32}) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -166,7 +166,7 @@ fn ImplicitNotDeducible[T:! type, U:! type](x: T) -> U; fn CallImplicitNotDeducible() { // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `U` [DeductionIncomplete] // CHECK:STDERR: ImplicitNotDeducible(42); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn ImplicitNotDeducible[T:! type, U:! type](x: T) -> U; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -183,7 +183,7 @@ fn ImplicitNotDeducible[T:! type](x: T, y: T) -> T; fn CallImplicitNotDeducible() { // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE+6]]:3: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent] // CHECK:STDERR: ImplicitNotDeducible(42, {.x = 12}); - // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn ImplicitNotDeducible[T:! type](x: T, y: T) -> T; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -296,8 +296,8 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %.loc7_31: Core.IntLiteral = int_value 32 [template = constants.%.3] // CHECK:STDOUT: %int.make_type_signed.loc7: init type = call constants.%Int(%.loc7_31) [template = constants.%i32] -// CHECK:STDOUT: %.loc7_30.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] -// CHECK:STDOUT: %.loc7_30.2: type = converted %int.make_type_signed.loc7, %.loc7_30.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_34.1: type = value_of_initializer %int.make_type_signed.loc7 [template = constants.%i32] +// CHECK:STDOUT: %.loc7_34.2: type = converted %int.make_type_signed.loc7, %.loc7_34.1 [template = constants.%i32] // CHECK:STDOUT: %.loc7_10: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%i32) [template = constants.%.5] // CHECK:STDOUT: %ExplicitGenericParam.call: init %.4 = call %.loc7_10() // CHECK:STDOUT: %.loc7_35.1: %.4 = value_of_initializer %ExplicitGenericParam.call @@ -458,14 +458,14 @@ fn CallImplicitNotDeducible() { // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %.loc7_3.2: = specific_function constants.%ExplicitGenericParam, @ExplicitGenericParam(%T.loc6_34.2) [symbolic = %.loc7_3.2 (constants.%.2)] -// CHECK:STDOUT: %.loc7_23: type = ptr_type @CallExplicitGenericParamConst.%T.loc6_34.2 (%T) [symbolic = %.loc7_23 (constants.%.1)] +// CHECK:STDOUT: %.loc7_25: type = ptr_type @CallExplicitGenericParamConst.%T.loc6_34.2 (%T) [symbolic = %.loc7_25 (constants.%.1)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ExplicitGenericParam.ref: %ExplicitGenericParam.type = name_ref ExplicitGenericParam, file.%ExplicitGenericParam.decl [template = constants.%ExplicitGenericParam] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc6_34.1 [symbolic = %T.loc6_34.2 (constants.%T)] // CHECK:STDOUT: %.loc7_3.1: = specific_function %ExplicitGenericParam.ref, @ExplicitGenericParam(constants.%T) [symbolic = %.loc7_3.2 (constants.%.2)] -// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamConst.%.loc7_23 (%.1) = call %.loc7_3.1() +// CHECK:STDOUT: %ExplicitGenericParam.call: init @CallExplicitGenericParamConst.%.loc7_25 (%.1) = call %.loc7_3.1() // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index c2a5ea442278a..cce666472d8f4 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -34,7 +34,7 @@ fn F(T:! type, U:! type) -> T*; fn F(T:! type, U:! type) -> U* { // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return F(T); - // CHECK:STDERR: ^~ + // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-13]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -58,7 +58,7 @@ fn F(T:! type, U:! type) -> T*; fn F(U:! type, T:! type) -> T* { // CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return F(T); - // CHECK:STDERR: ^~ + // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_reorder.carbon:[[@LINE-13]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -82,7 +82,7 @@ fn F(T:! type, U:! type) -> T*; fn F(U:! type, T:! type) -> U* { // CHECK:STDERR: fail_rename.carbon:[[@LINE+6]]:10: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return F(T); - // CHECK:STDERR: ^~ + // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_rename.carbon:[[@LINE-13]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index 7dcb60f4c6518..d22c42c7170a5 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -19,7 +19,7 @@ fn ErrorIfNIsZero(N:! Core.IntLiteral()) { // that's not how we currently model `Core.Int`. // CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+3]]:10: error: integer type width of 0 is not positive [IntWidthNotPositive] // CHECK:STDERR: var v: Core.Int(N); - // CHECK:STDERR: ^~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~ var v: Core.Int(N); } diff --git a/toolchain/check/testdata/function/generic/return_slot.carbon b/toolchain/check/testdata/function/generic/return_slot.carbon index 71641a423a053..ca830d5020a90 100644 --- a/toolchain/check/testdata/function/generic/return_slot.carbon +++ b/toolchain/check/testdata/function/generic/return_slot.carbon @@ -160,8 +160,8 @@ fn G() { // CHECK:STDOUT: %Wrap.ref.loc18: %Wrap.type = name_ref Wrap, file.%Wrap.decl [template = constants.%Wrap.1] // CHECK:STDOUT: %.loc18_21: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc18_21: init type = call constants.%Int(%.loc18_21) [template = constants.%i32] -// CHECK:STDOUT: %.loc18_20.1: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] -// CHECK:STDOUT: %.loc18_20.2: type = converted %int.make_type_signed.loc18_21, %.loc18_20.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_24.1: type = value_of_initializer %int.make_type_signed.loc18_21 [template = constants.%i32] +// CHECK:STDOUT: %.loc18_24.2: type = converted %int.make_type_signed.loc18_21, %.loc18_24.1 [template = constants.%i32] // CHECK:STDOUT: %Wrap.loc18: type = class_type @Wrap, @Wrap(constants.%i32) [template = constants.%Wrap.3] // CHECK:STDOUT: %.loc18_25.1: %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_25.1 [template = constants.%Make.2] @@ -174,7 +174,7 @@ fn G() { // 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.1] // CHECK:STDOUT: %.loc19_21: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc19_19: type = converted %.loc19_21, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc19_22: type = converted %.loc19_21, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %Wrap.loc19: type = class_type @Wrap, @Wrap(constants.%empty_tuple.type) [template = constants.%Wrap.4] // CHECK:STDOUT: %.loc19_23.1: %Make.type.3 = specific_constant @Wrap.%Make.decl, @Wrap(constants.%empty_tuple.type) [template = constants.%Make.3] // CHECK:STDOUT: %Make.ref.loc19: %Make.type.3 = name_ref Make, %.loc19_23.1 [template = constants.%Make.3] diff --git a/toolchain/check/testdata/if_expr/constant_condition.carbon b/toolchain/check/testdata/if_expr/constant_condition.carbon index 0054b024ac09a..a87fd9f2da399 100644 --- a/toolchain/check/testdata/if_expr/constant_condition.carbon +++ b/toolchain/check/testdata/if_expr/constant_condition.carbon @@ -191,9 +191,9 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init %i32 = call %A.ref() -// CHECK:STDOUT: %.loc15_24.1: %i32 = value_of_initializer %A.call -// CHECK:STDOUT: %.loc15_24.2: %i32 = converted %A.call, %.loc15_24.1 -// CHECK:STDOUT: br !if.expr.result(%.loc15_24.2) +// CHECK:STDOUT: %.loc15_25.1: %i32 = value_of_initializer %A.call +// CHECK:STDOUT: %.loc15_25.2: %i32 = converted %A.call, %.loc15_25.1 +// CHECK:STDOUT: br !if.expr.result(%.loc15_25.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] @@ -215,9 +215,9 @@ fn PartiallyConstant(t: type) -> i32 { // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init %i32 = call %A.ref() -// CHECK:STDOUT: %.loc19_25.1: %i32 = value_of_initializer %A.call -// CHECK:STDOUT: %.loc19_25.2: %i32 = converted %A.call, %.loc19_25.1 -// CHECK:STDOUT: br !if.expr.result(%.loc19_25.2) +// CHECK:STDOUT: %.loc19_26.1: %i32 = value_of_initializer %A.call +// CHECK:STDOUT: %.loc19_26.2: %i32 = converted %A.call, %.loc19_26.1 +// CHECK:STDOUT: br !if.expr.result(%.loc19_26.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] diff --git a/toolchain/check/testdata/if_expr/control_flow.carbon b/toolchain/check/testdata/if_expr/control_flow.carbon index a55c9c336e1e8..ee6813717031f 100644 --- a/toolchain/check/testdata/if_expr/control_flow.carbon +++ b/toolchain/check/testdata/if_expr/control_flow.carbon @@ -136,9 +136,9 @@ fn F(b: bool) -> i32 { // CHECK:STDOUT: !if.expr.then: // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A] // CHECK:STDOUT: %A.call: init %i32 = call %A.ref() -// CHECK:STDOUT: %.loc15_21.1: %i32 = value_of_initializer %A.call -// CHECK:STDOUT: %.loc15_21.2: %i32 = converted %A.call, %.loc15_21.1 -// CHECK:STDOUT: br !if.expr.result(%.loc15_21.2) +// CHECK:STDOUT: %.loc15_22.1: %i32 = value_of_initializer %A.call +// CHECK:STDOUT: %.loc15_22.2: %i32 = converted %A.call, %.loc15_22.1 +// CHECK:STDOUT: br !if.expr.result(%.loc15_22.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: // CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B] diff --git a/toolchain/check/testdata/impl/extend_impl_generic.carbon b/toolchain/check/testdata/impl/extend_impl_generic.carbon index be69e01c7eb10..eca53af2adbc8 100644 --- a/toolchain/check/testdata/impl/extend_impl_generic.carbon +++ b/toolchain/check/testdata/impl/extend_impl_generic.carbon @@ -239,11 +239,11 @@ class X(U:! type) { // CHECK:STDOUT: %.loc21_17.1: %.7 = specific_constant @HasF.%.loc5_14.1, @HasF(constants.%Param) [template = constants.%.8] // CHECK:STDOUT: %F.ref.loc21: %.7 = name_ref F, %.loc21_17.1 [template = constants.%.8] // CHECK:STDOUT: %.loc21_17.2: %F.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc21_19.1: ref %Param = temporary_storage -// CHECK:STDOUT: %F.call.loc21: init %Param = call %.loc21_17.2() to %.loc21_19.1 -// CHECK:STDOUT: %.loc21_19.2: ref %Param = temporary %.loc21_19.1, %F.call.loc21 +// CHECK:STDOUT: %.loc21_20.1: ref %Param = temporary_storage +// CHECK:STDOUT: %F.call.loc21: init %Param = call %.loc21_17.2() to %.loc21_20.1 +// CHECK:STDOUT: %.loc21_20.2: ref %Param = temporary %.loc21_20.1, %F.call.loc21 // CHECK:STDOUT: %x.ref.loc21: %.4 = name_ref x, @Param.%.loc9_8 [template = @Param.%.loc9_8] -// CHECK:STDOUT: %.loc21_21.1: ref %i32 = class_element_access %.loc21_19.2, element0 +// 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: %.loc22_10.1: Core.IntLiteral = int_value 32 [template = constants.%.3] @@ -256,11 +256,11 @@ class X(U:! type) { // CHECK:STDOUT: %.loc22_17.1: %.7 = specific_constant @HasF.%.loc5_14.1, @HasF(constants.%Param) [template = constants.%.8] // CHECK:STDOUT: %F.ref.loc22: %.7 = name_ref F, %.loc22_17.1 [template = constants.%.8] // CHECK:STDOUT: %.loc22_17.2: %F.type.2 = interface_witness_access constants.%.10, element0 [template = constants.%F.3] -// CHECK:STDOUT: %.loc22_19.1: ref %Param = temporary_storage -// CHECK:STDOUT: %F.call.loc22: init %Param = call %.loc22_17.2() to %.loc22_19.1 -// CHECK:STDOUT: %.loc22_19.2: ref %Param = temporary %.loc22_19.1, %F.call.loc22 +// CHECK:STDOUT: %.loc22_20.1: ref %Param = temporary_storage +// CHECK:STDOUT: %F.call.loc22: init %Param = call %.loc22_17.2() to %.loc22_20.1 +// CHECK:STDOUT: %.loc22_20.2: ref %Param = temporary %.loc22_20.1, %F.call.loc22 // CHECK:STDOUT: %x.ref.loc22: %.4 = name_ref x, @Param.%.loc9_8 [template = @Param.%.loc9_8] -// CHECK:STDOUT: %.loc22_21.1: ref %i32 = class_element_access %.loc22_19.2, element0 +// CHECK:STDOUT: %.loc22_21.1: ref %i32 = class_element_access %.loc22_20.2, element0 // CHECK:STDOUT: %.loc22_21.2: %i32 = bind_value %.loc22_21.1 // CHECK:STDOUT: assign %b.var, %.loc22_21.2 // CHECK:STDOUT: return @@ -401,14 +401,14 @@ class X(U:! type) { // CHECK:STDOUT: generic impl @impl(@X.%U.loc8_9.1: type) { // CHECK:STDOUT: %U: type = bind_symbolic_name U, 0 [symbolic = %U (constants.%U)] // CHECK:STDOUT: %X: type = class_type @X, @X(%U) [symbolic = %X (constants.%X.2)] -// CHECK:STDOUT: %I.type.loc9_19.2: type = facet_type <@I, @I(%U)> [symbolic = %I.type.loc9_19.2 (constants.%I.type.3)] +// CHECK:STDOUT: %I.type.loc9_21.2: type = facet_type <@I, @I(%U)> [symbolic = %I.type.loc9_21.2 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%U) [symbolic = %F.type (constants.%F.type.3)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.3) = struct_value () [symbolic = %F (constants.%F.3)] // CHECK:STDOUT: %.loc9_23.2: = interface_witness (%F) [symbolic = %.loc9_23.2 (constants.%.7)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %Self.ref as %I.type.loc9_19.1 { +// CHECK:STDOUT: impl: %Self.ref as %I.type.loc9_21.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.3) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.3)] { // CHECK:STDOUT: %self.patt: @F.2.%X (%X.2) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @F.2.%X (%X.2) = value_param_pattern %self.patt, runtime_param0 @@ -443,9 +443,9 @@ class X(U:! type) { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%X.2 [symbolic = %X (constants.%X.2)] // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %U.ref: type = name_ref U, @X.%U.loc8_9.1 [symbolic = %U (constants.%U)] -// CHECK:STDOUT: %I.type.loc9_19.1: type = facet_type <@I, @I(constants.%U)> [symbolic = %I.type.loc9_19.2 (constants.%I.type.3)] +// CHECK:STDOUT: %I.type.loc9_21.1: type = facet_type <@I, @I(constants.%U)> [symbolic = %I.type.loc9_21.2 (constants.%I.type.3)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc9: type = specific_constant @impl.%I.type.loc9_19.1, @impl(constants.%U) [symbolic = %I.type (constants.%I.type.3)] +// CHECK:STDOUT: %.loc9: type = specific_constant @impl.%I.type.loc9_21.1, @impl(constants.%U) [symbolic = %I.type (constants.%I.type.3)] // CHECK:STDOUT: %.loc12: = complete_type_witness %.8 [template = constants.%.9] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -532,7 +532,7 @@ class X(U:! type) { // CHECK:STDOUT: specific @impl(constants.%U) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: %X => constants.%X.2 -// CHECK:STDOUT: %I.type.loc9_19.2 => constants.%I.type.3 +// CHECK:STDOUT: %I.type.loc9_21.2 => constants.%I.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 @@ -560,7 +560,7 @@ class X(U:! type) { // CHECK:STDOUT: specific @impl(%U) { // CHECK:STDOUT: %U => constants.%U // CHECK:STDOUT: %X => constants.%X.2 -// CHECK:STDOUT: %I.type.loc9_19.2 => constants.%I.type.3 +// CHECK:STDOUT: %I.type.loc9_21.2 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(@X.%U.loc8_9.2) { diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index d6f3c3fa4e313..a795c9effd4e0 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -101,14 +101,14 @@ class C { // CHECK:STDOUT: generic impl @impl(%T.loc19_23.1: type) { // CHECK:STDOUT: %T.loc19_23.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc19_23.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc19_23.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc19_23.2 (constants.%T.patt)] -// CHECK:STDOUT: %GenericInterface.type.loc19_52.2: type = facet_type <@GenericInterface, @GenericInterface(%T.loc19_23.2)> [symbolic = %GenericInterface.type.loc19_52.2 (constants.%GenericInterface.type.2)] +// CHECK:STDOUT: %GenericInterface.type.loc19_54.2: type = facet_type <@GenericInterface, @GenericInterface(%T.loc19_23.2)> [symbolic = %GenericInterface.type.loc19_54.2 (constants.%GenericInterface.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc19_23.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] // CHECK:STDOUT: %.loc19_56.2: = interface_witness (%F) [symbolic = %.loc19_56.2 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc19_52.1 { +// CHECK:STDOUT: impl: %Self.ref as %GenericInterface.type.loc19_54.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { // 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 @@ -133,11 +133,11 @@ class C { // CHECK:STDOUT: %Self.ref: type = name_ref Self, constants.%C [template = constants.%C] // CHECK:STDOUT: %GenericInterface.ref: %GenericInterface.type.1 = name_ref GenericInterface, file.%GenericInterface.decl [template = constants.%GenericInterface] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc19_23.1 [symbolic = %T.loc19_23.2 (constants.%T)] -// CHECK:STDOUT: %GenericInterface.type.loc19_52.1: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc19_52.2 (constants.%GenericInterface.type.2)] +// CHECK:STDOUT: %GenericInterface.type.loc19_54.1: type = facet_type <@GenericInterface, @GenericInterface(constants.%T)> [symbolic = %GenericInterface.type.loc19_54.2 (constants.%GenericInterface.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc19_23.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc19_23.2 (constants.%T)] // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc19: type = specific_constant @impl.%GenericInterface.type.loc19_52.1, @impl(constants.%T) [symbolic = constants.%GenericInterface.type.2] +// CHECK:STDOUT: %.loc19: type = specific_constant @impl.%GenericInterface.type.loc19_54.1, @impl(constants.%T) [symbolic = constants.%GenericInterface.type.2] // CHECK:STDOUT: %.loc22: = complete_type_witness %.5 [template = constants.%.6] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -193,7 +193,7 @@ class C { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc19_23.2 => constants.%T // CHECK:STDOUT: %T.patt.loc19_23.2 => constants.%T -// CHECK:STDOUT: %GenericInterface.type.loc19_52.2 => constants.%GenericInterface.type.2 +// CHECK:STDOUT: %GenericInterface.type.loc19_54.2 => constants.%GenericInterface.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 @@ -212,6 +212,6 @@ class C { // CHECK:STDOUT: specific @impl(%T.loc19_23.2) { // CHECK:STDOUT: %T.loc19_23.2 => constants.%T // CHECK:STDOUT: %T.patt.loc19_23.2 => constants.%T -// CHECK:STDOUT: %GenericInterface.type.loc19_52.2 => constants.%GenericInterface.type.2 +// CHECK:STDOUT: %GenericInterface.type.loc19_54.2 => constants.%GenericInterface.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon index 8cfa57d80086d..61f8b3733ecc6 100644 --- a/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon +++ b/toolchain/check/testdata/impl/fail_self_type_mismatch.carbon @@ -94,14 +94,14 @@ impl i32 as I { // CHECK:STDOUT: interface @I { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = constants.%Self] // CHECK:STDOUT: %F.decl: %F.type.1 = fn_decl @F.1 [template = constants.%F.1] { -// CHECK:STDOUT: %c.patt: @F.1.%C.loc14_12.1 (%C.3) = binding_pattern c -// CHECK:STDOUT: %c.param_patt: @F.1.%C.loc14_12.1 (%C.3) = value_param_pattern %c.patt, runtime_param0 +// CHECK:STDOUT: %c.patt: @F.1.%C.loc14_17.1 (%C.3) = binding_pattern c +// CHECK:STDOUT: %c.param_patt: @F.1.%C.loc14_17.1 (%C.3) = value_param_pattern %c.patt, runtime_param0 // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %Self.ref: %I.type = name_ref Self, @I.%Self [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %C.loc14_12.2: type = class_type @C, @C(constants.%I.type, constants.%Self) [symbolic = %C.loc14_12.1 (constants.%C.3)] -// CHECK:STDOUT: %c.param: @F.1.%C.loc14_12.1 (%C.3) = value_param runtime_param0 -// CHECK:STDOUT: %c: @F.1.%C.loc14_12.1 (%C.3) = bind_name c, %c.param +// CHECK:STDOUT: %C.loc14_17.2: type = class_type @C, @C(constants.%I.type, constants.%Self) [symbolic = %C.loc14_17.1 (constants.%C.3)] +// CHECK:STDOUT: %c.param: @F.1.%C.loc14_17.1 (%C.3) = value_param runtime_param0 +// CHECK:STDOUT: %c: @F.1.%C.loc14_17.1 (%C.3) = bind_name c, %c.param // CHECK:STDOUT: } // CHECK:STDOUT: %.loc14: %.3 = assoc_entity element0, %F.decl [template = constants.%.4] // CHECK:STDOUT: @@ -149,9 +149,9 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: generic fn @F.1(@I.%Self: %I.type) { // CHECK:STDOUT: %Self: %I.type = bind_symbolic_name Self, 0 [symbolic = %Self (constants.%Self)] -// CHECK:STDOUT: %C.loc14_12.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc14_12.1 (constants.%C.3)] +// CHECK:STDOUT: %C.loc14_17.1: type = class_type @C, @C(constants.%I.type, %Self) [symbolic = %C.loc14_17.1 (constants.%C.3)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%c.param_patt: @F.1.%C.loc14_12.1 (%C.3)); +// CHECK:STDOUT: fn(%c.param_patt: @F.1.%C.loc14_17.1 (%C.3)); // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: fn @F.2(%c.param_patt: %C.4); @@ -179,7 +179,7 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%Self) { // CHECK:STDOUT: %Self => constants.%Self -// CHECK:STDOUT: %C.loc14_12.1 => constants.%C.3 +// CHECK:STDOUT: %C.loc14_17.1 => constants.%C.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(type, constants.%i32) { @@ -191,7 +191,7 @@ impl i32 as I { // CHECK:STDOUT: // CHECK:STDOUT: specific @F.1(constants.%.6) { // CHECK:STDOUT: %Self => constants.%.6 -// CHECK:STDOUT: %C.loc14_12.1 => constants.%C.5 +// CHECK:STDOUT: %C.loc14_17.1 => constants.%C.5 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%I.type, constants.%.6) { diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index d3ba4b6927360..ab437f67fbf98 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -423,8 +423,8 @@ fn G(x: A) { // CHECK:STDOUT: %.loc13_11.2: = bound_method %x.ref, %.loc13_11.1 // CHECK:STDOUT: %.loc13_11.3: = specific_function %.loc13_11.2, @F.2(constants.%.6) // CHECK:STDOUT: %F.call: init %.6 = call %.loc13_11.3(%x.ref) -// CHECK:STDOUT: %.loc13_20.1: ref %.6 = temporary_storage -// CHECK:STDOUT: %.loc13_20.2: ref %.6 = temporary %.loc13_20.1, %F.call +// CHECK:STDOUT: %.loc13_21.1: ref %.6 = temporary_storage +// CHECK:STDOUT: %.loc13_21.2: ref %.6 = temporary %.loc13_21.1, %F.call // CHECK:STDOUT: %struct: %.6 = struct_value () [template = constants.%struct] // CHECK:STDOUT: %.loc13_22: %.6 = converted %F.call, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc13_22 @@ -534,7 +534,7 @@ fn G(x: A) { // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_14.1 [symbolic = %T.loc10_14.2 (constants.%T)] -// CHECK:STDOUT: %C.loc10_25.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_25.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.2 (constants.%C.2)] // CHECK:STDOUT: %HasF.ref: type = name_ref HasF, file.%HasF.decl [template = constants.%HasF.type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_14.2 (constants.%T)] @@ -545,7 +545,7 @@ fn G(x: A) { // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc14_12: %.3 = struct_literal () -// CHECK:STDOUT: %.loc14_10: type = converted %.loc14_12, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc14_13: type = converted %.loc14_12, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.3) [template = constants.%C.3] // CHECK:STDOUT: %x.param: %C.3 = value_param runtime_param0 // CHECK:STDOUT: %x: %C.3 = bind_name x, %x.param @@ -566,14 +566,14 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @impl(%T.loc10_14.1: type) { // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc10_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %C.loc10_25.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_25.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_27.2 (constants.%C.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] // CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.loc10_25.1 as %HasF.ref { +// CHECK:STDOUT: impl: %C.loc10_27.1 as %HasF.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} // CHECK:STDOUT: %.loc10_37.1: = interface_witness (%F.decl) [symbolic = %.loc10_37.2 (constants.%.6)] // CHECK:STDOUT: @@ -638,7 +638,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T -// CHECK:STDOUT: %C.loc10_25.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 @@ -653,7 +653,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(%T.loc10_14.2) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T -// CHECK:STDOUT: %C.loc10_25.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @C(constants.%.3) { @@ -666,7 +666,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(constants.%.3) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%.3 // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%.3 -// CHECK:STDOUT: %C.loc10_25.2 => constants.%C.3 +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.3 @@ -739,7 +739,7 @@ fn G(x: A) { // CHECK:STDOUT: %.loc8_25.2: type = converted %.loc8_25.1, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] -// CHECK:STDOUT: %HasF.type.loc8_34.1: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_34.2 (constants.%HasF.type.2)] +// CHECK:STDOUT: %HasF.type.loc8_36.1: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_36.2 (constants.%HasF.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } @@ -781,14 +781,14 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @impl(%T.loc8_14.1: type) { // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %HasF.type.loc8_34.2: type = facet_type <@HasF, @HasF(%T.loc8_14.2)> [symbolic = %HasF.type.loc8_34.2 (constants.%HasF.type.2)] +// CHECK:STDOUT: %HasF.type.loc8_36.2: type = facet_type <@HasF, @HasF(%T.loc8_14.2)> [symbolic = %HasF.type.loc8_36.2 (constants.%HasF.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] // CHECK:STDOUT: %.loc8_38.2: = interface_witness (%F) [symbolic = %.loc8_38.2 (constants.%.5)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_34.1 { +// CHECK:STDOUT: impl: %.loc8_25.2 as %HasF.type.loc8_36.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} // CHECK:STDOUT: %.loc8_38.1: = interface_witness (%F.decl) [symbolic = %.loc8_38.2 (constants.%.5)] // CHECK:STDOUT: @@ -817,7 +817,7 @@ fn G(x: A) { // CHECK:STDOUT: %x.ref: %.3 = name_ref x, %x // CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] // CHECK:STDOUT: %.loc13_12: %.3 = struct_literal () -// CHECK:STDOUT: %.loc13_10: type = converted %.loc13_12, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc13_13: type = converted %.loc13_12, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %HasF.type: type = facet_type <@HasF, @HasF(constants.%.3)> [template = constants.%HasF.type.3] // CHECK:STDOUT: %.loc13_14: %.6 = specific_constant @HasF.%.loc5_9.1, @HasF(constants.%.3) [template = constants.%.7] // CHECK:STDOUT: %F.ref: %.6 = name_ref F, %.loc13_14 [template = constants.%.7] @@ -855,7 +855,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T -// CHECK:STDOUT: %HasF.type.loc8_34.2 => constants.%HasF.type.2 +// CHECK:STDOUT: %HasF.type.loc8_36.2 => constants.%HasF.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 @@ -870,7 +870,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T -// CHECK:STDOUT: %HasF.type.loc8_34.2 => constants.%HasF.type.2 +// CHECK:STDOUT: %HasF.type.loc8_36.2 => constants.%HasF.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasF(constants.%.3) { @@ -889,7 +889,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(constants.%.3) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%.3 // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%.3 -// CHECK:STDOUT: %HasF.type.loc8_34.2 => constants.%HasF.type.3 +// CHECK:STDOUT: %HasF.type.loc8_36.2 => constants.%HasF.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.4 @@ -1101,7 +1101,7 @@ fn G(x: A) { // CHECK:STDOUT: %T.ref.loc8_24: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %HasF.ref: %HasF.type.1 = name_ref HasF, file.%HasF.decl [template = constants.%HasF] // CHECK:STDOUT: %T.ref.loc8_34: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] -// CHECK:STDOUT: %HasF.type.loc8_33.1: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_33.2 (constants.%HasF.type.2)] +// CHECK:STDOUT: %HasF.type.loc8_35.1: type = facet_type <@HasF, @HasF(constants.%T)> [symbolic = %HasF.type.loc8_35.2 (constants.%HasF.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } @@ -1144,14 +1144,14 @@ fn G(x: A) { // CHECK:STDOUT: generic impl @impl(%T.loc8_14.1: type) { // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %HasF.type.loc8_33.2: type = facet_type <@HasF, @HasF(%T.loc8_14.2)> [symbolic = %HasF.type.loc8_33.2 (constants.%HasF.type.2)] +// CHECK:STDOUT: %HasF.type.loc8_35.2: type = facet_type <@HasF, @HasF(%T.loc8_14.2)> [symbolic = %HasF.type.loc8_35.2 (constants.%HasF.type.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc8_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] // CHECK:STDOUT: %.loc8_37.2: = interface_witness (%F) [symbolic = %.loc8_37.2 (constants.%.4)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_33.1 { +// CHECK:STDOUT: impl: %T.ref.loc8_24 as %HasF.type.loc8_35.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} // CHECK:STDOUT: %.loc8_37.1: = interface_witness (%F.decl) [symbolic = %.loc8_37.2 (constants.%.4)] // CHECK:STDOUT: @@ -1230,7 +1230,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T -// CHECK:STDOUT: %HasF.type.loc8_33.2 => constants.%HasF.type.2 +// CHECK:STDOUT: %HasF.type.loc8_35.2 => constants.%HasF.type.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 @@ -1245,7 +1245,7 @@ fn G(x: A) { // CHECK:STDOUT: specific @impl(%T.loc8_14.2) { // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T -// CHECK:STDOUT: %HasF.type.loc8_33.2 => constants.%HasF.type.2 +// CHECK:STDOUT: %HasF.type.loc8_35.2 => constants.%HasF.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @HasF(constants.%B) { 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 966ddab86ceeb..23de831898e07 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/impl_forall.carbon @@ -130,29 +130,29 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] // CHECK:STDOUT: %V.ref.loc10_26: type = name_ref V, %V.loc10_14.1 [symbolic = %V.loc10_14.2 (constants.%V)] -// CHECK:STDOUT: %A.loc10_25.1: type = class_type @A, @A(constants.%V) [symbolic = %A.loc10_25.2 (constants.%A.3)] +// CHECK:STDOUT: %A.loc10_27.1: type = class_type @A, @A(constants.%V) [symbolic = %A.loc10_27.2 (constants.%A.3)] // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %V.ref.loc10_34: type = name_ref V, %V.loc10_14.1 [symbolic = %V.loc10_14.2 (constants.%V)] -// CHECK:STDOUT: %I.type.loc10_33.1: type = facet_type <@I, @I(constants.%V)> [symbolic = %I.type.loc10_33.2 (constants.%I.type.3)] +// CHECK:STDOUT: %I.type.loc10_35.1: type = facet_type <@I, @I(constants.%V)> [symbolic = %I.type.loc10_35.2 (constants.%I.type.3)] // CHECK:STDOUT: %V.param: type = value_param runtime_param // CHECK:STDOUT: %V.loc10_14.1: type = bind_symbolic_name V, 0, %V.param [symbolic = %V.loc10_14.2 (constants.%V)] // CHECK:STDOUT: } // CHECK:STDOUT: %TestGeneric.decl: %TestGeneric.type = fn_decl @TestGeneric [template = constants.%TestGeneric] { // CHECK:STDOUT: %W.patt.loc16_16.1: type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_16.2 (constants.%W.patt)] // CHECK:STDOUT: %W.param_patt: type = value_param_pattern %W.patt.loc16_16.1, runtime_param [symbolic = %W.patt.loc16_16.2 (constants.%W.patt)] -// CHECK:STDOUT: %a.patt: @TestGeneric.%A.loc16_30.2 (%A.4) = binding_pattern a -// CHECK:STDOUT: %a.param_patt: @TestGeneric.%A.loc16_30.2 (%A.4) = value_param_pattern %a.patt, runtime_param0 +// CHECK:STDOUT: %a.patt: @TestGeneric.%A.loc16_32.2 (%A.4) = binding_pattern a +// CHECK:STDOUT: %a.param_patt: @TestGeneric.%A.loc16_32.2 (%A.4) = value_param_pattern %a.patt, runtime_param0 // 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.1] // 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_30.1: type = class_type @A, @A(constants.%W) [symbolic = %A.loc16_30.2 (constants.%A.4)] +// CHECK:STDOUT: %A.loc16_32.1: type = class_type @A, @A(constants.%W) [symbolic = %A.loc16_32.2 (constants.%A.4)] // 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_30.2 (%A.4) = value_param runtime_param0 -// CHECK:STDOUT: %a: @TestGeneric.%A.loc16_30.2 (%A.4) = bind_name a, %a.param +// CHECK:STDOUT: %a.param: @TestGeneric.%A.loc16_32.2 (%A.4) = value_param runtime_param0 +// CHECK:STDOUT: %a: @TestGeneric.%A.loc16_32.2 (%A.4) = 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 // CHECK:STDOUT: } @@ -164,7 +164,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: } { // CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [template = constants.%A.1] // CHECK:STDOUT: %.loc20_23: %.22 = struct_literal () -// CHECK:STDOUT: %.loc20_21: type = converted %.loc20_23, constants.%.22 [template = constants.%.22] +// CHECK:STDOUT: %.loc20_24: type = converted %.loc20_23, constants.%.22 [template = constants.%.22] // CHECK:STDOUT: %A: type = class_type @A, @A(constants.%.22) [template = constants.%A.5] // CHECK:STDOUT: %.loc20_31.1: %.22 = struct_literal () // CHECK:STDOUT: %.loc20_31.2: type = converted %.loc20_31.1, constants.%.22 [template = constants.%.22] @@ -217,22 +217,22 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: generic impl @impl(%V.loc10_14.1: type) { // CHECK:STDOUT: %V.loc10_14.2: type = bind_symbolic_name V, 0 [symbolic = %V.loc10_14.2 (constants.%V)] // CHECK:STDOUT: %V.patt.loc10_14.2: type = symbolic_binding_pattern V, 0 [symbolic = %V.patt.loc10_14.2 (constants.%V.patt)] -// CHECK:STDOUT: %A.loc10_25.2: type = class_type @A, @A(%V.loc10_14.2) [symbolic = %A.loc10_25.2 (constants.%A.3)] -// CHECK:STDOUT: %I.type.loc10_33.2: type = facet_type <@I, @I(%V.loc10_14.2)> [symbolic = %I.type.loc10_33.2 (constants.%I.type.3)] +// CHECK:STDOUT: %A.loc10_27.2: type = class_type @A, @A(%V.loc10_14.2) [symbolic = %A.loc10_27.2 (constants.%A.3)] +// CHECK:STDOUT: %I.type.loc10_35.2: type = facet_type <@I, @I(%V.loc10_14.2)> [symbolic = %I.type.loc10_35.2 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%V.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] // CHECK:STDOUT: %.loc10_37.2: = interface_witness (%F) [symbolic = %.loc10_37.2 (constants.%.10)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %A.loc10_25.1 as %I.type.loc10_33.1 { +// CHECK:STDOUT: impl: %A.loc10_27.1 as %I.type.loc10_35.1 { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] { // CHECK:STDOUT: %self.patt: @F.2.%A (%A.3) = binding_pattern self // CHECK:STDOUT: %self.param_patt: @F.2.%A (%A.3) = value_param_pattern %self.patt, runtime_param0 // 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_25.1 [symbolic = %A (constants.%A.3)] +// CHECK:STDOUT: %Self.ref: type = name_ref Self, @impl.%A.loc10_27.1 [symbolic = %A (constants.%A.3)] // 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.3) = value_param runtime_param0 // CHECK:STDOUT: %self: @F.2.%A (%A.3) = bind_name self, %self.param @@ -298,22 +298,22 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: generic fn @TestGeneric(%W.loc16_16.1: type) { // CHECK:STDOUT: %W.loc16_16.2: type = bind_symbolic_name W, 0 [symbolic = %W.loc16_16.2 (constants.%W)] // CHECK:STDOUT: %W.patt.loc16_16.2: type = symbolic_binding_pattern W, 0 [symbolic = %W.patt.loc16_16.2 (constants.%W.patt)] -// CHECK:STDOUT: %A.loc16_30.2: type = class_type @A, @A(%W.loc16_16.2) [symbolic = %A.loc16_30.2 (constants.%A.4)] +// CHECK:STDOUT: %A.loc16_32.2: type = class_type @A, @A(%W.loc16_16.2) [symbolic = %A.loc16_32.2 (constants.%A.4)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type.loc17_14.2: type = facet_type <@I, @I(%W.loc16_16.2)> [symbolic = %I.type.loc17_14.2 (constants.%I.type.4)] +// CHECK:STDOUT: %I.type.loc17_16.2: type = facet_type <@I, @I(%W.loc16_16.2)> [symbolic = %I.type.loc17_16.2 (constants.%I.type.4)] // CHECK:STDOUT: %F.type.loc17_17: type = fn_type @F.1, @I(%W.loc16_16.2) [symbolic = %F.type.loc17_17 (constants.%F.type.4)] -// CHECK:STDOUT: %.loc17_17.2: type = assoc_entity_type @TestGeneric.%I.type.loc17_14.2 (%I.type.4), @TestGeneric.%F.type.loc17_17 (%F.type.4) [symbolic = %.loc17_17.2 (constants.%.19)] +// CHECK:STDOUT: %.loc17_17.2: type = assoc_entity_type @TestGeneric.%I.type.loc17_16.2 (%I.type.4), @TestGeneric.%F.type.loc17_17 (%F.type.4) [symbolic = %.loc17_17.2 (constants.%.19)] // CHECK:STDOUT: %.loc17_17.3: @TestGeneric.%.loc17_17.2 (%.19) = assoc_entity element0, @I.%F.decl [symbolic = %.loc17_17.3 (constants.%.20)] // CHECK:STDOUT: %F.type.loc17_11: type = fn_type @F.2, @impl(%W.loc16_16.2) [symbolic = %F.type.loc17_11 (constants.%F.type.5)] // CHECK:STDOUT: %F: @TestGeneric.%F.type.loc17_11 (%F.type.5) = struct_value () [symbolic = %F (constants.%F.5)] // CHECK:STDOUT: -// CHECK:STDOUT: fn[%W.param_patt: type](%a.param_patt: @TestGeneric.%A.loc16_30.2 (%A.4)) -> @TestGeneric.%W.loc16_16.2 (%W) { +// CHECK:STDOUT: fn[%W.param_patt: type](%a.param_patt: @TestGeneric.%A.loc16_32.2 (%A.4)) -> @TestGeneric.%W.loc16_16.2 (%W) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %a.ref: @TestGeneric.%A.loc16_30.2 (%A.4) = name_ref a, %a +// CHECK:STDOUT: %a.ref: @TestGeneric.%A.loc16_32.2 (%A.4) = name_ref a, %a // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %W.ref.loc17: type = name_ref W, %W.loc16_16.1 [symbolic = %W.loc16_16.2 (constants.%W)] -// CHECK:STDOUT: %I.type.loc17_14.1: type = facet_type <@I, @I(constants.%W)> [symbolic = %I.type.loc17_14.2 (constants.%I.type.4)] +// CHECK:STDOUT: %I.type.loc17_16.1: type = facet_type <@I, @I(constants.%W)> [symbolic = %I.type.loc17_16.2 (constants.%I.type.4)] // CHECK:STDOUT: %.loc17_17.1: @TestGeneric.%.loc17_17.2 (%.19) = specific_constant @I.%.loc7_26.1, @I(constants.%W) [symbolic = %.loc17_17.3 (constants.%.20)] // CHECK:STDOUT: %F.ref: @TestGeneric.%.loc17_17.2 (%.19) = name_ref F, %.loc17_17.1 [symbolic = %.loc17_17.3 (constants.%.20)] // CHECK:STDOUT: %.loc17_11.1: @TestGeneric.%F.type.loc17_17 (%F.type.4) = interface_witness_access constants.%.21, element0 [symbolic = %F (constants.%F.5)] @@ -331,7 +331,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %a.ref: %A.5 = name_ref a, %a // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %.loc21_16: %.22 = struct_literal () -// CHECK:STDOUT: %.loc21_14: type = converted %.loc21_16, constants.%.22 [template = constants.%.22] +// CHECK:STDOUT: %.loc21_17: type = converted %.loc21_16, constants.%.22 [template = constants.%.22] // CHECK:STDOUT: %I.type: type = facet_type <@I, @I(constants.%.22)> [template = constants.%I.type.5] // CHECK:STDOUT: %.loc21_18: %.28 = specific_constant @I.%.loc7_26.1, @I(constants.%.22) [template = constants.%.29] // CHECK:STDOUT: %F.ref: %.28 = name_ref F, %.loc21_18 [template = constants.%.29] @@ -339,8 +339,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: %.loc21_11.2: = bound_method %a.ref, %.loc21_11.1 // CHECK:STDOUT: %.loc21_11.3: = specific_function %.loc21_11.2, @F.2(constants.%.22) // CHECK:STDOUT: %F.call: init %.22 = call %.loc21_11.3(%a.ref) -// CHECK:STDOUT: %.loc21_21.1: ref %.22 = temporary_storage -// CHECK:STDOUT: %.loc21_21.2: ref %.22 = temporary %.loc21_21.1, %F.call +// CHECK:STDOUT: %.loc21_22.1: ref %.22 = temporary_storage +// CHECK:STDOUT: %.loc21_22.2: ref %.22 = temporary %.loc21_22.1, %F.call // CHECK:STDOUT: %struct: %.22 = struct_value () [template = constants.%struct] // CHECK:STDOUT: %.loc21_23: %.22 = converted %F.call, %struct [template = constants.%struct] // CHECK:STDOUT: return %.loc21_23 @@ -415,8 +415,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @impl(constants.%V) { // CHECK:STDOUT: %V.loc10_14.2 => constants.%V // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%V -// CHECK:STDOUT: %A.loc10_25.2 => constants.%A.3 -// CHECK:STDOUT: %I.type.loc10_33.2 => constants.%I.type.3 +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.3 +// CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 @@ -444,8 +444,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @impl(%V.loc10_14.2) { // CHECK:STDOUT: %V.loc10_14.2 => constants.%V // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%V -// CHECK:STDOUT: %A.loc10_25.2 => constants.%A.3 -// CHECK:STDOUT: %I.type.loc10_33.2 => constants.%I.type.3 +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.3 +// CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%W) { @@ -467,7 +467,7 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @TestGeneric(constants.%W) { // CHECK:STDOUT: %W.loc16_16.2 => constants.%W // CHECK:STDOUT: %W.patt.loc16_16.2 => constants.%W -// CHECK:STDOUT: %A.loc16_30.2 => constants.%A.4 +// CHECK:STDOUT: %A.loc16_32.2 => constants.%A.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%W) { @@ -486,8 +486,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @impl(constants.%W) { // CHECK:STDOUT: %V.loc10_14.2 => constants.%W // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%W -// CHECK:STDOUT: %A.loc10_25.2 => constants.%A.4 -// CHECK:STDOUT: %I.type.loc10_33.2 => constants.%I.type.4 +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.4 +// CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.5 @@ -511,8 +511,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @impl(@TestGeneric.%W.loc16_16.2) { // CHECK:STDOUT: %V.loc10_14.2 => constants.%W // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%W -// CHECK:STDOUT: %A.loc10_25.2 => constants.%A.4 -// CHECK:STDOUT: %I.type.loc10_33.2 => constants.%I.type.4 +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.4 +// CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.4 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @A(constants.%.22) { @@ -542,8 +542,8 @@ fn TestSpecific(a: A({})) -> {} { // CHECK:STDOUT: specific @impl(constants.%.22) { // CHECK:STDOUT: %V.loc10_14.2 => constants.%.22 // CHECK:STDOUT: %V.patt.loc10_14.2 => constants.%.22 -// CHECK:STDOUT: %A.loc10_25.2 => constants.%A.5 -// CHECK:STDOUT: %I.type.loc10_33.2 => constants.%I.type.5 +// CHECK:STDOUT: %A.loc10_27.2 => constants.%A.5 +// CHECK:STDOUT: %I.type.loc10_35.2 => constants.%I.type.5 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.7 diff --git a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon index db884895d7fba..a619be3311e2d 100644 --- a/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon +++ b/toolchain/check/testdata/impl/lookup/no_prelude/import.carbon @@ -1596,7 +1596,7 @@ fn Test(c: HasExtraInterfaces.C(type)) { // CHECK:STDOUT: %Extra7.ref: type = name_ref Extra7, file.%Extra7.decl [template = constants.%Extra7.type] // CHECK:STDOUT: %Extra8.ref: type = name_ref Extra8, file.%Extra8.decl [template = constants.%Extra8.type] // CHECK:STDOUT: %.loc16_71: %tuple.type.1 = tuple_literal (%Extra1.ref, %Extra2.ref, %Extra3.ref, %Extra4.ref, %Extra5.ref, %Extra6.ref, %Extra7.ref, %Extra8.ref) -// CHECK:STDOUT: %.loc16_7: type = converted %.loc16_71, constants.%tuple.type.2 [template = constants.%tuple.type.2] +// CHECK:STDOUT: %.loc16_72: type = converted %.loc16_71, constants.%tuple.type.2 [template = constants.%tuple.type.2] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.type.2) [template = constants.%C.3] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon index 2818d0e63af79..3be4d43da5be2 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon @@ -74,7 +74,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [template = constants.%C] // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc7_14.1 [symbolic = %T.loc7_14.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc7_30.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc7_30.2 (constants.%I.type.2)] +// CHECK:STDOUT: %I.type.loc7_32.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc7_32.2 (constants.%I.type.2)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc7_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: } @@ -86,7 +86,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc8_14.1 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %.loc8_32.1: type = ptr_type %T [symbolic = %.loc8_32.2 (constants.%.3)] -// CHECK:STDOUT: %I.type.loc8_30.1: type = facet_type <@I, @I(constants.%.3)> [symbolic = %I.type.loc8_30.2 (constants.%I.type.3)] +// CHECK:STDOUT: %I.type.loc8_33.1: type = facet_type <@I, @I(constants.%.3)> [symbolic = %I.type.loc8_33.2 (constants.%I.type.3)] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc8_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: } @@ -112,20 +112,20 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: generic impl @impl.1(%T.loc7_14.1: type) { // CHECK:STDOUT: %T.loc7_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc7_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc7_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %I.type.loc7_30.2: type = facet_type <@I, @I(%T.loc7_14.2)> [symbolic = %I.type.loc7_30.2 (constants.%I.type.2)] +// CHECK:STDOUT: %I.type.loc7_32.2: type = facet_type <@I, @I(%T.loc7_14.2)> [symbolic = %I.type.loc7_32.2 (constants.%I.type.2)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc7_30.1; +// CHECK:STDOUT: impl: %C.ref as %I.type.loc7_32.1; // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: generic impl @impl.2(%T.loc8_14.1: type) { // CHECK:STDOUT: %T.loc8_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc8_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc8_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc8_14.2 (constants.%T.patt)] // CHECK:STDOUT: %.loc8_32.2: type = ptr_type @impl.2.%T.loc8_14.2 (%T) [symbolic = %.loc8_32.2 (constants.%.3)] -// CHECK:STDOUT: %I.type.loc8_30.2: type = facet_type <@I, @I(%.loc8_32.2)> [symbolic = %I.type.loc8_30.2 (constants.%I.type.3)] +// CHECK:STDOUT: %I.type.loc8_33.2: type = facet_type <@I, @I(%.loc8_32.2)> [symbolic = %I.type.loc8_33.2 (constants.%I.type.3)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.ref as %I.type.loc8_30.1 { +// CHECK:STDOUT: impl: %C.ref as %I.type.loc8_33.1 { // CHECK:STDOUT: %.loc8_35: = interface_witness () [template = constants.%.4] // CHECK:STDOUT: // CHECK:STDOUT: !members: @@ -159,7 +159,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: specific @impl.1(constants.%T) { // CHECK:STDOUT: %T.loc7_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc7_14.2 => constants.%T -// CHECK:STDOUT: %I.type.loc7_30.2 => constants.%I.type.2 +// CHECK:STDOUT: %I.type.loc7_32.2 => constants.%I.type.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @I(constants.%.3) { @@ -180,7 +180,7 @@ impl forall [T:! type] C as I(T*) {} // CHECK:STDOUT: %T.loc8_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc8_14.2 => constants.%T // CHECK:STDOUT: %.loc8_32.2 => constants.%.3 -// CHECK:STDOUT: %I.type.loc8_30.2 => constants.%I.type.3 +// CHECK:STDOUT: %I.type.loc8_33.2 => constants.%I.type.3 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- import_generic.impl.carbon diff --git a/toolchain/check/testdata/impl/no_prelude/import_self.carbon b/toolchain/check/testdata/impl/no_prelude/import_self.carbon index 911a4390a2bcb..2acdb551da7f2 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_self.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_self.carbon @@ -213,8 +213,8 @@ fn F(x: (), y: ()) -> () { // CHECK:STDOUT: %.loc11_11.2: = bound_method %x.ref, %.loc11_11.1 // CHECK:STDOUT: %y.ref: %empty_tuple.type = name_ref y, %y // CHECK:STDOUT: %Op.call: init %empty_tuple.type = call %.loc11_11.2(%x.ref, %y.ref) -// CHECK:STDOUT: %.loc11_20.1: ref %empty_tuple.type = temporary_storage -// CHECK:STDOUT: %.loc11_20.2: ref %empty_tuple.type = temporary %.loc11_20.1, %Op.call +// CHECK:STDOUT: %.loc11_22.1: ref %empty_tuple.type = temporary_storage +// CHECK:STDOUT: %.loc11_22.2: ref %empty_tuple.type = temporary %.loc11_22.1, %Op.call // CHECK:STDOUT: %tuple: %empty_tuple.type = tuple_value () [template = constants.%empty_tuple] // CHECK:STDOUT: %.loc11_23: %empty_tuple.type = converted %Op.call, %tuple [template = constants.%empty_tuple] // CHECK:STDOUT: return %.loc11_23 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 02db99b32a356..99db828b5dac9 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_use_generic.carbon @@ -80,7 +80,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: } { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc10_14.1 [symbolic = %T.loc10_14.2 (constants.%T)] -// CHECK:STDOUT: %C.loc10_25.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_25.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc10_27.1: type = class_type @C, @C(constants.%T) [symbolic = %C.loc10_27.2 (constants.%C.2)] // CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type] // CHECK:STDOUT: %T.param: type = value_param runtime_param // CHECK:STDOUT: %T.loc10_14.1: type = bind_symbolic_name T, 0, %T.param [symbolic = %T.loc10_14.2 (constants.%T)] @@ -101,14 +101,14 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: generic impl @impl(%T.loc10_14.1: type) { // CHECK:STDOUT: %T.loc10_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc10_14.2 (constants.%T)] // CHECK:STDOUT: %T.patt.loc10_14.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc10_14.2 (constants.%T.patt)] -// CHECK:STDOUT: %C.loc10_25.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_25.2 (constants.%C.2)] +// CHECK:STDOUT: %C.loc10_27.2: type = class_type @C, @C(%T.loc10_14.2) [symbolic = %C.loc10_27.2 (constants.%C.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type: type = fn_type @F.2, @impl(%T.loc10_14.2) [symbolic = %F.type (constants.%F.type.2)] // CHECK:STDOUT: %F: @impl.%F.type (%F.type.2) = struct_value () [symbolic = %F (constants.%F.2)] // CHECK:STDOUT: %.loc10_34.2: = interface_witness (%F) [symbolic = %.loc10_34.2 (constants.%.6)] // CHECK:STDOUT: -// CHECK:STDOUT: impl: %C.loc10_25.1 as %I.ref { +// CHECK:STDOUT: impl: %C.loc10_27.1 as %I.ref { // CHECK:STDOUT: %F.decl: @impl.%F.type (%F.type.2) = fn_decl @F.2 [symbolic = @impl.%F (constants.%F.2)] {} {} // CHECK:STDOUT: %.loc10_34.1: = interface_witness (%F.decl) [symbolic = %.loc10_34.2 (constants.%.6)] // CHECK:STDOUT: @@ -162,7 +162,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: specific @impl(constants.%T) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T -// CHECK:STDOUT: %C.loc10_25.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.2 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: %F.type => constants.%F.type.2 @@ -177,7 +177,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: specific @impl(%T.loc10_14.2) { // CHECK:STDOUT: %T.loc10_14.2 => constants.%T // CHECK:STDOUT: %T.patt.loc10_14.2 => constants.%T -// CHECK:STDOUT: %C.loc10_25.2 => constants.%C.2 +// CHECK:STDOUT: %C.loc10_27.2 => constants.%C.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: --- fail_use_in_fn_decl.carbon @@ -232,7 +232,7 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %default.import = import // CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.1 [template = constants.%C.1] // CHECK:STDOUT: %.loc6_11: %.1 = struct_literal () -// CHECK:STDOUT: %.loc6_9: type = converted %.loc6_11, constants.%.1 [template = constants.%.1] +// CHECK:STDOUT: %.loc6_12: type = converted %.loc6_11, constants.%.1 [template = constants.%.1] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.1) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var @@ -246,9 +246,9 @@ fn F() -> c.(I.F)() {} // CHECK:STDOUT: %.loc15_12.1: %F.type.1 = interface_witness_access constants.%.7, element0 [template = constants.%F.3] // CHECK:STDOUT: %.loc15_12.2: = specific_function %.loc15_12.1, @F.2(constants.%.1) [template = constants.%.8] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %.loc15_12.2() -// CHECK:STDOUT: %.loc15_18.1: ref %empty_tuple.type = temporary_storage -// CHECK:STDOUT: %.loc15_18.2: ref %empty_tuple.type = temporary %.loc15_18.1, %F.call -// CHECK:STDOUT: %.loc15_19: type = converted %F.call, [template = ] +// CHECK:STDOUT: %.loc15_19.1: ref %empty_tuple.type = temporary_storage +// CHECK:STDOUT: %.loc15_19.2: ref %empty_tuple.type = temporary %.loc15_19.1, %F.call +// CHECK:STDOUT: %.loc15_19.3: type = converted %F.call, [template = ] // CHECK:STDOUT: %return.param: ref = out_param runtime_param0 // CHECK:STDOUT: %return: ref = return_slot %return.param // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/expr_category.carbon b/toolchain/check/testdata/index/expr_category.carbon index 07bc4c717cd57..1a01386f8ece7 100644 --- a/toolchain/check/testdata/index/expr_category.carbon +++ b/toolchain/check/testdata/index/expr_category.carbon @@ -271,17 +271,17 @@ fn ValueBinding(b: [i32; 3]) { // CHECK:STDOUT: %.loc27_6.2: ref %i32 = array_index %.loc27_6.1, %.loc27_5.6 // CHECK:STDOUT: %.loc27_6.3: %i32 = bind_value %.loc27_6.2 // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc28_4.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %F.call: init %.3 = call %F.ref() to %.loc28_4.1 +// CHECK:STDOUT: %.loc28_5.1: ref %.3 = temporary_storage +// CHECK:STDOUT: %F.call: init %.3 = call %F.ref() to %.loc28_5.1 // CHECK:STDOUT: %.loc28_7.1: Core.IntLiteral = int_value 0 [template = constants.%.7] -// CHECK:STDOUT: %.loc28_4.2: ref %.3 = temporary %.loc28_4.1, %F.call +// CHECK:STDOUT: %.loc28_5.2: ref %.3 = temporary %.loc28_5.1, %F.call // CHECK:STDOUT: %.loc28_7.2: %Convert.type.2 = interface_witness_access constants.%.31, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc28_7.3: = bound_method %.loc28_7.1, %.loc28_7.2 [template = constants.%.42] // CHECK:STDOUT: %.loc28_7.4: = specific_function %.loc28_7.3, @Convert.2(constants.%.1) [template = constants.%.43] // CHECK:STDOUT: %int.convert_checked.loc28: init %i32 = call %.loc28_7.4(%.loc28_7.1) [template = constants.%.44] // CHECK:STDOUT: %.loc28_7.5: %i32 = value_of_initializer %int.convert_checked.loc28 [template = constants.%.44] // CHECK:STDOUT: %.loc28_7.6: %i32 = converted %.loc28_7.1, %.loc28_7.5 [template = constants.%.44] -// CHECK:STDOUT: %.loc28_8.1: ref %i32 = array_index %.loc28_4.2, %.loc28_7.6 +// CHECK:STDOUT: %.loc28_8.1: ref %i32 = array_index %.loc28_5.2, %.loc28_7.6 // CHECK:STDOUT: %.loc28_8.2: %i32 = bind_value %.loc28_8.1 // CHECK:STDOUT: return // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 2c51a5e6b73e3..08dbc5b9245f5 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -158,32 +158,32 @@ fn G(b: [i32; 3]) { // CHECK:STDOUT: %pf.var: ref %.5 = var pf // CHECK:STDOUT: %pf: ref %.5 = bind_name pf, %pf.var // CHECK:STDOUT: %F.ref.loc32: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc32_20.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %F.call.loc32: init %.3 = call %F.ref.loc32() to %.loc32_20.1 +// CHECK:STDOUT: %.loc32_21.1: ref %.3 = temporary_storage +// CHECK:STDOUT: %F.call.loc32: init %.3 = call %F.ref.loc32() to %.loc32_21.1 // CHECK:STDOUT: %.loc32_23.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc32_20.2: ref %.3 = temporary %.loc32_20.1, %F.call.loc32 +// CHECK:STDOUT: %.loc32_21.2: ref %.3 = temporary %.loc32_21.1, %F.call.loc32 // CHECK:STDOUT: %.loc32_23.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc32_23.3: = bound_method %.loc32_23.1, %.loc32_23.2 [template = constants.%.31] // CHECK:STDOUT: %.loc32_23.4: = specific_function %.loc32_23.3, @Convert.2(constants.%.1) [template = constants.%.32] // CHECK:STDOUT: %int.convert_checked.loc32: init %i32 = call %.loc32_23.4(%.loc32_23.1) [template = constants.%.33] // CHECK:STDOUT: %.loc32_23.5: %i32 = value_of_initializer %int.convert_checked.loc32 [template = constants.%.33] // CHECK:STDOUT: %.loc32_23.6: %i32 = converted %.loc32_23.1, %.loc32_23.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc32_24.1: ref %i32 = array_index %.loc32_20.2, %.loc32_23.6 +// CHECK:STDOUT: %.loc32_24.1: ref %i32 = array_index %.loc32_21.2, %.loc32_23.6 // CHECK:STDOUT: %.loc32_24.2: %i32 = bind_value %.loc32_24.1 // CHECK:STDOUT: %.loc32_18: %.5 = addr_of [template = ] // CHECK:STDOUT: assign %pf.var, %.loc32_18 // CHECK:STDOUT: %F.ref.loc36: %F.type = name_ref F, file.%F.decl [template = constants.%F] -// CHECK:STDOUT: %.loc36_4.1: ref %.3 = temporary_storage -// CHECK:STDOUT: %F.call.loc36: init %.3 = call %F.ref.loc36() to %.loc36_4.1 +// CHECK:STDOUT: %.loc36_5.1: ref %.3 = temporary_storage +// CHECK:STDOUT: %F.call.loc36: init %.3 = call %F.ref.loc36() to %.loc36_5.1 // CHECK:STDOUT: %.loc36_7.1: Core.IntLiteral = int_value 0 [template = constants.%.6] -// CHECK:STDOUT: %.loc36_4.2: ref %.3 = temporary %.loc36_4.1, %F.call.loc36 +// CHECK:STDOUT: %.loc36_5.2: ref %.3 = temporary %.loc36_5.1, %F.call.loc36 // CHECK:STDOUT: %.loc36_7.2: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] // CHECK:STDOUT: %.loc36_7.3: = bound_method %.loc36_7.1, %.loc36_7.2 [template = constants.%.31] // CHECK:STDOUT: %.loc36_7.4: = specific_function %.loc36_7.3, @Convert.2(constants.%.1) [template = constants.%.32] // CHECK:STDOUT: %int.convert_checked.loc36_7: init %i32 = call %.loc36_7.4(%.loc36_7.1) [template = constants.%.33] // CHECK:STDOUT: %.loc36_7.5: %i32 = value_of_initializer %int.convert_checked.loc36_7 [template = constants.%.33] // CHECK:STDOUT: %.loc36_7.6: %i32 = converted %.loc36_7.1, %.loc36_7.5 [template = constants.%.33] -// CHECK:STDOUT: %.loc36_8.1: ref %i32 = array_index %.loc36_4.2, %.loc36_7.6 +// CHECK:STDOUT: %.loc36_8.1: ref %i32 = array_index %.loc36_5.2, %.loc36_7.6 // CHECK:STDOUT: %.loc36_8.2: %i32 = bind_value %.loc36_8.1 // CHECK:STDOUT: %.loc36_12: Core.IntLiteral = int_value 4 [template = constants.%.34] // CHECK:STDOUT: %.loc36_10.1: %Convert.type.2 = interface_witness_access constants.%.30, element0 [template = constants.%Convert.14] diff --git a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon index 59cb088e8bc8a..7b2402528e058 100644 --- a/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/assoc_const_in_generic.carbon @@ -121,16 +121,16 @@ fn H() { // CHECK:STDOUT: %T.patt.loc15_6.2: type = symbolic_binding_pattern T, 0 [symbolic = %T.patt.loc15_6.2 (constants.%T.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type.loc19_4.2: type = facet_type <@I, @I(%T.loc15_6.2)> [symbolic = %I.type.loc19_4.2 (constants.%I.type.2)] +// CHECK:STDOUT: %I.type.loc19_6.2: type = facet_type <@I, @I(%T.loc15_6.2)> [symbolic = %I.type.loc19_6.2 (constants.%I.type.2)] // CHECK:STDOUT: %F.type: type = fn_type @F, @I(%T.loc15_6.2) [symbolic = %F.type (constants.%F.type.1)] -// CHECK:STDOUT: %.loc19_7.2: type = assoc_entity_type @G.%I.type.loc19_4.2 (%I.type.2), @G.%F.type (%F.type.1) [symbolic = %.loc19_7.2 (constants.%.1)] +// CHECK:STDOUT: %.loc19_7.2: type = assoc_entity_type @G.%I.type.loc19_6.2 (%I.type.2), @G.%F.type (%F.type.1) [symbolic = %.loc19_7.2 (constants.%.1)] // CHECK:STDOUT: %.loc19_7.3: @G.%.loc19_7.2 (%.1) = assoc_entity element0, @I.%F.decl [symbolic = %.loc19_7.3 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: fn(%T.param_patt: type) { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %I.ref: %I.type.1 = name_ref I, file.%I.decl [template = constants.%I] // CHECK:STDOUT: %T.ref: type = name_ref T, %T.loc15_6.1 [symbolic = %T.loc15_6.2 (constants.%T)] -// CHECK:STDOUT: %I.type.loc19_4.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc19_4.2 (constants.%I.type.2)] +// CHECK:STDOUT: %I.type.loc19_6.1: type = facet_type <@I, @I(constants.%T)> [symbolic = %I.type.loc19_6.2 (constants.%I.type.2)] // CHECK:STDOUT: %.loc19_7.1: @G.%.loc19_7.2 (%.1) = specific_constant @I.%.loc12_22.1, @I(constants.%T) [symbolic = %.loc19_7.3 (constants.%.2)] // CHECK:STDOUT: %F.ref: @G.%.loc19_7.2 (%.1) = name_ref F, %.loc19_7.1 [symbolic = %.loc19_7.3 (constants.%.2)] // CHECK:STDOUT: return @@ -141,7 +141,7 @@ fn H() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] // CHECK:STDOUT: %.loc23_6: %.3 = struct_literal () -// CHECK:STDOUT: %.loc23_4: type = converted %.loc23_6, constants.%.3 [template = constants.%.3] +// CHECK:STDOUT: %.loc23_7: type = converted %.loc23_6, constants.%.3 [template = constants.%.3] // CHECK:STDOUT: %.loc23_3: = specific_function %G.ref, @G(constants.%.3) [template = constants.%.4] // CHECK:STDOUT: %G.call: init %empty_tuple.type = call %.loc23_3() // CHECK:STDOUT: return @@ -185,7 +185,7 @@ fn H() { // CHECK:STDOUT: %T.patt.loc15_6.2 => constants.%.3 // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %I.type.loc19_4.2 => constants.%I.type.3 +// CHECK:STDOUT: %I.type.loc19_6.2 => constants.%I.type.3 // CHECK:STDOUT: %F.type => constants.%F.type.2 // CHECK:STDOUT: %.loc19_7.2 => constants.%.5 // CHECK:STDOUT: %.loc19_7.3 => constants.%.6 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 c63f847d0ea9b..d9a8731d14dc9 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon @@ -17,7 +17,7 @@ interface Interface { fn F() { // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:3: error: value of type ` in Interface>` is not callable [CallToNonCallable] // CHECK:STDERR: Interface.F(); - // CHECK:STDERR: ^~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: Interface.F(); 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 b65c8745e96b6..564481be8b877 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 @@ -13,7 +13,7 @@ interface Interface { fn F(); } fn CallStatic(T:! Interface) { // CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+4]]:3: error: value of type `` is not callable [CallToNonCallable] // CHECK:STDERR: T.F(); - // CHECK:STDERR: ^~~~ + // CHECK:STDERR: ^~~~~ // CHECK:STDERR: T.F(); } diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index e5c989ef51d24..6c5d689d04cde 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -51,7 +51,7 @@ fn G(T:! Generic(B)) { // TODO: Include generic arguments in the type name. // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+6]]:3: error: `Core.ImplicitAs` implicitly referenced here, but package `Core` not found [CoreNotFound] // CHECK:STDERR: F(T); - // CHECK:STDERR: ^~ + // CHECK:STDERR: ^~~~ // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn F(T:! Generic(A)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ diff --git a/toolchain/check/testdata/namespace/merging_with_indirections.carbon b/toolchain/check/testdata/namespace/merging_with_indirections.carbon index 630cff4d2ffe8..361e1e9a5195e 100644 --- a/toolchain/check/testdata/namespace/merging_with_indirections.carbon +++ b/toolchain/check/testdata/namespace/merging_with_indirections.carbon @@ -205,9 +205,9 @@ fn Run() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %Other.ref.loc7: = name_ref Other, imports.%Other [template = imports.%Other] // CHECK:STDOUT: %F.ref.loc7: %F.type = name_ref F, imports.%import_ref.1 [template = constants.%F] -// CHECK:STDOUT: %.loc7_10.1: ref %A = temporary_storage -// CHECK:STDOUT: %F.call.loc7: init %A = call %F.ref.loc7() to %.loc7_10.1 -// CHECK:STDOUT: %.loc7_10.2: ref %A = temporary %.loc7_10.1, %F.call.loc7 +// 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] diff --git a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon index 85ac590672bd7..e89845279b912 100644 --- a/toolchain/check/testdata/operators/overloaded/implicit_as.carbon +++ b/toolchain/check/testdata/operators/overloaded/implicit_as.carbon @@ -107,8 +107,8 @@ fn Test() { // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] // CHECK:STDOUT: %.loc19_27: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc19_27) [template = constants.%i32] -// CHECK:STDOUT: %.loc19_26.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc19_26.2: type = converted %int.make_type_signed, %.loc19_26.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc19_30.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc19_30.2: type = converted %int.make_type_signed, %.loc19_30.1 [template = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.4] // CHECK:STDOUT: } // CHECK:STDOUT: %Sink_i32.decl: %Sink_i32.type = fn_decl @Sink_i32 [template = constants.%Sink_i32] { @@ -256,34 +256,34 @@ fn Test() { // CHECK:STDOUT: %Source.ref.loc30: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %X.ref: type = name_ref X, file.%X.decl [template = constants.%X] // CHECK:STDOUT: %.loc30_12: = specific_function %Source.ref.loc30, @Source(constants.%X) [template = constants.%.19] -// CHECK:STDOUT: %.loc30_18.1: ref %X = temporary_storage -// CHECK:STDOUT: %Source.call.loc30: init %X = call %.loc30_12() to %.loc30_18.1 -// CHECK:STDOUT: %.loc30_18.2: %Convert.type.5 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.4] -// CHECK:STDOUT: %.loc30_18.3: = bound_method %Source.call.loc30, %.loc30_18.2 -// CHECK:STDOUT: %.loc30_18.4: ref %X = temporary %.loc30_18.1, %Source.call.loc30 -// CHECK:STDOUT: %.loc30_18.5: %X = bind_value %.loc30_18.4 -// CHECK:STDOUT: %Convert.call.loc30: init %i32 = call %.loc30_18.3(%.loc30_18.5) -// CHECK:STDOUT: %.loc30_18.6: %i32 = value_of_initializer %Convert.call.loc30 -// CHECK:STDOUT: %.loc30_18.7: %i32 = converted %Source.call.loc30, %.loc30_18.6 -// CHECK:STDOUT: %Sink_i32.call: init %empty_tuple.type = call %Sink_i32.ref(%.loc30_18.7) +// CHECK:STDOUT: %.loc30_20.1: ref %X = temporary_storage +// CHECK:STDOUT: %Source.call.loc30: init %X = call %.loc30_12() to %.loc30_20.1 +// CHECK:STDOUT: %.loc30_20.2: %Convert.type.5 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.4] +// CHECK:STDOUT: %.loc30_20.3: = bound_method %Source.call.loc30, %.loc30_20.2 +// CHECK:STDOUT: %.loc30_20.4: ref %X = temporary %.loc30_20.1, %Source.call.loc30 +// CHECK:STDOUT: %.loc30_20.5: %X = bind_value %.loc30_20.4 +// CHECK:STDOUT: %Convert.call.loc30: init %i32 = call %.loc30_20.3(%.loc30_20.5) +// CHECK:STDOUT: %.loc30_20.6: %i32 = value_of_initializer %Convert.call.loc30 +// CHECK:STDOUT: %.loc30_20.7: %i32 = converted %Source.call.loc30, %.loc30_20.6 +// CHECK:STDOUT: %Sink_i32.call: init %empty_tuple.type = call %Sink_i32.ref(%.loc30_20.7) // CHECK:STDOUT: %Sink_X.ref: %Sink_X.type = name_ref Sink_X, file.%Sink_X.decl [template = constants.%Sink_X] // CHECK:STDOUT: %Source.ref.loc31: %Source.type = name_ref Source, file.%Source.decl [template = constants.%Source] // CHECK:STDOUT: %.loc31_17: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc31_17) [template = constants.%i32] -// CHECK:STDOUT: %.loc31_16.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc31_16.2: type = converted %int.make_type_signed, %.loc31_16.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc31_20.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc31_20.2: type = converted %int.make_type_signed, %.loc31_20.1 [template = constants.%i32] // CHECK:STDOUT: %.loc31_10: = specific_function %Source.ref.loc31, @Source(constants.%i32) [template = constants.%.37] // CHECK:STDOUT: %Source.call.loc31: init %i32 = call %.loc31_10() -// CHECK:STDOUT: %.loc31_16.3: %Convert.type.3 = interface_witness_access constants.%.12, element0 [template = constants.%Convert.2] -// CHECK:STDOUT: %.loc31_16.4: = bound_method %Source.call.loc31, %.loc31_16.3 -// CHECK:STDOUT: %.loc31_16.5: ref %X = temporary_storage -// CHECK:STDOUT: %.loc31_16.6: %i32 = value_of_initializer %Source.call.loc31 -// CHECK:STDOUT: %.loc31_16.7: %i32 = converted %Source.call.loc31, %.loc31_16.6 -// CHECK:STDOUT: %Convert.call.loc31: init %X = call %.loc31_16.4(%.loc31_16.7) to %.loc31_16.5 -// CHECK:STDOUT: %.loc31_16.8: init %X = converted %Source.call.loc31, %Convert.call.loc31 -// CHECK:STDOUT: %.loc31_16.9: ref %X = temporary %.loc31_16.5, %.loc31_16.8 -// CHECK:STDOUT: %.loc31_16.10: %X = bind_value %.loc31_16.9 -// CHECK:STDOUT: %Sink_X.call: init %empty_tuple.type = call %Sink_X.ref(%.loc31_16.10) +// CHECK:STDOUT: %.loc31_20.3: %Convert.type.3 = interface_witness_access constants.%.12, element0 [template = constants.%Convert.2] +// CHECK:STDOUT: %.loc31_20.4: = bound_method %Source.call.loc31, %.loc31_20.3 +// CHECK:STDOUT: %.loc31_20.5: ref %X = temporary_storage +// CHECK:STDOUT: %.loc31_20.6: %i32 = value_of_initializer %Source.call.loc31 +// CHECK:STDOUT: %.loc31_20.7: %i32 = converted %Source.call.loc31, %.loc31_20.6 +// CHECK:STDOUT: %Convert.call.loc31: init %X = call %.loc31_20.4(%.loc31_20.7) to %.loc31_20.5 +// CHECK:STDOUT: %.loc31_20.8: init %X = converted %Source.call.loc31, %Convert.call.loc31 +// CHECK:STDOUT: %.loc31_20.9: ref %X = temporary %.loc31_20.5, %.loc31_20.8 +// CHECK:STDOUT: %.loc31_20.10: %X = bind_value %.loc31_20.9 +// CHECK:STDOUT: %Sink_X.call: init %empty_tuple.type = call %Sink_X.ref(%.loc31_20.10) // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/operators/overloaded/index.carbon b/toolchain/check/testdata/operators/overloaded/index.carbon index b92f8a43a1d5b..2838029effc03 100644 --- a/toolchain/check/testdata/operators/overloaded/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/index.carbon @@ -289,10 +289,10 @@ let x: i32 = c[0]; // CHECK:STDOUT: %int.make_type_signed.loc4_35: init type = call constants.%Int(%.loc4_35) [template = constants.%i32] // CHECK:STDOUT: %.loc4_40: Core.IntLiteral = int_value 32 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc4_40: init type = call constants.%Int(%.loc4_40) [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.1: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.2: type = converted %int.make_type_signed.loc4_35, %.loc4_34.1 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.3: type = value_of_initializer %int.make_type_signed.loc4_40 [template = constants.%i32] -// CHECK:STDOUT: %.loc4_34.4: type = converted %int.make_type_signed.loc4_40, %.loc4_34.3 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_43.1: type = value_of_initializer %int.make_type_signed.loc4_35 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_43.2: type = converted %int.make_type_signed.loc4_35, %.loc4_43.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_43.3: type = value_of_initializer %int.make_type_signed.loc4_40 [template = constants.%i32] +// CHECK:STDOUT: %.loc4_43.4: type = converted %int.make_type_signed.loc4_40, %.loc4_43.3 [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: %.loc10_9: Core.IntLiteral = int_value 32 [template = constants.%.1] diff --git a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon index 91ba9117e23c7..f68c39f2245ea 100644 --- a/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon +++ b/toolchain/check/testdata/operators/overloaded/no_prelude/index.carbon @@ -163,7 +163,7 @@ fn F() { ()[()]; } // CHECK:STDOUT: %Core.ref: = name_ref Core, file.%Core [template = file.%Core] // CHECK:STDOUT: %IndexWith.ref: %IndexWith.type.1 = name_ref IndexWith, file.%IndexWith.decl [template = constants.%IndexWith] // CHECK:STDOUT: %.loc9_28: %empty_tuple.type = tuple_literal () -// CHECK:STDOUT: %.loc9_26: type = converted %.loc9_28, constants.%empty_tuple.type [template = constants.%empty_tuple.type] +// CHECK:STDOUT: %.loc9_29: type = converted %.loc9_28, constants.%empty_tuple.type [template = constants.%empty_tuple.type] // CHECK:STDOUT: %IndexWith.type: type = facet_type <@IndexWith, @IndexWith(constants.%empty_tuple.type)> [template = constants.%IndexWith.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {} {} diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index 473fe860d9256..101d15b837690 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -247,9 +247,9 @@ fn AddressOfParam(param: i32) { // CHECK:STDOUT: %.loc53_3: %.6 = addr_of [template = ] // CHECK:STDOUT: %H.ref: %H.type = name_ref H, file.%H.decl [template = constants.%H] // CHECK:STDOUT: %H.call: init %.2 = call %H.ref() -// CHECK:STDOUT: %.loc58_5.1: ref %.2 = temporary_storage -// CHECK:STDOUT: %.loc58_5.2: ref %.2 = temporary %.loc58_5.1, %H.call -// CHECK:STDOUT: %.loc58_7: ref %i32 = struct_access %.loc58_5.2, element0 +// CHECK:STDOUT: %.loc58_6.1: ref %.2 = temporary_storage +// CHECK:STDOUT: %.loc58_6.2: ref %.2 = temporary %.loc58_6.1, %H.call +// CHECK:STDOUT: %.loc58_7: ref %i32 = struct_access %.loc58_6.2, element0 // CHECK:STDOUT: %.loc58_3: %.18 = addr_of [template = ] // CHECK:STDOUT: %.loc63_9: bool = bool_literal true [template = constants.%.5] // CHECK:STDOUT: %.loc63_5: bool = not %.loc63_9 [template = constants.%.17] 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 b746a5aa9078f..00f18b7a7bb40 100644 --- a/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon +++ b/toolchain/check/testdata/return/no_prelude/import_convert_function.carbon @@ -136,8 +136,8 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, file.%ImplicitAs.decl [template = constants.%ImplicitAs] // CHECK:STDOUT: %.loc12_33: Core.IntLiteral = int_value 32 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc12_33) [template = constants.%i32] -// CHECK:STDOUT: %.loc12_32.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] -// CHECK:STDOUT: %.loc12_32.2: type = converted %int.make_type_signed, %.loc12_32.1 [template = constants.%i32] +// CHECK:STDOUT: %.loc12_36.1: type = value_of_initializer %int.make_type_signed [template = constants.%i32] +// CHECK:STDOUT: %.loc12_36.2: type = converted %int.make_type_signed, %.loc12_36.1 [template = constants.%i32] // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32)> [template = constants.%ImplicitAs.type.3] // CHECK:STDOUT: } // CHECK:STDOUT: } @@ -424,11 +424,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.2 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc10_8: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc10_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc10_7.2: = bound_method %.loc10_8, %.loc10_7.1 [template = constants.%.18] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_7.2(%.loc10_8) [template = constants.%.19] -// CHECK:STDOUT: %.loc10_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.19] -// CHECK:STDOUT: %.loc10_7.4: %i32 = converted %.loc10_8, %.loc10_7.3 [template = constants.%.19] +// CHECK:STDOUT: %.loc10_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc10_9.2: = bound_method %.loc10_8, %.loc10_9.1 [template = constants.%.18] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc10_9.2(%.loc10_8) [template = constants.%.19] +// CHECK:STDOUT: %.loc10_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.19] +// CHECK:STDOUT: %.loc10_9.4: %i32 = converted %.loc10_8, %.loc10_9.3 [template = constants.%.19] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.19) [template = constants.%C.3] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] @@ -438,11 +438,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.3 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc11_8: Core.IntLiteral = int_value 1 [template = constants.%.25] -// CHECK:STDOUT: %.loc11_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc11_7.2: = bound_method %.loc11_8, %.loc11_7.1 [template = constants.%.26] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_7.2(%.loc11_8) [template = constants.%.27] -// CHECK:STDOUT: %.loc11_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] -// CHECK:STDOUT: %.loc11_7.4: %i32 = converted %.loc11_8, %.loc11_7.3 [template = constants.%.27] +// CHECK:STDOUT: %.loc11_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc11_9.2: = bound_method %.loc11_8, %.loc11_9.1 [template = constants.%.26] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc11_9.2(%.loc11_8) [template = constants.%.27] +// CHECK:STDOUT: %.loc11_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.27] +// CHECK:STDOUT: %.loc11_9.4: %i32 = converted %.loc11_8, %.loc11_9.3 [template = constants.%.27] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.27) [template = constants.%C.4] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] @@ -452,11 +452,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.4 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc12_8: Core.IntLiteral = int_value 2 [template = constants.%.30] -// CHECK:STDOUT: %.loc12_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc12_7.2: = bound_method %.loc12_8, %.loc12_7.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_7.2(%.loc12_8) [template = constants.%.32] -// CHECK:STDOUT: %.loc12_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] -// CHECK:STDOUT: %.loc12_7.4: %i32 = converted %.loc12_8, %.loc12_7.3 [template = constants.%.32] +// CHECK:STDOUT: %.loc12_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc12_9.2: = bound_method %.loc12_8, %.loc12_9.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc12_9.2(%.loc12_8) [template = constants.%.32] +// CHECK:STDOUT: %.loc12_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.32] +// CHECK:STDOUT: %.loc12_9.4: %i32 = converted %.loc12_8, %.loc12_9.3 [template = constants.%.32] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.32) [template = constants.%C.5] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] @@ -466,11 +466,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.5 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc13_8: Core.IntLiteral = int_value 3 [template = constants.%.35] -// CHECK:STDOUT: %.loc13_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc13_7.2: = bound_method %.loc13_8, %.loc13_7.1 [template = constants.%.36] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_7.2(%.loc13_8) [template = constants.%.37] -// CHECK:STDOUT: %.loc13_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.37] -// CHECK:STDOUT: %.loc13_7.4: %i32 = converted %.loc13_8, %.loc13_7.3 [template = constants.%.37] +// CHECK:STDOUT: %.loc13_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc13_9.2: = bound_method %.loc13_8, %.loc13_9.1 [template = constants.%.36] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc13_9.2(%.loc13_8) [template = constants.%.37] +// CHECK:STDOUT: %.loc13_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.37] +// CHECK:STDOUT: %.loc13_9.4: %i32 = converted %.loc13_8, %.loc13_9.3 [template = constants.%.37] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.37) [template = constants.%C.6] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] @@ -480,11 +480,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.6 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc14_8: Core.IntLiteral = int_value 4 [template = constants.%.40] -// CHECK:STDOUT: %.loc14_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc14_7.2: = bound_method %.loc14_8, %.loc14_7.1 [template = constants.%.41] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_7.2(%.loc14_8) [template = constants.%.42] -// CHECK:STDOUT: %.loc14_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.42] -// CHECK:STDOUT: %.loc14_7.4: %i32 = converted %.loc14_8, %.loc14_7.3 [template = constants.%.42] +// CHECK:STDOUT: %.loc14_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc14_9.2: = bound_method %.loc14_8, %.loc14_9.1 [template = constants.%.41] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc14_9.2(%.loc14_8) [template = constants.%.42] +// CHECK:STDOUT: %.loc14_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.42] +// CHECK:STDOUT: %.loc14_9.4: %i32 = converted %.loc14_8, %.loc14_9.3 [template = constants.%.42] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.42) [template = constants.%C.7] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] @@ -494,11 +494,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.7 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc15_8: Core.IntLiteral = int_value 5 [template = constants.%.45] -// CHECK:STDOUT: %.loc15_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc15_7.2: = bound_method %.loc15_8, %.loc15_7.1 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_7.2(%.loc15_8) [template = constants.%.47] -// CHECK:STDOUT: %.loc15_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.47] -// CHECK:STDOUT: %.loc15_7.4: %i32 = converted %.loc15_8, %.loc15_7.3 [template = constants.%.47] +// CHECK:STDOUT: %.loc15_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc15_9.2: = bound_method %.loc15_8, %.loc15_9.1 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc15_9.2(%.loc15_8) [template = constants.%.47] +// CHECK:STDOUT: %.loc15_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.47] +// CHECK:STDOUT: %.loc15_9.4: %i32 = converted %.loc15_8, %.loc15_9.3 [template = constants.%.47] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.47) [template = constants.%C.8] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] @@ -508,11 +508,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.8 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc16_8: Core.IntLiteral = int_value 6 [template = constants.%.50] -// CHECK:STDOUT: %.loc16_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc16_7.2: = bound_method %.loc16_8, %.loc16_7.1 [template = constants.%.51] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc16_7.2(%.loc16_8) [template = constants.%.52] -// CHECK:STDOUT: %.loc16_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.52] -// CHECK:STDOUT: %.loc16_7.4: %i32 = converted %.loc16_8, %.loc16_7.3 [template = constants.%.52] +// CHECK:STDOUT: %.loc16_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc16_9.2: = bound_method %.loc16_8, %.loc16_9.1 [template = constants.%.51] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc16_9.2(%.loc16_8) [template = constants.%.52] +// CHECK:STDOUT: %.loc16_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.52] +// CHECK:STDOUT: %.loc16_9.4: %i32 = converted %.loc16_8, %.loc16_9.3 [template = constants.%.52] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.52) [template = constants.%C.9] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] @@ -522,11 +522,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: impl_decl @impl.9 [template] {} { // CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C.1] // CHECK:STDOUT: %.loc17_8: Core.IntLiteral = int_value 7 [template = constants.%.55] -// CHECK:STDOUT: %.loc17_7.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc17_7.2: = bound_method %.loc17_8, %.loc17_7.1 [template = constants.%.56] -// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_7.2(%.loc17_8) [template = constants.%.57] -// CHECK:STDOUT: %.loc17_7.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.57] -// CHECK:STDOUT: %.loc17_7.4: %i32 = converted %.loc17_8, %.loc17_7.3 [template = constants.%.57] +// CHECK:STDOUT: %.loc17_9.1: %Convert.type.2 = interface_witness_access constants.%.17, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc17_9.2: = bound_method %.loc17_8, %.loc17_9.1 [template = constants.%.56] +// CHECK:STDOUT: %int.convert_checked: init %i32 = call %.loc17_9.2(%.loc17_8) [template = constants.%.57] +// CHECK:STDOUT: %.loc17_9.3: %i32 = value_of_initializer %int.convert_checked [template = constants.%.57] +// CHECK:STDOUT: %.loc17_9.4: %i32 = converted %.loc17_8, %.loc17_9.3 [template = constants.%.57] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%.57) [template = constants.%C.10] // CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.1 = name_ref ImplicitAs, imports.%import_ref.2 [template = constants.%ImplicitAs] @@ -1318,11 +1318,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc8: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc8: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] // CHECK:STDOUT: %.loc8_33: Core.IntLiteral = int_value 0 [template = constants.%.8] -// CHECK:STDOUT: %.loc8_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc8_32.2: = bound_method %.loc8_33, %.loc8_32.1 [template = constants.%.17] -// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_32.2(%.loc8_33) [template = constants.%.18] -// CHECK:STDOUT: %.loc8_32.3: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.18] -// CHECK:STDOUT: %.loc8_32.4: %i32 = converted %.loc8_33, %.loc8_32.3 [template = constants.%.18] +// CHECK:STDOUT: %.loc8_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc8_34.2: = bound_method %.loc8_33, %.loc8_34.1 [template = constants.%.17] +// CHECK:STDOUT: %int.convert_checked.loc8: init %i32 = call %.loc8_34.2(%.loc8_33) [template = constants.%.18] +// CHECK:STDOUT: %.loc8_34.3: %i32 = value_of_initializer %int.convert_checked.loc8 [template = constants.%.18] +// CHECK:STDOUT: %.loc8_34.4: %i32 = converted %.loc8_33, %.loc8_34.3 [template = constants.%.18] // CHECK:STDOUT: %C.loc8: type = class_type @C, @C(constants.%.18) [template = constants.%C.3] // CHECK:STDOUT: %.loc8_24.2: ref %C.3 = temporary_storage // CHECK:STDOUT: %.loc8_24.3: init %C.3 = class_init (), %.loc8_24.2 [template = constants.%struct.1] @@ -1345,11 +1345,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc9: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc9: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] // CHECK:STDOUT: %.loc9_33: Core.IntLiteral = int_value 1 [template = constants.%.30] -// CHECK:STDOUT: %.loc9_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc9_32.2: = bound_method %.loc9_33, %.loc9_32.1 [template = constants.%.31] -// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_32.2(%.loc9_33) [template = constants.%.22] -// CHECK:STDOUT: %.loc9_32.3: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.22] -// CHECK:STDOUT: %.loc9_32.4: %i32 = converted %.loc9_33, %.loc9_32.3 [template = constants.%.22] +// CHECK:STDOUT: %.loc9_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc9_34.2: = bound_method %.loc9_33, %.loc9_34.1 [template = constants.%.31] +// CHECK:STDOUT: %int.convert_checked.loc9: init %i32 = call %.loc9_34.2(%.loc9_33) [template = constants.%.22] +// CHECK:STDOUT: %.loc9_34.3: %i32 = value_of_initializer %int.convert_checked.loc9 [template = constants.%.22] +// CHECK:STDOUT: %.loc9_34.4: %i32 = converted %.loc9_33, %.loc9_34.3 [template = constants.%.22] // CHECK:STDOUT: %C.loc9: type = class_type @C, @C(constants.%.22) [template = constants.%C.4] // CHECK:STDOUT: %.loc9_24.2: ref %C.4 = temporary_storage // CHECK:STDOUT: %.loc9_24.3: init %C.4 = class_init (), %.loc9_24.2 [template = constants.%struct.2] @@ -1372,11 +1372,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc10: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc10: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] // CHECK:STDOUT: %.loc10_33: Core.IntLiteral = int_value 2 [template = constants.%.33] -// CHECK:STDOUT: %.loc10_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc10_32.2: = bound_method %.loc10_33, %.loc10_32.1 [template = constants.%.34] -// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %.loc10_32.2(%.loc10_33) [template = constants.%.23] -// CHECK:STDOUT: %.loc10_32.3: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%.23] -// CHECK:STDOUT: %.loc10_32.4: %i32 = converted %.loc10_33, %.loc10_32.3 [template = constants.%.23] +// CHECK:STDOUT: %.loc10_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc10_34.2: = bound_method %.loc10_33, %.loc10_34.1 [template = constants.%.34] +// CHECK:STDOUT: %int.convert_checked.loc10: init %i32 = call %.loc10_34.2(%.loc10_33) [template = constants.%.23] +// CHECK:STDOUT: %.loc10_34.3: %i32 = value_of_initializer %int.convert_checked.loc10 [template = constants.%.23] +// CHECK:STDOUT: %.loc10_34.4: %i32 = converted %.loc10_33, %.loc10_34.3 [template = constants.%.23] // CHECK:STDOUT: %C.loc10: type = class_type @C, @C(constants.%.23) [template = constants.%C.5] // CHECK:STDOUT: %.loc10_24.2: ref %C.5 = temporary_storage // CHECK:STDOUT: %.loc10_24.3: init %C.5 = class_init (), %.loc10_24.2 [template = constants.%struct.3] @@ -1399,11 +1399,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc11: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc11: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] // CHECK:STDOUT: %.loc11_33: Core.IntLiteral = int_value 3 [template = constants.%.36] -// CHECK:STDOUT: %.loc11_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc11_32.2: = bound_method %.loc11_33, %.loc11_32.1 [template = constants.%.37] -// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_32.2(%.loc11_33) [template = constants.%.24] -// CHECK:STDOUT: %.loc11_32.3: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%.24] -// CHECK:STDOUT: %.loc11_32.4: %i32 = converted %.loc11_33, %.loc11_32.3 [template = constants.%.24] +// CHECK:STDOUT: %.loc11_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc11_34.2: = bound_method %.loc11_33, %.loc11_34.1 [template = constants.%.37] +// CHECK:STDOUT: %int.convert_checked.loc11: init %i32 = call %.loc11_34.2(%.loc11_33) [template = constants.%.24] +// CHECK:STDOUT: %.loc11_34.3: %i32 = value_of_initializer %int.convert_checked.loc11 [template = constants.%.24] +// CHECK:STDOUT: %.loc11_34.4: %i32 = converted %.loc11_33, %.loc11_34.3 [template = constants.%.24] // CHECK:STDOUT: %C.loc11: type = class_type @C, @C(constants.%.24) [template = constants.%C.6] // CHECK:STDOUT: %.loc11_24.2: ref %C.6 = temporary_storage // CHECK:STDOUT: %.loc11_24.3: init %C.6 = class_init (), %.loc11_24.2 [template = constants.%struct.4] @@ -1426,11 +1426,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc12: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc12: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] // CHECK:STDOUT: %.loc12_33: Core.IntLiteral = int_value 4 [template = constants.%.39] -// CHECK:STDOUT: %.loc12_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc12_32.2: = bound_method %.loc12_33, %.loc12_32.1 [template = constants.%.40] -// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_32.2(%.loc12_33) [template = constants.%.25] -// CHECK:STDOUT: %.loc12_32.3: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.25] -// CHECK:STDOUT: %.loc12_32.4: %i32 = converted %.loc12_33, %.loc12_32.3 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc12_34.2: = bound_method %.loc12_33, %.loc12_34.1 [template = constants.%.40] +// CHECK:STDOUT: %int.convert_checked.loc12: init %i32 = call %.loc12_34.2(%.loc12_33) [template = constants.%.25] +// CHECK:STDOUT: %.loc12_34.3: %i32 = value_of_initializer %int.convert_checked.loc12 [template = constants.%.25] +// CHECK:STDOUT: %.loc12_34.4: %i32 = converted %.loc12_33, %.loc12_34.3 [template = constants.%.25] // CHECK:STDOUT: %C.loc12: type = class_type @C, @C(constants.%.25) [template = constants.%C.7] // CHECK:STDOUT: %.loc12_24.2: ref %C.7 = temporary_storage // CHECK:STDOUT: %.loc12_24.3: init %C.7 = class_init (), %.loc12_24.2 [template = constants.%struct.5] @@ -1453,11 +1453,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc13: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc13: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] // CHECK:STDOUT: %.loc13_33: Core.IntLiteral = int_value 5 [template = constants.%.42] -// CHECK:STDOUT: %.loc13_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc13_32.2: = bound_method %.loc13_33, %.loc13_32.1 [template = constants.%.43] -// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_32.2(%.loc13_33) [template = constants.%.26] -// CHECK:STDOUT: %.loc13_32.3: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.26] -// CHECK:STDOUT: %.loc13_32.4: %i32 = converted %.loc13_33, %.loc13_32.3 [template = constants.%.26] +// CHECK:STDOUT: %.loc13_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc13_34.2: = bound_method %.loc13_33, %.loc13_34.1 [template = constants.%.43] +// CHECK:STDOUT: %int.convert_checked.loc13: init %i32 = call %.loc13_34.2(%.loc13_33) [template = constants.%.26] +// CHECK:STDOUT: %.loc13_34.3: %i32 = value_of_initializer %int.convert_checked.loc13 [template = constants.%.26] +// CHECK:STDOUT: %.loc13_34.4: %i32 = converted %.loc13_33, %.loc13_34.3 [template = constants.%.26] // CHECK:STDOUT: %C.loc13: type = class_type @C, @C(constants.%.26) [template = constants.%C.8] // CHECK:STDOUT: %.loc13_24.2: ref %C.8 = temporary_storage // CHECK:STDOUT: %.loc13_24.3: init %C.8 = class_init (), %.loc13_24.2 [template = constants.%struct.6] @@ -1480,11 +1480,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc14: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc14: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] // CHECK:STDOUT: %.loc14_33: Core.IntLiteral = int_value 6 [template = constants.%.45] -// CHECK:STDOUT: %.loc14_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc14_32.2: = bound_method %.loc14_33, %.loc14_32.1 [template = constants.%.46] -// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_32.2(%.loc14_33) [template = constants.%.27] -// CHECK:STDOUT: %.loc14_32.3: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.27] -// CHECK:STDOUT: %.loc14_32.4: %i32 = converted %.loc14_33, %.loc14_32.3 [template = constants.%.27] +// CHECK:STDOUT: %.loc14_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc14_34.2: = bound_method %.loc14_33, %.loc14_34.1 [template = constants.%.46] +// CHECK:STDOUT: %int.convert_checked.loc14: init %i32 = call %.loc14_34.2(%.loc14_33) [template = constants.%.27] +// CHECK:STDOUT: %.loc14_34.3: %i32 = value_of_initializer %int.convert_checked.loc14 [template = constants.%.27] +// CHECK:STDOUT: %.loc14_34.4: %i32 = converted %.loc14_33, %.loc14_34.3 [template = constants.%.27] // CHECK:STDOUT: %C.loc14: type = class_type @C, @C(constants.%.27) [template = constants.%C.9] // CHECK:STDOUT: %.loc14_24.2: ref %C.9 = temporary_storage // CHECK:STDOUT: %.loc14_24.3: init %C.9 = class_init (), %.loc14_24.2 [template = constants.%struct.7] @@ -1507,11 +1507,11 @@ fn F0(n: i32) -> P.D { // CHECK:STDOUT: %P.ref.loc15: = name_ref P, imports.%P [template = imports.%P] // CHECK:STDOUT: %C.ref.loc15: %C.type = name_ref C, imports.%import_ref.7 [template = constants.%C.1] // CHECK:STDOUT: %.loc15_33: Core.IntLiteral = int_value 7 [template = constants.%.48] -// CHECK:STDOUT: %.loc15_32.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] -// CHECK:STDOUT: %.loc15_32.2: = bound_method %.loc15_33, %.loc15_32.1 [template = constants.%.49] -// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_32.2(%.loc15_33) [template = constants.%.28] -// CHECK:STDOUT: %.loc15_32.3: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.28] -// CHECK:STDOUT: %.loc15_32.4: %i32 = converted %.loc15_33, %.loc15_32.3 [template = constants.%.28] +// CHECK:STDOUT: %.loc15_34.1: %Convert.type.2 = interface_witness_access constants.%.16, element0 [template = constants.%Convert.3] +// CHECK:STDOUT: %.loc15_34.2: = bound_method %.loc15_33, %.loc15_34.1 [template = constants.%.49] +// CHECK:STDOUT: %int.convert_checked.loc15: init %i32 = call %.loc15_34.2(%.loc15_33) [template = constants.%.28] +// CHECK:STDOUT: %.loc15_34.3: %i32 = value_of_initializer %int.convert_checked.loc15 [template = constants.%.28] +// CHECK:STDOUT: %.loc15_34.4: %i32 = converted %.loc15_33, %.loc15_34.3 [template = constants.%.28] // CHECK:STDOUT: %C.loc15: type = class_type @C, @C(constants.%.28) [template = constants.%C.10] // CHECK:STDOUT: %.loc15_24.2: ref %C.10 = temporary_storage // CHECK:STDOUT: %.loc15_24.3: init %C.10 = class_init (), %.loc15_24.2 [template = constants.%struct.8] diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index c25e6b79aecf8..72fac5447eb60 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -182,7 +182,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc9_28.10: %i32 = value_of_initializer %int.convert_checked.loc9_28.2 [template = constants.%.51] // CHECK:STDOUT: %.loc9_28.11: %i32 = converted %.loc9_27, %.loc9_28.10 [template = constants.%.51] // CHECK:STDOUT: %struct: %.39 = struct_value (%.loc9_28.6, %.loc9_28.11) [template = constants.%struct.4] -// CHECK:STDOUT: %.loc9_12: %.39 = converted %.loc9_28.1, %struct [template = constants.%struct.4] +// CHECK:STDOUT: %.loc9_29: %.39 = converted %.loc9_28.1, %struct [template = constants.%struct.4] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.4) [template = constants.%C.3] // CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param @@ -474,7 +474,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc6_25.10: %i32 = value_of_initializer %int.convert_checked.loc6_25.2 [template = constants.%.44] // CHECK:STDOUT: %.loc6_25.11: %i32 = converted %.loc6_24, %.loc6_25.10 [template = constants.%.44] // CHECK:STDOUT: %struct: %.30 = struct_value (%.loc6_25.6, %.loc6_25.11) [template = constants.%struct] -// CHECK:STDOUT: %.loc6_9: %.30 = converted %.loc6_25.1, %struct [template = constants.%struct] +// CHECK:STDOUT: %.loc6_26: %.30 = converted %.loc6_25.1, %struct [template = constants.%struct] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct) [template = constants.%C.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var @@ -1977,7 +1977,7 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: %.loc9_29.10: %i32 = value_of_initializer %int.convert_checked.loc9_29.2 [template = constants.%.38] // CHECK:STDOUT: %.loc9_29.11: %i32 = converted %.loc9_28, %.loc9_29.10 [template = constants.%.38] // CHECK:STDOUT: %struct: %.24 = struct_value (%.loc9_29.6, %.loc9_29.11) [template = constants.%struct.1] -// CHECK:STDOUT: %.loc9_13: %.24 = converted %.loc9_29.1, %struct [template = constants.%struct.1] +// CHECK:STDOUT: %.loc9_30: %.24 = converted %.loc9_29.1, %struct [template = constants.%struct.1] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%struct.1) [template = constants.%C.3] // CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad // CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var @@ -2263,8 +2263,8 @@ var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] -// CHECK:STDOUT: %.loc9_35: ref %C.4 = temporary_storage -// CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc9_35 +// CHECK:STDOUT: %.loc9_36: ref %C.4 = temporary_storage +// CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc9_36 // CHECK:STDOUT: %.loc9_37: %C.3 = converted %F.call, [template = ] // CHECK:STDOUT: assign file.%c_bad.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/struct/literal_member_access.carbon b/toolchain/check/testdata/struct/literal_member_access.carbon index 14e5ab2446eda..84c31275910da 100644 --- a/toolchain/check/testdata/struct/literal_member_access.carbon +++ b/toolchain/check/testdata/struct/literal_member_access.carbon @@ -85,19 +85,19 @@ fn F() -> i32 { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %.loc14_16: Core.IntLiteral = int_value 1 [template = constants.%.3] // CHECK:STDOUT: %G.ref: %G.type = name_ref G, file.%G.decl [template = constants.%G] -// CHECK:STDOUT: %.loc14_25.1: ref %.2 = temporary_storage -// CHECK:STDOUT: %G.call: init %.2 = call %G.ref() to %.loc14_25.1 +// CHECK:STDOUT: %.loc14_26.1: ref %.2 = temporary_storage +// CHECK:STDOUT: %G.call: init %.2 = call %G.ref() to %.loc14_26.1 // CHECK:STDOUT: %.loc14_34: Core.IntLiteral = int_value 3 [template = constants.%.5] // CHECK:STDOUT: %.loc14_35.1: %.6 = struct_literal (%.loc14_16, %G.call, %.loc14_34) -// CHECK:STDOUT: %.loc14_25.2: ref %.2 = temporary %.loc14_25.1, %G.call -// CHECK:STDOUT: %.loc14_25.3: ref %i32 = struct_access %.loc14_25.2, element0 -// CHECK:STDOUT: %.loc14_25.4: %i32 = bind_value %.loc14_25.3 -// CHECK:STDOUT: %.loc14_25.5: ref %i32 = struct_access %.loc14_25.2, element1 -// CHECK:STDOUT: %.loc14_25.6: %i32 = bind_value %.loc14_25.5 -// CHECK:STDOUT: %.loc14_25.7: ref %i32 = struct_access %.loc14_25.2, element2 -// CHECK:STDOUT: %.loc14_25.8: %i32 = bind_value %.loc14_25.7 -// CHECK:STDOUT: %struct.loc14_25: %.2 = struct_value (%.loc14_25.4, %.loc14_25.6, %.loc14_25.8) -// CHECK:STDOUT: %.loc14_35.2: %.2 = converted %G.call, %struct.loc14_25 +// CHECK:STDOUT: %.loc14_26.2: ref %.2 = temporary %.loc14_26.1, %G.call +// CHECK:STDOUT: %.loc14_26.3: ref %i32 = struct_access %.loc14_26.2, element0 +// CHECK:STDOUT: %.loc14_26.4: %i32 = bind_value %.loc14_26.3 +// CHECK:STDOUT: %.loc14_26.5: ref %i32 = struct_access %.loc14_26.2, element1 +// CHECK:STDOUT: %.loc14_26.6: %i32 = bind_value %.loc14_26.5 +// CHECK:STDOUT: %.loc14_26.7: ref %i32 = struct_access %.loc14_26.2, element2 +// CHECK:STDOUT: %.loc14_26.8: %i32 = bind_value %.loc14_26.7 +// CHECK:STDOUT: %struct.loc14_26: %.2 = struct_value (%.loc14_26.4, %.loc14_26.6, %.loc14_26.8) +// CHECK:STDOUT: %.loc14_35.2: %.2 = converted %G.call, %struct.loc14_26 // CHECK:STDOUT: %struct.loc14_35: %.6 = struct_value (%.loc14_16, %.loc14_35.2, %.loc14_34) // CHECK:STDOUT: %.loc14_35.3: %.6 = converted %.loc14_35.1, %struct.loc14_35 // CHECK:STDOUT: %.loc14_36: %.2 = struct_access %.loc14_35.3, element1 diff --git a/toolchain/check/testdata/struct/nested_struct_in_place.carbon b/toolchain/check/testdata/struct/nested_struct_in_place.carbon index bd4b78c98a725..1c4ce03c8200b 100644 --- a/toolchain/check/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/check/testdata/struct/nested_struct_in_place.carbon @@ -106,12 +106,12 @@ fn G() { // CHECK:STDOUT: %v: ref %.2 = bind_name v, %v.var // CHECK:STDOUT: %F.ref.loc14_61: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_74.1: ref %tuple.type.2 = struct_access %v.var, element0 -// CHECK:STDOUT: %F.call.loc14_62: init %tuple.type.2 = call %F.ref.loc14_61() to %.loc14_74.1 +// CHECK:STDOUT: %F.call.loc14_63: init %tuple.type.2 = call %F.ref.loc14_61() to %.loc14_74.1 // CHECK:STDOUT: %F.ref.loc14_71: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_74.2: ref %tuple.type.2 = struct_access %v.var, element1 -// CHECK:STDOUT: %F.call.loc14_72: init %tuple.type.2 = call %F.ref.loc14_71() to %.loc14_74.2 -// CHECK:STDOUT: %.loc14_74.3: %.2 = struct_literal (%F.call.loc14_62, %F.call.loc14_72) -// CHECK:STDOUT: %.loc14_74.4: init %.2 = struct_init (%F.call.loc14_62, %F.call.loc14_72) to %v.var +// CHECK:STDOUT: %F.call.loc14_73: init %tuple.type.2 = call %F.ref.loc14_71() to %.loc14_74.2 +// CHECK:STDOUT: %.loc14_74.3: %.2 = struct_literal (%F.call.loc14_63, %F.call.loc14_73) +// CHECK:STDOUT: %.loc14_74.4: init %.2 = struct_init (%F.call.loc14_63, %F.call.loc14_73) to %v.var // CHECK:STDOUT: %.loc14_75: init %.2 = converted %.loc14_74.3, %.loc14_74.4 // CHECK:STDOUT: assign %v.var, %.loc14_75 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuple/access/fail_empty_access.carbon b/toolchain/check/testdata/tuple/access/fail_empty_access.carbon index e0aeb11755603..3d5fab0d60c26 100644 --- a/toolchain/check/testdata/tuple/access/fail_empty_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_empty_access.carbon @@ -56,8 +56,8 @@ fn Run() { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init %empty_tuple.type = call %F.ref() // CHECK:STDOUT: %.loc17_7: Core.IntLiteral = int_value 0 [template = constants.%.1] -// CHECK:STDOUT: %.loc17_4.1: ref %empty_tuple.type = temporary_storage -// CHECK:STDOUT: %.loc17_4.2: ref %empty_tuple.type = temporary %.loc17_4.1, %F.call +// CHECK:STDOUT: %.loc17_5.1: ref %empty_tuple.type = temporary_storage +// CHECK:STDOUT: %.loc17_5.2: ref %empty_tuple.type = temporary %.loc17_5.1, %F.call // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/tuple/access/return_value_access.carbon b/toolchain/check/testdata/tuple/access/return_value_access.carbon index 73d5f72ee3bdd..84ba8ca64d2b9 100644 --- a/toolchain/check/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/check/testdata/tuple/access/return_value_access.carbon @@ -101,9 +101,9 @@ fn Run() -> i32 { // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %F.call: init %tuple.type.2 = call %F.ref() // CHECK:STDOUT: %.loc14_14: Core.IntLiteral = int_value 0 [template = constants.%.2] -// CHECK:STDOUT: %.loc14_11.1: ref %tuple.type.2 = temporary_storage -// CHECK:STDOUT: %.loc14_11.2: ref %tuple.type.2 = temporary %.loc14_11.1, %F.call -// CHECK:STDOUT: %.loc14_13.1: ref %i32 = tuple_access %.loc14_11.2, element0 +// CHECK:STDOUT: %.loc14_12.1: ref %tuple.type.2 = temporary_storage +// CHECK:STDOUT: %.loc14_12.2: ref %tuple.type.2 = temporary %.loc14_12.1, %F.call +// CHECK:STDOUT: %.loc14_13.1: ref %i32 = tuple_access %.loc14_12.2, element0 // CHECK:STDOUT: %.loc14_13.2: %i32 = bind_value %.loc14_13.1 // CHECK:STDOUT: return %.loc14_13.2 // CHECK:STDOUT: } diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index c25ef86b51b38..9a8a475e6e5ea 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -199,7 +199,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc9_18.10: %i32 = value_of_initializer %int.convert_checked.loc9_18.2 [template = constants.%.41] // CHECK:STDOUT: %.loc9_18.11: %i32 = converted %.loc9_17, %.loc9_18.10 [template = constants.%.41] // CHECK:STDOUT: %tuple: %tuple.type.8 = tuple_value (%.loc9_18.6, %.loc9_18.11) [template = constants.%tuple.5] -// CHECK:STDOUT: %.loc9_12: %tuple.type.8 = converted %.loc9_18.1, %tuple [template = constants.%tuple.5] +// CHECK:STDOUT: %.loc9_19: %tuple.type.8 = converted %.loc9_18.1, %tuple [template = constants.%tuple.5] // CHECK:STDOUT: %C: type = class_type @C, @C(constants.%tuple.5) [template = constants.%C.3] // CHECK:STDOUT: %return.param: ref %C.3 = out_param runtime_param0 // CHECK:STDOUT: %return: ref %C.3 = return_slot %return.param @@ -514,7 +514,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc6_15.10: %i32 = value_of_initializer %int.convert_checked.loc6_15.2 [template = constants.%.38] // CHECK:STDOUT: %.loc6_15.11: %i32 = converted %.loc6_14, %.loc6_15.10 [template = constants.%.38] // CHECK:STDOUT: %tuple: %tuple.type.7 = tuple_value (%.loc6_15.6, %.loc6_15.11) [template = constants.%tuple] -// CHECK:STDOUT: %.loc6_9: %tuple.type.7 = converted %.loc6_15.1, %tuple [template = constants.%tuple] +// CHECK:STDOUT: %.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.3] // CHECK:STDOUT: %c.var: ref %C.3 = var c // CHECK:STDOUT: %c: ref %C.3 = bind_name c, %c.var @@ -2027,7 +2027,7 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: %.loc10_19.10: %i32 = value_of_initializer %int.convert_checked.loc10_19.2 [template = constants.%.36] // CHECK:STDOUT: %.loc10_19.11: %i32 = converted %.loc10_18, %.loc10_19.10 [template = constants.%.36] // CHECK:STDOUT: %tuple: %tuple.type.1 = tuple_value (%.loc10_19.6, %.loc10_19.11) [template = constants.%tuple.1] -// CHECK:STDOUT: %.loc10_13: %tuple.type.1 = converted %.loc10_19.1, %tuple [template = constants.%tuple.1] +// CHECK:STDOUT: %.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.3] // CHECK:STDOUT: %c_bad.var: ref %C.3 = var c_bad // CHECK:STDOUT: %c_bad: ref %C.3 = bind_name c_bad, %c_bad.var @@ -2313,8 +2313,8 @@ var c_bad: C((3, 4)) = F(); // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, imports.%import_ref.4 [template = constants.%F] -// CHECK:STDOUT: %.loc10_25: ref %C.4 = temporary_storage -// CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc10_25 +// CHECK:STDOUT: %.loc10_26: ref %C.4 = temporary_storage +// CHECK:STDOUT: %F.call: init %C.4 = call %F.ref() to %.loc10_26 // CHECK:STDOUT: %.loc10_27: %C.3 = converted %F.call, [template = ] // CHECK:STDOUT: assign file.%c_bad.var, // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon index 7676cfc555946..7e9a6be0f0462 100644 --- a/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/check/testdata/tuple/nested_tuple_in_place.carbon @@ -132,12 +132,12 @@ fn H() { // 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] // CHECK:STDOUT: %.loc14_56.1: ref %tuple.type.2 = tuple_access %v.var, element0 -// CHECK:STDOUT: %F.call.loc14_49: init %tuple.type.2 = call %F.ref.loc14_48() to %.loc14_56.1 +// CHECK:STDOUT: %F.call.loc14_50: init %tuple.type.2 = call %F.ref.loc14_48() to %.loc14_56.1 // CHECK:STDOUT: %F.ref.loc14_53: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %.loc14_56.2: ref %tuple.type.2 = tuple_access %v.var, element1 -// CHECK:STDOUT: %F.call.loc14_54: init %tuple.type.2 = call %F.ref.loc14_53() to %.loc14_56.2 -// CHECK:STDOUT: %.loc14_56.3: %tuple.type.4 = tuple_literal (%F.call.loc14_49, %F.call.loc14_54) -// CHECK:STDOUT: %.loc14_56.4: init %tuple.type.4 = tuple_init (%F.call.loc14_49, %F.call.loc14_54) to %v.var +// CHECK:STDOUT: %F.call.loc14_55: init %tuple.type.2 = call %F.ref.loc14_53() to %.loc14_56.2 +// CHECK:STDOUT: %.loc14_56.3: %tuple.type.4 = tuple_literal (%F.call.loc14_50, %F.call.loc14_55) +// CHECK:STDOUT: %.loc14_56.4: init %tuple.type.4 = tuple_init (%F.call.loc14_50, %F.call.loc14_55) to %v.var // CHECK:STDOUT: %.loc14_57: init %tuple.type.4 = converted %.loc14_56.3, %.loc14_56.4 // CHECK:STDOUT: assign %v.var, %.loc14_57 // CHECK:STDOUT: return diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 35be548f7144e..31c39c792fd58 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -114,10 +114,10 @@ impl C as J {} fn DoesNotImplI() { // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+11]]:3: error: cannot implicitly convert from `type` to `J` [ImplicitAsConversionFailure] // CHECK:STDERR: Impls(C); - // CHECK:STDERR: ^~~~~~ + // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+8]]:3: note: type `type` does not implement interface `ImplicitAs(J)` [MissingImplInMemberAccessNote] // CHECK:STDERR: Impls(C); - // CHECK:STDERR: ^~~~~~ + // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE-14]]:1: in import [InImport] // CHECK:STDERR: state_constraints.carbon:13:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn Impls(V:! J where .Self impls I); @@ -132,10 +132,10 @@ fn EmptyStruct(Y:! J where .Self == {}); fn NotEmptyStruct() { // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+10]]:3: error: cannot implicitly convert from `type` to `J where...` [ImplicitAsConversionFailure] // CHECK:STDERR: EmptyStruct(C); - // CHECK:STDERR: ^~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+7]]:3: note: type `type` does not implement interface `ImplicitAs(J where...)` [MissingImplInMemberAccessNote] // CHECK:STDERR: EmptyStruct(C); - // CHECK:STDERR: ^~~~~~~~~~~~ + // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE-10]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn EmptyStruct(Y:! J where .Self == {}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/toolchain/lower/testdata/array/assign_return_value.carbon b/toolchain/lower/testdata/array/assign_return_value.carbon index 3c7ec88d09c44..d45b3101c1e87 100644 --- a/toolchain/lower/testdata/array/assign_return_value.carbon +++ b/toolchain/lower/testdata/array/assign_return_value.carbon @@ -30,16 +30,16 @@ fn Run() { // CHECK:STDOUT: define void @main() !dbg !9 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %t.var = alloca [2 x i32], align 4, !dbg !10 -// CHECK:STDOUT: %.loc14_22.1.temp = alloca { i32, i32 }, align 8, !dbg !11 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_22.1.temp), !dbg !11 -// CHECK:STDOUT: %.loc14_22.3.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_22.1.temp, i32 0, i32 0, !dbg !11 -// CHECK:STDOUT: %.loc14_22.4 = load i32, ptr %.loc14_22.3.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: %.loc14_22.6.array.index = getelementptr inbounds [2 x i32], ptr %t.var, i32 0, {} zeroinitializer, !dbg !11 -// CHECK:STDOUT: store i32 %.loc14_22.4, ptr %.loc14_22.6.array.index, align 4, !dbg !11 -// CHECK:STDOUT: %.loc14_22.8.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_22.1.temp, i32 0, i32 1, !dbg !11 -// CHECK:STDOUT: %.loc14_22.9 = load i32, ptr %.loc14_22.8.tuple.elem, align 4, !dbg !11 -// CHECK:STDOUT: %.loc14_22.11.array.index = getelementptr inbounds [2 x i32], ptr %t.var, i32 0, {} zeroinitializer, !dbg !11 -// CHECK:STDOUT: store i32 %.loc14_22.9, ptr %.loc14_22.11.array.index, align 4, !dbg !11 +// CHECK:STDOUT: %.loc14_23.1.temp = alloca { i32, i32 }, align 8, !dbg !11 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_23.1.temp), !dbg !11 +// CHECK:STDOUT: %.loc14_23.3.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_23.1.temp, i32 0, i32 0, !dbg !11 +// CHECK:STDOUT: %.loc14_23.4 = load i32, ptr %.loc14_23.3.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: %.loc14_23.6.array.index = getelementptr inbounds [2 x i32], ptr %t.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: store i32 %.loc14_23.4, ptr %.loc14_23.6.array.index, align 4, !dbg !11 +// CHECK:STDOUT: %.loc14_23.8.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_23.1.temp, i32 0, i32 1, !dbg !11 +// CHECK:STDOUT: %.loc14_23.9 = load i32, ptr %.loc14_23.8.tuple.elem, align 4, !dbg !11 +// CHECK:STDOUT: %.loc14_23.11.array.index = getelementptr inbounds [2 x i32], ptr %t.var, i32 0, {} zeroinitializer, !dbg !11 +// CHECK:STDOUT: store i32 %.loc14_23.9, ptr %.loc14_23.11.array.index, align 4, !dbg !11 // CHECK:STDOUT: ret void, !dbg !12 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon b/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon index c68cea9e89630..2f0e16773a8c1 100644 --- a/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon +++ b/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon @@ -34,7 +34,7 @@ fn Main() { // CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca {}, align 8, !dbg !11 // CHECK:STDOUT: call void @_CFoo.Main(), !dbg !12 -// CHECK:STDOUT: %.loc17_22.1.temp = alloca {}, align 8, !dbg !12 +// CHECK:STDOUT: %.loc17_23.1.temp = alloca {}, align 8, !dbg !12 // CHECK:STDOUT: call void @_CBar.Main(), !dbg !13 // CHECK:STDOUT: ret void, !dbg !14 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon index fc426edd5b536..08c0d7a75e1e8 100644 --- a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon +++ b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon @@ -39,8 +39,8 @@ fn Main() { // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !12 { // CHECK:STDOUT: entry: -// CHECK:STDOUT: %.loc16_4.1.temp = alloca { i32, i32, i32 }, align 8, !dbg !13 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_4.1.temp, { i32 } { i32 1 }, ptr @tuple.2.loc16_20.12), !dbg !13 +// CHECK:STDOUT: %.loc16_21.1.temp = alloca { i32, i32, i32 }, align 8, !dbg !13 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_21.1.temp, { i32 } { i32 1 }, ptr @tuple.2.loc16_20.12), !dbg !13 // CHECK:STDOUT: ret void, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/index/array_element_access.carbon b/toolchain/lower/testdata/index/array_element_access.carbon index 6ab956c79b097..734cff18d2ba8 100644 --- a/toolchain/lower/testdata/index/array_element_access.carbon +++ b/toolchain/lower/testdata/index/array_element_access.carbon @@ -43,16 +43,16 @@ fn Run() { // CHECK:STDOUT: define void @main() !dbg !12 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca [2 x i32], align 4, !dbg !13 -// CHECK:STDOUT: %.loc15_22.1.temp = alloca { i32, i32 }, align 8, !dbg !14 -// CHECK:STDOUT: call void @_CA.Main(ptr %.loc15_22.1.temp), !dbg !14 -// CHECK:STDOUT: %.loc15_22.3.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_22.1.temp, i32 0, i32 0, !dbg !14 -// CHECK:STDOUT: %.loc15_22.4 = load i32, ptr %.loc15_22.3.tuple.elem, align 4, !dbg !14 -// CHECK:STDOUT: %.loc15_22.6.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !14 -// CHECK:STDOUT: store i32 %.loc15_22.4, ptr %.loc15_22.6.array.index, align 4, !dbg !14 -// CHECK:STDOUT: %.loc15_22.8.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_22.1.temp, i32 0, i32 1, !dbg !14 -// CHECK:STDOUT: %.loc15_22.9 = load i32, ptr %.loc15_22.8.tuple.elem, align 4, !dbg !14 -// CHECK:STDOUT: %.loc15_22.11.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !14 -// CHECK:STDOUT: store i32 %.loc15_22.9, ptr %.loc15_22.11.array.index, align 4, !dbg !14 +// CHECK:STDOUT: %.loc15_23.1.temp = alloca { i32, i32 }, align 8, !dbg !14 +// CHECK:STDOUT: call void @_CA.Main(ptr %.loc15_23.1.temp), !dbg !14 +// CHECK:STDOUT: %.loc15_23.3.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_23.1.temp, i32 0, i32 0, !dbg !14 +// CHECK:STDOUT: %.loc15_23.4 = load i32, ptr %.loc15_23.3.tuple.elem, align 4, !dbg !14 +// CHECK:STDOUT: %.loc15_23.6.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !14 +// CHECK:STDOUT: store i32 %.loc15_23.4, ptr %.loc15_23.6.array.index, align 4, !dbg !14 +// CHECK:STDOUT: %.loc15_23.8.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc15_23.1.temp, i32 0, i32 1, !dbg !14 +// CHECK:STDOUT: %.loc15_23.9 = load i32, ptr %.loc15_23.8.tuple.elem, align 4, !dbg !14 +// CHECK:STDOUT: %.loc15_23.11.array.index = getelementptr inbounds [2 x i32], ptr %a.var, i32 0, {} zeroinitializer, !dbg !14 +// CHECK:STDOUT: store i32 %.loc15_23.9, ptr %.loc15_23.11.array.index, align 4, !dbg !14 // CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !15 // CHECK:STDOUT: store i32 1, ptr %b.var, align 4, !dbg !16 // CHECK:STDOUT: %c.var = alloca i32, align 4, !dbg !17 @@ -61,9 +61,9 @@ fn Run() { // CHECK:STDOUT: %.loc17_19.2 = load i32, ptr %.loc17_19.1.array.index, align 4, !dbg !19 // CHECK:STDOUT: store i32 %.loc17_19.2, ptr %c.var, align 4, !dbg !20 // CHECK:STDOUT: %d.var = alloca i32, align 4, !dbg !21 -// CHECK:STDOUT: %.loc18_17.1.temp = alloca [2 x i32], align 4, !dbg !22 -// CHECK:STDOUT: call void @_CB.Main(ptr %.loc18_17.1.temp), !dbg !22 -// CHECK:STDOUT: %.loc18_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc18_17.1.temp, i32 0, i32 1, !dbg !22 +// CHECK:STDOUT: %.loc18_18.1.temp = alloca [2 x i32], align 4, !dbg !22 +// CHECK:STDOUT: call void @_CB.Main(ptr %.loc18_18.1.temp), !dbg !22 +// CHECK:STDOUT: %.loc18_21.1.array.index = getelementptr inbounds [2 x i32], ptr %.loc18_18.1.temp, i32 0, i32 1, !dbg !22 // CHECK:STDOUT: %.loc18_21.2 = load i32, ptr %.loc18_21.1.array.index, align 4, !dbg !22 // CHECK:STDOUT: store i32 %.loc18_21.2, ptr %d.var, align 4, !dbg !23 // CHECK:STDOUT: ret void, !dbg !24 diff --git a/toolchain/lower/testdata/tuple/access/return_value_access.carbon b/toolchain/lower/testdata/tuple/access/return_value_access.carbon index 9756349c5749c..9c227864a3415 100644 --- a/toolchain/lower/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/lower/testdata/tuple/access/return_value_access.carbon @@ -30,9 +30,9 @@ fn Run() { // CHECK:STDOUT: define void @main() !dbg !9 { // CHECK:STDOUT: entry: // CHECK:STDOUT: %t.var = alloca i32, align 4, !dbg !10 -// CHECK:STDOUT: %.loc14_17.1.temp = alloca { i32, i32 }, align 8, !dbg !11 -// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_17.1.temp), !dbg !11 -// CHECK:STDOUT: %.loc14_19.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_17.1.temp, i32 0, i32 1, !dbg !11 +// CHECK:STDOUT: %.loc14_18.1.temp = alloca { i32, i32 }, align 8, !dbg !11 +// CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_18.1.temp), !dbg !11 +// CHECK:STDOUT: %.loc14_19.1.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %.loc14_18.1.temp, i32 0, i32 1, !dbg !11 // CHECK:STDOUT: %.loc14_19.2 = load i32, ptr %.loc14_19.1.tuple.elem, align 4, !dbg !11 // CHECK:STDOUT: store i32 %.loc14_19.2, ptr %t.var, align 4, !dbg !12 // CHECK:STDOUT: ret void, !dbg !13