2
2
// Exceptions. See /LICENSE for license information.
3
3
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
4
//
5
+ // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon
6
+ //
5
7
// AUTOUPDATE
6
8
// TIP: To test this file alone, run:
7
9
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/array/index_not_literal.carbon
@@ -59,16 +61,16 @@ fn F(a: array({}, 3)) -> {} {
59
61
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
60
62
// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
61
63
// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete]
62
- // CHECK:STDOUT: %To.c80 : Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
63
- // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3 , @impl.4f9(%To.c80 ) [symbolic]
64
+ // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
65
+ // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2 , @impl.4f9(%To) [symbolic]
64
66
// CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic]
65
67
// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete]
66
- // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3 , @impl.4f9(%int_32) [concrete]
68
+ // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2 , @impl.4f9(%int_32) [concrete]
67
69
// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
68
- // CHECK:STDOUT: %ImplicitAs.facet.921 : %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete]
69
- // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete]
70
+ // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete]
71
+ // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete]
70
72
// CHECK:STDOUT: %Convert.bound.ab5: <bound method> = bound_method %int_1.5b8, %Convert.956 [concrete]
71
- // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.3 (%int_32) [concrete]
73
+ // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.2 (%int_32) [concrete]
72
74
// CHECK:STDOUT: %bound_method.9a1: <bound method> = bound_method %int_1.5b8, %Convert.specific_fn [concrete]
73
75
// CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
74
76
// CHECK:STDOUT: %Convert.bound.ef9: <bound method> = bound_method %int_2.ecc, %Convert.956 [concrete]
@@ -81,7 +83,7 @@ fn F(a: array({}, 3)) -> {} {
81
83
// CHECK:STDOUT: }
82
84
// CHECK:STDOUT:
83
85
// CHECK:STDOUT: imports {
84
- // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types /int, loc19_39 , loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)]
86
+ // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts /int, loc16_39 , loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)]
85
87
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete]
86
88
// CHECK:STDOUT: }
87
89
// CHECK:STDOUT:
@@ -107,7 +109,7 @@ fn F(a: array({}, 3)) -> {} {
107
109
// CHECK:STDOUT: %int_1.loc10_23: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
108
110
// CHECK:STDOUT: %impl.elem0.loc10_20.1: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
109
111
// CHECK:STDOUT: %bound_method.loc10_20.1: <bound method> = bound_method %int_1.loc10_13, %impl.elem0.loc10_20.1 [concrete = constants.%Convert.bound.ab5]
110
- // CHECK:STDOUT: %specific_fn.loc10_20.1: <specific function> = specific_function %impl.elem0.loc10_20.1, @Convert.3 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
112
+ // CHECK:STDOUT: %specific_fn.loc10_20.1: <specific function> = specific_function %impl.elem0.loc10_20.1, @Convert.2 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
111
113
// CHECK:STDOUT: %bound_method.loc10_20.2: <bound method> = bound_method %int_1.loc10_13, %specific_fn.loc10_20.1 [concrete = constants.%bound_method.9a1]
112
114
// CHECK:STDOUT: %int.convert_checked.loc10_20.1: init %i32 = call %bound_method.loc10_20.2(%int_1.loc10_13) [concrete = constants.%int_1.5d2]
113
115
// CHECK:STDOUT: %.loc10_20.2: init %i32 = converted %int_1.loc10_13, %int.convert_checked.loc10_20.1 [concrete = constants.%int_1.5d2]
@@ -117,7 +119,7 @@ fn F(a: array({}, 3)) -> {} {
117
119
// CHECK:STDOUT: %.loc10_20.5: init %i32 = initialize_from %.loc10_20.2 to %.loc10_20.4 [concrete = constants.%int_1.5d2]
118
120
// CHECK:STDOUT: %impl.elem0.loc10_20.2: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
119
121
// CHECK:STDOUT: %bound_method.loc10_20.3: <bound method> = bound_method %int_2.loc10_16, %impl.elem0.loc10_20.2 [concrete = constants.%Convert.bound.ef9]
120
- // CHECK:STDOUT: %specific_fn.loc10_20.2: <specific function> = specific_function %impl.elem0.loc10_20.2, @Convert.3 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
122
+ // CHECK:STDOUT: %specific_fn.loc10_20.2: <specific function> = specific_function %impl.elem0.loc10_20.2, @Convert.2 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
121
123
// CHECK:STDOUT: %bound_method.loc10_20.4: <bound method> = bound_method %int_2.loc10_16, %specific_fn.loc10_20.2 [concrete = constants.%bound_method.b92]
122
124
// CHECK:STDOUT: %int.convert_checked.loc10_20.2: init %i32 = call %bound_method.loc10_20.4(%int_2.loc10_16) [concrete = constants.%int_2.ef8]
123
125
// CHECK:STDOUT: %.loc10_20.6: init %i32 = converted %int_2.loc10_16, %int.convert_checked.loc10_20.2 [concrete = constants.%int_2.ef8]
@@ -126,7 +128,7 @@ fn F(a: array({}, 3)) -> {} {
126
128
// CHECK:STDOUT: %.loc10_20.8: init %i32 = initialize_from %.loc10_20.6 to %.loc10_20.7 [concrete = constants.%int_2.ef8]
127
129
// CHECK:STDOUT: %impl.elem0.loc10_20.3: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
128
130
// CHECK:STDOUT: %bound_method.loc10_20.5: <bound method> = bound_method %int_3, %impl.elem0.loc10_20.3 [concrete = constants.%Convert.bound.b30]
129
- // CHECK:STDOUT: %specific_fn.loc10_20.3: <specific function> = specific_function %impl.elem0.loc10_20.3, @Convert.3 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
131
+ // CHECK:STDOUT: %specific_fn.loc10_20.3: <specific function> = specific_function %impl.elem0.loc10_20.3, @Convert.2 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
130
132
// CHECK:STDOUT: %bound_method.loc10_20.6: <bound method> = bound_method %int_3, %specific_fn.loc10_20.3 [concrete = constants.%bound_method.047]
131
133
// CHECK:STDOUT: %int.convert_checked.loc10_20.3: init %i32 = call %bound_method.loc10_20.6(%int_3) [concrete = constants.%int_3.822]
132
134
// CHECK:STDOUT: %.loc10_20.9: init %i32 = converted %int_3, %int.convert_checked.loc10_20.3 [concrete = constants.%int_3.822]
@@ -139,7 +141,7 @@ fn F(a: array({}, 3)) -> {} {
139
141
// CHECK:STDOUT: %.loc10_20.15: %array_type = bind_value %.loc10_20.14
140
142
// CHECK:STDOUT: %impl.elem0.loc10_23: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
141
143
// CHECK:STDOUT: %bound_method.loc10_23.1: <bound method> = bound_method %int_1.loc10_23, %impl.elem0.loc10_23 [concrete = constants.%Convert.bound.ab5]
142
- // CHECK:STDOUT: %specific_fn.loc10_23: <specific function> = specific_function %impl.elem0.loc10_23, @Convert.3 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
144
+ // CHECK:STDOUT: %specific_fn.loc10_23: <specific function> = specific_function %impl.elem0.loc10_23, @Convert.2 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
143
145
// CHECK:STDOUT: %bound_method.loc10_23.2: <bound method> = bound_method %int_1.loc10_23, %specific_fn.loc10_23 [concrete = constants.%bound_method.9a1]
144
146
// CHECK:STDOUT: %int.convert_checked.loc10_23: init %i32 = call %bound_method.loc10_23.2(%int_1.loc10_23) [concrete = constants.%int_1.5d2]
145
147
// CHECK:STDOUT: %.loc10_23.1: %i32 = value_of_initializer %int.convert_checked.loc10_23 [concrete = constants.%int_1.5d2]
@@ -163,23 +165,23 @@ fn F(a: array({}, 3)) -> {} {
163
165
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
164
166
// CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
165
167
// CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete]
166
- // CHECK:STDOUT: %To.c80 : Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
167
- // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.3 , @impl.4f9(%To.c80 ) [symbolic]
168
+ // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
169
+ // CHECK:STDOUT: %Convert.type.0f9: type = fn_type @Convert.2 , @impl.4f9(%To) [symbolic]
168
170
// CHECK:STDOUT: %Convert.f06: %Convert.type.0f9 = struct_value () [symbolic]
169
171
// CHECK:STDOUT: %ImplicitAs.impl_witness.c75: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a2f, @impl.4f9(%int_32) [concrete]
170
- // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.3 , @impl.4f9(%int_32) [concrete]
172
+ // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2 , @impl.4f9(%int_32) [concrete]
171
173
// CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
172
- // CHECK:STDOUT: %ImplicitAs.facet.921 : %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete]
173
- // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet.921 [concrete]
174
+ // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.c75) [concrete]
175
+ // CHECK:STDOUT: %.9c3: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete]
174
176
// CHECK:STDOUT: %Convert.bound: <bound method> = bound_method %int_2.ecc, %Convert.956 [concrete]
175
- // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.3 (%int_32) [concrete]
177
+ // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.2 (%int_32) [concrete]
176
178
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %int_2.ecc, %Convert.specific_fn [concrete]
177
179
// CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
178
180
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
179
181
// CHECK:STDOUT: }
180
182
// CHECK:STDOUT:
181
183
// CHECK:STDOUT: imports {
182
- // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/types /int, loc19_39 , loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)]
184
+ // CHECK:STDOUT: %Core.import_ref.a5b: @impl.4f9.%Convert.type (%Convert.type.0f9) = import_ref Core//prelude/parts /int, loc16_39 , loaded [symbolic = @impl.4f9.%Convert (constants.%Convert.f06)]
183
185
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.a2f = impl_witness_table (%Core.import_ref.a5b), @impl.4f9 [concrete]
184
186
// CHECK:STDOUT: }
185
187
// CHECK:STDOUT:
@@ -195,7 +197,7 @@ fn F(a: array({}, 3)) -> {} {
195
197
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
196
198
// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
197
199
// CHECK:STDOUT: %bound_method.loc6_24.1: <bound method> = bound_method %.loc6_24.1, %impl.elem0 [concrete = constants.%Convert.bound]
198
- // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.3 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
200
+ // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.2 (constants.%int_32) [concrete = constants.%Convert.specific_fn]
199
201
// CHECK:STDOUT: %bound_method.loc6_24.2: <bound method> = bound_method %.loc6_24.1, %specific_fn [concrete = constants.%bound_method]
200
202
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc6_24.2(%.loc6_24.1) [concrete = constants.%int_2.ef8]
201
203
// CHECK:STDOUT: %.loc6_24.2: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_2.ef8]
0 commit comments