aggregates.carbon 79 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/eval/aggregates.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/eval/aggregates.carbon
  12. // --- basics.carbon
  13. library "[[@TEST_NAME]]";
  14. //@dump-sem-ir-begin
  15. var tuple_copy: (i32, i32) = (1, 2) as (i32, i32);
  16. var struct_copy: {.a: i32, .b: i32, .c: i32} = {.c = 3, .b = 2, .a = 1} as {.b: i32, .a: i32, .c: i32};
  17. var tuple_index: array(i32, 1) = (0,) as array(i32, (5, 7, 1, 9).2);
  18. var struct_access: array(i32, 1) = (0,) as array(i32, {.a = 3, .b = 1}.b);
  19. //@dump-sem-ir-end
  20. // --- fail_todo_array_temporary.carbon
  21. library "[[@TEST_NAME]]";
  22. // TODO: This creates an array temporary, which we don't yet support evaluating.
  23. //@dump-sem-ir-begin
  24. // CHECK:STDERR: fail_todo_array_temporary.carbon:[[@LINE+4]]:53: error: array bound is not a constant [InvalidArrayExpr]
  25. // CHECK:STDERR: var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, 4))[2]);
  26. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  27. // CHECK:STDERR:
  28. var array_index: array(i32, 1) = (0,) as array(i32, ((5, 7, 1, 9) as array(i32, 4))[2]);
  29. //@dump-sem-ir-end
  30. // --- symbolic.carbon
  31. library "[[@TEST_NAME]]";
  32. // Check that we propagate the `symbolic` tag through evaluations.
  33. fn F(T:! type) {
  34. //@dump-sem-ir-begin
  35. var u: (T*, const T);
  36. var v: {.a: T};
  37. var w: array(T, 5);
  38. //@dump-sem-ir-end
  39. }
  40. fn G(N:! i32) {
  41. //@dump-sem-ir-begin
  42. var k: array(i32, N);
  43. //@dump-sem-ir-end
  44. }
  45. // CHECK:STDOUT: --- basics.carbon
  46. // CHECK:STDOUT:
  47. // CHECK:STDOUT: constants {
  48. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  49. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  50. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  51. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  52. // CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete]
  53. // CHECK:STDOUT: %pattern_type.511: type = pattern_type %tuple.type.d07 [concrete]
  54. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  55. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  56. // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete]
  57. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  58. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  59. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  60. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  61. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  62. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  63. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  64. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  65. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  66. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  67. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  68. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  69. // CHECK:STDOUT: %bound_method.c11: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  70. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  71. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  72. // CHECK:STDOUT: %bound_method.8bd: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  73. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  74. // CHECK:STDOUT: %tuple.21c: %tuple.type.d07 = tuple_value (%int_1.5d2, %int_2.ef8) [concrete]
  75. // CHECK:STDOUT: %tuple.elem0: ref %i32 = tuple_access file.%tuple_copy.var, element0 [concrete]
  76. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  77. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  78. // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.afd: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
  79. // CHECK:STDOUT: %Int.as.Copy.impl.Op.6cd: %Int.as.Copy.impl.Op.type.afd = struct_value () [symbolic]
  80. // CHECK:STDOUT: %Copy.impl_witness.a32: <witness> = impl_witness imports.%Copy.impl_witness_table.1ed, @Int.as.Copy.impl(%int_32) [concrete]
  81. // CHECK:STDOUT: %Int.as.Copy.impl.Op.type.276: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
  82. // CHECK:STDOUT: %Int.as.Copy.impl.Op.f59: %Int.as.Copy.impl.Op.type.276 = struct_value () [concrete]
  83. // CHECK:STDOUT: %Copy.facet.c49: %Copy.type = facet_value %i32, (%Copy.impl_witness.a32) [concrete]
  84. // CHECK:STDOUT: %.7fa: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet.c49 [concrete]
  85. // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.e95: <bound method> = bound_method %int_1.5d2, %Int.as.Copy.impl.Op.f59 [concrete]
  86. // CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.f59, @Int.as.Copy.impl.Op(%int_32) [concrete]
  87. // CHECK:STDOUT: %bound_method.dd6: <bound method> = bound_method %int_1.5d2, %Int.as.Copy.impl.Op.specific_fn [concrete]
  88. // CHECK:STDOUT: %tuple.elem1: ref %i32 = tuple_access file.%tuple_copy.var, element1 [concrete]
  89. // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.7f6: <bound method> = bound_method %int_2.ef8, %Int.as.Copy.impl.Op.f59 [concrete]
  90. // CHECK:STDOUT: %bound_method.bb3: <bound method> = bound_method %int_2.ef8, %Int.as.Copy.impl.Op.specific_fn [concrete]
  91. // CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete]
  92. // CHECK:STDOUT: %pattern_type.8ae: type = pattern_type %struct_type.a.b.c [concrete]
  93. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  94. // CHECK:STDOUT: %struct_type.c.b.a: type = struct_type {.c: Core.IntLiteral, .b: Core.IntLiteral, .a: Core.IntLiteral} [concrete]
  95. // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [concrete]
  96. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  97. // CHECK:STDOUT: %bound_method.f36: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  98. // CHECK:STDOUT: %int_3.822: %i32 = int_value 3 [concrete]
  99. // CHECK:STDOUT: %struct.21d: %struct_type.b.a.c = struct_value (%int_2.ef8, %int_1.5d2, %int_3.822) [concrete]
  100. // CHECK:STDOUT: %.91e: ref %i32 = struct_access file.%struct_copy.var, element1 [concrete]
  101. // CHECK:STDOUT: %.657: ref %i32 = struct_access file.%struct_copy.var, element0 [concrete]
  102. // CHECK:STDOUT: %.8fb: ref %i32 = struct_access file.%struct_copy.var, element2 [concrete]
  103. // CHECK:STDOUT: %Int.as.Copy.impl.Op.bound.b5b: <bound method> = bound_method %int_3.822, %Int.as.Copy.impl.Op.f59 [concrete]
  104. // CHECK:STDOUT: %bound_method.028: <bound method> = bound_method %int_3.822, %Int.as.Copy.impl.Op.specific_fn [concrete]
  105. // CHECK:STDOUT: %struct.cff: %struct_type.a.b.c = struct_value (%int_1.5d2, %int_2.ef8, %int_3.822) [concrete]
  106. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %i32 [concrete]
  107. // CHECK:STDOUT: %pattern_type.a98: type = pattern_type %array_type [concrete]
  108. // CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
  109. // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete]
  110. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete]
  111. // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete]
  112. // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete]
  113. // CHECK:STDOUT: %tuple.type.d46: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete]
  114. // CHECK:STDOUT: %tuple.869: %tuple.type.d46 = tuple_value (%int_5, %int_7, %int_1.5b8, %int_9) [concrete]
  115. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.931: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  116. // CHECK:STDOUT: %bound_method.c25: <bound method> = bound_method %int_0.5c6, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  117. // CHECK:STDOUT: %int_0.6a9: %i32 = int_value 0 [concrete]
  118. // CHECK:STDOUT: %array: %array_type = tuple_value (%int_0.6a9) [concrete]
  119. // CHECK:STDOUT: %struct_type.a.b: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete]
  120. // CHECK:STDOUT: %struct.a81: %struct_type.a.b = struct_value (%int_3.1ba, %int_1.5b8) [concrete]
  121. // CHECK:STDOUT: }
  122. // CHECK:STDOUT:
  123. // CHECK:STDOUT: imports {
  124. // CHECK:STDOUT: %Core.import_ref.ee7: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340) = import_ref Core//prelude/parts/int, loc23_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0)]
  125. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  126. // CHECK:STDOUT: %Core.import_ref.d0f6: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.afd) = import_ref Core//prelude/parts/int, loc17_31, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.6cd)]
  127. // CHECK:STDOUT: %Copy.impl_witness_table.1ed = impl_witness_table (%Core.import_ref.d0f6), @Int.as.Copy.impl [concrete]
  128. // CHECK:STDOUT: }
  129. // CHECK:STDOUT:
  130. // CHECK:STDOUT: file {
  131. // CHECK:STDOUT: name_binding_decl {
  132. // CHECK:STDOUT: %tuple_copy.patt: %pattern_type.511 = binding_pattern tuple_copy [concrete]
  133. // CHECK:STDOUT: %tuple_copy.var_patt: %pattern_type.511 = var_pattern %tuple_copy.patt [concrete]
  134. // CHECK:STDOUT: }
  135. // CHECK:STDOUT: %tuple_copy.var: ref %tuple.type.d07 = var %tuple_copy.var_patt [concrete]
  136. // CHECK:STDOUT: %.loc4_26.1: type = splice_block %.loc4_26.3 [concrete = constants.%tuple.type.d07] {
  137. // CHECK:STDOUT: %int_32.loc4_18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  138. // CHECK:STDOUT: %i32.loc4_18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  139. // CHECK:STDOUT: %int_32.loc4_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  140. // CHECK:STDOUT: %i32.loc4_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  141. // CHECK:STDOUT: %.loc4_26.2: %tuple.type.24b = tuple_literal (%i32.loc4_18, %i32.loc4_23)
  142. // CHECK:STDOUT: %.loc4_26.3: type = converted %.loc4_26.2, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07]
  143. // CHECK:STDOUT: }
  144. // CHECK:STDOUT: %tuple_copy: ref %tuple.type.d07 = bind_name tuple_copy, %tuple_copy.var [concrete = %tuple_copy.var]
  145. // CHECK:STDOUT: name_binding_decl {
  146. // CHECK:STDOUT: %struct_copy.patt: %pattern_type.8ae = binding_pattern struct_copy [concrete]
  147. // CHECK:STDOUT: %struct_copy.var_patt: %pattern_type.8ae = var_pattern %struct_copy.patt [concrete]
  148. // CHECK:STDOUT: }
  149. // CHECK:STDOUT: %struct_copy.var: ref %struct_type.a.b.c = var %struct_copy.var_patt [concrete]
  150. // CHECK:STDOUT: %.loc6: type = splice_block %struct_type.a.b.c [concrete = constants.%struct_type.a.b.c] {
  151. // CHECK:STDOUT: %int_32.loc6_23: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  152. // CHECK:STDOUT: %i32.loc6_23: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  153. // CHECK:STDOUT: %int_32.loc6_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  154. // CHECK:STDOUT: %i32.loc6_32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  155. // CHECK:STDOUT: %int_32.loc6_41: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  156. // CHECK:STDOUT: %i32.loc6_41: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  157. // CHECK:STDOUT: %struct_type.a.b.c: type = struct_type {.a: %i32, .b: %i32, .c: %i32} [concrete = constants.%struct_type.a.b.c]
  158. // CHECK:STDOUT: }
  159. // CHECK:STDOUT: %struct_copy: ref %struct_type.a.b.c = bind_name struct_copy, %struct_copy.var [concrete = %struct_copy.var]
  160. // CHECK:STDOUT: name_binding_decl {
  161. // CHECK:STDOUT: %tuple_index.patt: %pattern_type.a98 = binding_pattern tuple_index [concrete]
  162. // CHECK:STDOUT: %tuple_index.var_patt: %pattern_type.a98 = var_pattern %tuple_index.patt [concrete]
  163. // CHECK:STDOUT: }
  164. // CHECK:STDOUT: %tuple_index.var: ref %array_type = var %tuple_index.var_patt [concrete]
  165. // CHECK:STDOUT: %.loc8: type = splice_block %array_type.loc8 [concrete = constants.%array_type] {
  166. // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  167. // CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  168. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  169. // CHECK:STDOUT: %array_type.loc8: type = array_type %int_1.loc8, %i32.loc8 [concrete = constants.%array_type]
  170. // CHECK:STDOUT: }
  171. // CHECK:STDOUT: %tuple_index: ref %array_type = bind_name tuple_index, %tuple_index.var [concrete = %tuple_index.var]
  172. // CHECK:STDOUT: name_binding_decl {
  173. // CHECK:STDOUT: %struct_access.patt: %pattern_type.a98 = binding_pattern struct_access [concrete]
  174. // CHECK:STDOUT: %struct_access.var_patt: %pattern_type.a98 = var_pattern %struct_access.patt [concrete]
  175. // CHECK:STDOUT: }
  176. // CHECK:STDOUT: %struct_access.var: ref %array_type = var %struct_access.var_patt [concrete]
  177. // CHECK:STDOUT: %.loc10: type = splice_block %array_type.loc10 [concrete = constants.%array_type] {
  178. // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  179. // CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  180. // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  181. // CHECK:STDOUT: %array_type.loc10: type = array_type %int_1.loc10, %i32.loc10 [concrete = constants.%array_type]
  182. // CHECK:STDOUT: }
  183. // CHECK:STDOUT: %struct_access: ref %array_type = bind_name struct_access, %struct_access.var [concrete = %struct_access.var]
  184. // CHECK:STDOUT: }
  185. // CHECK:STDOUT:
  186. // CHECK:STDOUT: fn @__global_init() {
  187. // CHECK:STDOUT: !entry:
  188. // CHECK:STDOUT: %int_1.loc4: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  189. // CHECK:STDOUT: %int_2.loc4: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  190. // CHECK:STDOUT: %.loc4_35.1: %tuple.type.f94 = tuple_literal (%int_1.loc4, %int_2.loc4)
  191. // CHECK:STDOUT: %int_32.loc4_41: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  192. // CHECK:STDOUT: %i32.loc4_41: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  193. // CHECK:STDOUT: %int_32.loc4_46: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  194. // CHECK:STDOUT: %i32.loc4_46: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  195. // CHECK:STDOUT: %.loc4_49.1: %tuple.type.24b = tuple_literal (%i32.loc4_41, %i32.loc4_46)
  196. // CHECK:STDOUT: %.loc4_49.2: type = converted %.loc4_49.1, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07]
  197. // CHECK:STDOUT: %impl.elem0.loc4_35.1: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  198. // CHECK:STDOUT: %bound_method.loc4_35.1: <bound method> = bound_method %int_1.loc4, %impl.elem0.loc4_35.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  199. // CHECK:STDOUT: %specific_fn.loc4_35.1: <specific function> = specific_function %impl.elem0.loc4_35.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  200. // CHECK:STDOUT: %bound_method.loc4_35.2: <bound method> = bound_method %int_1.loc4, %specific_fn.loc4_35.1 [concrete = constants.%bound_method.c11]
  201. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_35.1: init %i32 = call %bound_method.loc4_35.2(%int_1.loc4) [concrete = constants.%int_1.5d2]
  202. // CHECK:STDOUT: %.loc4_35.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_35.1 [concrete = constants.%int_1.5d2]
  203. // CHECK:STDOUT: %.loc4_35.3: %i32 = converted %int_1.loc4, %.loc4_35.2 [concrete = constants.%int_1.5d2]
  204. // CHECK:STDOUT: %impl.elem0.loc4_35.2: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  205. // CHECK:STDOUT: %bound_method.loc4_35.3: <bound method> = bound_method %int_2.loc4, %impl.elem0.loc4_35.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82]
  206. // CHECK:STDOUT: %specific_fn.loc4_35.2: <specific function> = specific_function %impl.elem0.loc4_35.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  207. // CHECK:STDOUT: %bound_method.loc4_35.4: <bound method> = bound_method %int_2.loc4, %specific_fn.loc4_35.2 [concrete = constants.%bound_method.8bd]
  208. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_35.2: init %i32 = call %bound_method.loc4_35.4(%int_2.loc4) [concrete = constants.%int_2.ef8]
  209. // CHECK:STDOUT: %.loc4_35.4: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc4_35.2 [concrete = constants.%int_2.ef8]
  210. // CHECK:STDOUT: %.loc4_35.5: %i32 = converted %int_2.loc4, %.loc4_35.4 [concrete = constants.%int_2.ef8]
  211. // CHECK:STDOUT: %tuple.loc4: %tuple.type.d07 = tuple_value (%.loc4_35.3, %.loc4_35.5) [concrete = constants.%tuple.21c]
  212. // CHECK:STDOUT: %.loc4_37.1: %tuple.type.d07 = converted %.loc4_35.1, %tuple.loc4 [concrete = constants.%tuple.21c]
  213. // CHECK:STDOUT: %tuple.elem0.loc4_37.1: %i32 = tuple_access %.loc4_37.1, element0 [concrete = constants.%int_1.5d2]
  214. // CHECK:STDOUT: %impl.elem0.loc4_37.1: %.7fa = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%Int.as.Copy.impl.Op.f59]
  215. // CHECK:STDOUT: %bound_method.loc4_37.1: <bound method> = bound_method %tuple.elem0.loc4_37.1, %impl.elem0.loc4_37.1 [concrete = constants.%Int.as.Copy.impl.Op.bound.e95]
  216. // CHECK:STDOUT: %specific_fn.loc4_37.1: <specific function> = specific_function %impl.elem0.loc4_37.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
  217. // CHECK:STDOUT: %bound_method.loc4_37.2: <bound method> = bound_method %tuple.elem0.loc4_37.1, %specific_fn.loc4_37.1 [concrete = constants.%bound_method.dd6]
  218. // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc4_37.1: init %i32 = call %bound_method.loc4_37.2(%tuple.elem0.loc4_37.1) [concrete = constants.%int_1.5d2]
  219. // CHECK:STDOUT: %tuple.elem0.loc4_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element0 [concrete = constants.%tuple.elem0]
  220. // CHECK:STDOUT: %.loc4_37.2: init %i32 = initialize_from %Int.as.Copy.impl.Op.call.loc4_37.1 to %tuple.elem0.loc4_37.2 [concrete = constants.%int_1.5d2]
  221. // CHECK:STDOUT: %tuple.elem1.loc4_37.1: %i32 = tuple_access %.loc4_37.1, element1 [concrete = constants.%int_2.ef8]
  222. // CHECK:STDOUT: %impl.elem0.loc4_37.2: %.7fa = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%Int.as.Copy.impl.Op.f59]
  223. // CHECK:STDOUT: %bound_method.loc4_37.3: <bound method> = bound_method %tuple.elem1.loc4_37.1, %impl.elem0.loc4_37.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.7f6]
  224. // CHECK:STDOUT: %specific_fn.loc4_37.2: <specific function> = specific_function %impl.elem0.loc4_37.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
  225. // CHECK:STDOUT: %bound_method.loc4_37.4: <bound method> = bound_method %tuple.elem1.loc4_37.1, %specific_fn.loc4_37.2 [concrete = constants.%bound_method.bb3]
  226. // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc4_37.2: init %i32 = call %bound_method.loc4_37.4(%tuple.elem1.loc4_37.1) [concrete = constants.%int_2.ef8]
  227. // CHECK:STDOUT: %tuple.elem1.loc4_37.2: ref %i32 = tuple_access file.%tuple_copy.var, element1 [concrete = constants.%tuple.elem1]
  228. // CHECK:STDOUT: %.loc4_37.3: init %i32 = initialize_from %Int.as.Copy.impl.Op.call.loc4_37.2 to %tuple.elem1.loc4_37.2 [concrete = constants.%int_2.ef8]
  229. // CHECK:STDOUT: %.loc4_37.4: init %tuple.type.d07 = tuple_init (%.loc4_37.2, %.loc4_37.3) to file.%tuple_copy.var [concrete = constants.%tuple.21c]
  230. // CHECK:STDOUT: %.loc4_1: init %tuple.type.d07 = converted %.loc4_37.1, %.loc4_37.4 [concrete = constants.%tuple.21c]
  231. // CHECK:STDOUT: assign file.%tuple_copy.var, %.loc4_1
  232. // CHECK:STDOUT: %int_3.loc6: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  233. // CHECK:STDOUT: %int_2.loc6: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  234. // CHECK:STDOUT: %int_1.loc6: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  235. // CHECK:STDOUT: %.loc6_71.1: %struct_type.c.b.a = struct_literal (%int_3.loc6, %int_2.loc6, %int_1.loc6)
  236. // CHECK:STDOUT: %int_32.loc6_81: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  237. // CHECK:STDOUT: %i32.loc6_81: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  238. // CHECK:STDOUT: %int_32.loc6_90: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  239. // CHECK:STDOUT: %i32.loc6_90: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  240. // CHECK:STDOUT: %int_32.loc6_99: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  241. // CHECK:STDOUT: %i32.loc6_99: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  242. // CHECK:STDOUT: %struct_type.b.a.c: type = struct_type {.b: %i32, .a: %i32, .c: %i32} [concrete = constants.%struct_type.b.a.c]
  243. // CHECK:STDOUT: %impl.elem0.loc6_71.1: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  244. // CHECK:STDOUT: %bound_method.loc6_71.1: <bound method> = bound_method %int_2.loc6, %impl.elem0.loc6_71.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82]
  245. // CHECK:STDOUT: %specific_fn.loc6_71.1: <specific function> = specific_function %impl.elem0.loc6_71.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  246. // CHECK:STDOUT: %bound_method.loc6_71.2: <bound method> = bound_method %int_2.loc6, %specific_fn.loc6_71.1 [concrete = constants.%bound_method.8bd]
  247. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.1: init %i32 = call %bound_method.loc6_71.2(%int_2.loc6) [concrete = constants.%int_2.ef8]
  248. // CHECK:STDOUT: %.loc6_71.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.1 [concrete = constants.%int_2.ef8]
  249. // CHECK:STDOUT: %.loc6_71.3: %i32 = converted %int_2.loc6, %.loc6_71.2 [concrete = constants.%int_2.ef8]
  250. // CHECK:STDOUT: %impl.elem0.loc6_71.2: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  251. // CHECK:STDOUT: %bound_method.loc6_71.3: <bound method> = bound_method %int_1.loc6, %impl.elem0.loc6_71.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  252. // CHECK:STDOUT: %specific_fn.loc6_71.2: <specific function> = specific_function %impl.elem0.loc6_71.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  253. // CHECK:STDOUT: %bound_method.loc6_71.4: <bound method> = bound_method %int_1.loc6, %specific_fn.loc6_71.2 [concrete = constants.%bound_method.c11]
  254. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.2: init %i32 = call %bound_method.loc6_71.4(%int_1.loc6) [concrete = constants.%int_1.5d2]
  255. // CHECK:STDOUT: %.loc6_71.4: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.2 [concrete = constants.%int_1.5d2]
  256. // CHECK:STDOUT: %.loc6_71.5: %i32 = converted %int_1.loc6, %.loc6_71.4 [concrete = constants.%int_1.5d2]
  257. // CHECK:STDOUT: %impl.elem0.loc6_71.3: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  258. // CHECK:STDOUT: %bound_method.loc6_71.5: <bound method> = bound_method %int_3.loc6, %impl.elem0.loc6_71.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.595]
  259. // CHECK:STDOUT: %specific_fn.loc6_71.3: <specific function> = specific_function %impl.elem0.loc6_71.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  260. // CHECK:STDOUT: %bound_method.loc6_71.6: <bound method> = bound_method %int_3.loc6, %specific_fn.loc6_71.3 [concrete = constants.%bound_method.f36]
  261. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.3: init %i32 = call %bound_method.loc6_71.6(%int_3.loc6) [concrete = constants.%int_3.822]
  262. // CHECK:STDOUT: %.loc6_71.6: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6_71.3 [concrete = constants.%int_3.822]
  263. // CHECK:STDOUT: %.loc6_71.7: %i32 = converted %int_3.loc6, %.loc6_71.6 [concrete = constants.%int_3.822]
  264. // CHECK:STDOUT: %struct.loc6: %struct_type.b.a.c = struct_value (%.loc6_71.3, %.loc6_71.5, %.loc6_71.7) [concrete = constants.%struct.21d]
  265. // CHECK:STDOUT: %.loc6_73.1: %struct_type.b.a.c = converted %.loc6_71.1, %struct.loc6 [concrete = constants.%struct.21d]
  266. // CHECK:STDOUT: %.loc6_73.2: %i32 = struct_access %.loc6_73.1, element1 [concrete = constants.%int_1.5d2]
  267. // CHECK:STDOUT: %impl.elem0.loc6_73.1: %.7fa = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%Int.as.Copy.impl.Op.f59]
  268. // CHECK:STDOUT: %bound_method.loc6_73.1: <bound method> = bound_method %.loc6_73.2, %impl.elem0.loc6_73.1 [concrete = constants.%Int.as.Copy.impl.Op.bound.e95]
  269. // CHECK:STDOUT: %specific_fn.loc6_73.1: <specific function> = specific_function %impl.elem0.loc6_73.1, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
  270. // CHECK:STDOUT: %bound_method.loc6_73.2: <bound method> = bound_method %.loc6_73.2, %specific_fn.loc6_73.1 [concrete = constants.%bound_method.dd6]
  271. // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc6_73.1: init %i32 = call %bound_method.loc6_73.2(%.loc6_73.2) [concrete = constants.%int_1.5d2]
  272. // CHECK:STDOUT: %.loc6_73.3: ref %i32 = struct_access file.%struct_copy.var, element1 [concrete = constants.%.91e]
  273. // CHECK:STDOUT: %.loc6_73.4: init %i32 = initialize_from %Int.as.Copy.impl.Op.call.loc6_73.1 to %.loc6_73.3 [concrete = constants.%int_1.5d2]
  274. // CHECK:STDOUT: %.loc6_73.5: %i32 = struct_access %.loc6_73.1, element0 [concrete = constants.%int_2.ef8]
  275. // CHECK:STDOUT: %impl.elem0.loc6_73.2: %.7fa = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%Int.as.Copy.impl.Op.f59]
  276. // CHECK:STDOUT: %bound_method.loc6_73.3: <bound method> = bound_method %.loc6_73.5, %impl.elem0.loc6_73.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.7f6]
  277. // CHECK:STDOUT: %specific_fn.loc6_73.2: <specific function> = specific_function %impl.elem0.loc6_73.2, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
  278. // CHECK:STDOUT: %bound_method.loc6_73.4: <bound method> = bound_method %.loc6_73.5, %specific_fn.loc6_73.2 [concrete = constants.%bound_method.bb3]
  279. // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc6_73.2: init %i32 = call %bound_method.loc6_73.4(%.loc6_73.5) [concrete = constants.%int_2.ef8]
  280. // CHECK:STDOUT: %.loc6_73.6: ref %i32 = struct_access file.%struct_copy.var, element0 [concrete = constants.%.657]
  281. // CHECK:STDOUT: %.loc6_73.7: init %i32 = initialize_from %Int.as.Copy.impl.Op.call.loc6_73.2 to %.loc6_73.6 [concrete = constants.%int_2.ef8]
  282. // CHECK:STDOUT: %.loc6_73.8: %i32 = struct_access %.loc6_73.1, element2 [concrete = constants.%int_3.822]
  283. // CHECK:STDOUT: %impl.elem0.loc6_73.3: %.7fa = impl_witness_access constants.%Copy.impl_witness.a32, element0 [concrete = constants.%Int.as.Copy.impl.Op.f59]
  284. // CHECK:STDOUT: %bound_method.loc6_73.5: <bound method> = bound_method %.loc6_73.8, %impl.elem0.loc6_73.3 [concrete = constants.%Int.as.Copy.impl.Op.bound.b5b]
  285. // CHECK:STDOUT: %specific_fn.loc6_73.3: <specific function> = specific_function %impl.elem0.loc6_73.3, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
  286. // CHECK:STDOUT: %bound_method.loc6_73.6: <bound method> = bound_method %.loc6_73.8, %specific_fn.loc6_73.3 [concrete = constants.%bound_method.028]
  287. // CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc6_73.3: init %i32 = call %bound_method.loc6_73.6(%.loc6_73.8) [concrete = constants.%int_3.822]
  288. // CHECK:STDOUT: %.loc6_73.9: ref %i32 = struct_access file.%struct_copy.var, element2 [concrete = constants.%.8fb]
  289. // CHECK:STDOUT: %.loc6_73.10: init %i32 = initialize_from %Int.as.Copy.impl.Op.call.loc6_73.3 to %.loc6_73.9 [concrete = constants.%int_3.822]
  290. // CHECK:STDOUT: %.loc6_73.11: init %struct_type.a.b.c = struct_init (%.loc6_73.4, %.loc6_73.7, %.loc6_73.10) to file.%struct_copy.var [concrete = constants.%struct.cff]
  291. // CHECK:STDOUT: %.loc6_1: init %struct_type.a.b.c = converted %.loc6_73.1, %.loc6_73.11 [concrete = constants.%struct.cff]
  292. // CHECK:STDOUT: assign file.%struct_copy.var, %.loc6_1
  293. // CHECK:STDOUT: %int_0.loc8_35: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
  294. // CHECK:STDOUT: %.loc8_37.1: %tuple.type.985 = tuple_literal (%int_0.loc8_35)
  295. // CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  296. // CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  297. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5]
  298. // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7]
  299. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  300. // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9]
  301. // CHECK:STDOUT: %.loc8_64.1: %tuple.type.d46 = tuple_literal (%int_5, %int_7, %int_1.loc8, %int_9)
  302. // CHECK:STDOUT: %int_2.loc8: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  303. // CHECK:STDOUT: %tuple.loc8: %tuple.type.d46 = tuple_value (%int_5, %int_7, %int_1.loc8, %int_9) [concrete = constants.%tuple.869]
  304. // CHECK:STDOUT: %.loc8_64.2: %tuple.type.d46 = converted %.loc8_64.1, %tuple.loc8 [concrete = constants.%tuple.869]
  305. // CHECK:STDOUT: %tuple.elem2: Core.IntLiteral = tuple_access %.loc8_64.2, element2 [concrete = constants.%int_1.5b8]
  306. // CHECK:STDOUT: %array_type.loc8: type = array_type %tuple.elem2, %i32.loc8 [concrete = constants.%array_type]
  307. // CHECK:STDOUT: %impl.elem0.loc8: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  308. // CHECK:STDOUT: %bound_method.loc8_37.1: <bound method> = bound_method %int_0.loc8_35, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.931]
  309. // CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  310. // CHECK:STDOUT: %bound_method.loc8_37.2: <bound method> = bound_method %int_0.loc8_35, %specific_fn.loc8 [concrete = constants.%bound_method.c25]
  311. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %i32 = call %bound_method.loc8_37.2(%int_0.loc8_35) [concrete = constants.%int_0.6a9]
  312. // CHECK:STDOUT: %.loc8_37.2: init %i32 = converted %int_0.loc8_35, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_0.6a9]
  313. // CHECK:STDOUT: %.loc8_1: ref %array_type = splice_block file.%tuple_index.var [concrete = file.%tuple_index.var] {}
  314. // CHECK:STDOUT: %int_0.loc8_37: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
  315. // CHECK:STDOUT: %.loc8_37.3: ref %i32 = array_index %.loc8_1, %int_0.loc8_37
  316. // CHECK:STDOUT: %.loc8_37.4: init %i32 = initialize_from %.loc8_37.2 to %.loc8_37.3 [concrete = constants.%int_0.6a9]
  317. // CHECK:STDOUT: %.loc8_37.5: init %array_type = array_init (%.loc8_37.4) to %.loc8_1 [concrete = constants.%array]
  318. // CHECK:STDOUT: %.loc8_39: init %array_type = converted %.loc8_37.1, %.loc8_37.5 [concrete = constants.%array]
  319. // CHECK:STDOUT: assign file.%tuple_index.var, %.loc8_39
  320. // CHECK:STDOUT: %int_0.loc10_37: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
  321. // CHECK:STDOUT: %.loc10_39.1: %tuple.type.985 = tuple_literal (%int_0.loc10_37)
  322. // CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  323. // CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  324. // CHECK:STDOUT: %int_3.loc10: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  325. // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  326. // CHECK:STDOUT: %.loc10_70.1: %struct_type.a.b = struct_literal (%int_3.loc10, %int_1.loc10)
  327. // CHECK:STDOUT: %struct.loc10: %struct_type.a.b = struct_value (%int_3.loc10, %int_1.loc10) [concrete = constants.%struct.a81]
  328. // CHECK:STDOUT: %.loc10_70.2: %struct_type.a.b = converted %.loc10_70.1, %struct.loc10 [concrete = constants.%struct.a81]
  329. // CHECK:STDOUT: %.loc10_71: Core.IntLiteral = struct_access %.loc10_70.2, element1 [concrete = constants.%int_1.5b8]
  330. // CHECK:STDOUT: %array_type.loc10: type = array_type %.loc10_71, %i32.loc10 [concrete = constants.%array_type]
  331. // CHECK:STDOUT: %impl.elem0.loc10: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  332. // CHECK:STDOUT: %bound_method.loc10_39.1: <bound method> = bound_method %int_0.loc10_37, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.931]
  333. // CHECK:STDOUT: %specific_fn.loc10: <specific function> = specific_function %impl.elem0.loc10, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  334. // CHECK:STDOUT: %bound_method.loc10_39.2: <bound method> = bound_method %int_0.loc10_37, %specific_fn.loc10 [concrete = constants.%bound_method.c25]
  335. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10: init %i32 = call %bound_method.loc10_39.2(%int_0.loc10_37) [concrete = constants.%int_0.6a9]
  336. // CHECK:STDOUT: %.loc10_39.2: init %i32 = converted %int_0.loc10_37, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10 [concrete = constants.%int_0.6a9]
  337. // CHECK:STDOUT: %.loc10_1: ref %array_type = splice_block file.%struct_access.var [concrete = file.%struct_access.var] {}
  338. // CHECK:STDOUT: %int_0.loc10_39: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
  339. // CHECK:STDOUT: %.loc10_39.3: ref %i32 = array_index %.loc10_1, %int_0.loc10_39
  340. // CHECK:STDOUT: %.loc10_39.4: init %i32 = initialize_from %.loc10_39.2 to %.loc10_39.3 [concrete = constants.%int_0.6a9]
  341. // CHECK:STDOUT: %.loc10_39.5: init %array_type = array_init (%.loc10_39.4) to %.loc10_1 [concrete = constants.%array]
  342. // CHECK:STDOUT: %.loc10_41: init %array_type = converted %.loc10_39.1, %.loc10_39.5 [concrete = constants.%array]
  343. // CHECK:STDOUT: assign file.%struct_access.var, %.loc10_41
  344. // CHECK:STDOUT: <elided>
  345. // CHECK:STDOUT: }
  346. // CHECK:STDOUT:
  347. // CHECK:STDOUT: --- fail_todo_array_temporary.carbon
  348. // CHECK:STDOUT:
  349. // CHECK:STDOUT: constants {
  350. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  351. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  352. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  353. // CHECK:STDOUT: %array_type.0cb: type = array_type %int_1.5b8, %i32 [concrete]
  354. // CHECK:STDOUT: %pattern_type.a98: type = pattern_type %array_type.0cb [concrete]
  355. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  356. // CHECK:STDOUT: %tuple.type.985: type = tuple_type (Core.IntLiteral) [concrete]
  357. // CHECK:STDOUT: %int_5.64b: Core.IntLiteral = int_value 5 [concrete]
  358. // CHECK:STDOUT: %int_7.29f: Core.IntLiteral = int_value 7 [concrete]
  359. // CHECK:STDOUT: %int_9.988: Core.IntLiteral = int_value 9 [concrete]
  360. // CHECK:STDOUT: %tuple.type.d46: type = tuple_type (Core.IntLiteral, Core.IntLiteral, Core.IntLiteral, Core.IntLiteral) [concrete]
  361. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete]
  362. // CHECK:STDOUT: %array_type.f32: type = array_type %int_4, %i32 [concrete]
  363. // CHECK:STDOUT: %ImplicitAs.type.d14: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  364. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  365. // CHECK:STDOUT: %To: Core.IntLiteral = bind_symbolic_name To, 0 [symbolic]
  366. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
  367. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340 = struct_value () [symbolic]
  368. // CHECK:STDOUT: %ImplicitAs.impl_witness.204: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.9e9, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  369. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  370. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.584 = struct_value () [concrete]
  371. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.d14 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.204) [concrete]
  372. // CHECK:STDOUT: %.1df: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet [concrete]
  373. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.23d: <bound method> = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  374. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  375. // CHECK:STDOUT: %bound_method.724: <bound method> = bound_method %int_5.64b, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  376. // CHECK:STDOUT: %int_5.0f6: %i32 = int_value 5 [concrete]
  377. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.113: <bound method> = bound_method %int_7.29f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  378. // CHECK:STDOUT: %bound_method.763: <bound method> = bound_method %int_7.29f, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  379. // CHECK:STDOUT: %int_7.0b1: %i32 = int_value 7 [concrete]
  380. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  381. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  382. // CHECK:STDOUT: %bound_method.c11: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  383. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  384. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete]
  385. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.36a: <bound method> = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  386. // CHECK:STDOUT: %bound_method.942: <bound method> = bound_method %int_9.988, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  387. // CHECK:STDOUT: %int_9.f88: %i32 = int_value 9 [concrete]
  388. // CHECK:STDOUT: %array: %array_type.f32 = tuple_value (%int_5.0f6, %int_7.0b1, %int_1.5d2, %int_9.f88) [concrete]
  389. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0 [concrete]
  390. // CHECK:STDOUT: %bound_method.8bd: <bound method> = bound_method %int_2.ecc, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  391. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  392. // CHECK:STDOUT: }
  393. // CHECK:STDOUT:
  394. // CHECK:STDOUT: imports {
  395. // CHECK:STDOUT: %Core.import_ref.ee7: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.340) = import_ref Core//prelude/parts/int, loc23_39, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.1c0)]
  396. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.9e9 = impl_witness_table (%Core.import_ref.ee7), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  397. // CHECK:STDOUT: }
  398. // CHECK:STDOUT:
  399. // CHECK:STDOUT: file {
  400. // CHECK:STDOUT: name_binding_decl {
  401. // CHECK:STDOUT: %array_index.patt: %pattern_type.a98 = binding_pattern array_index [concrete]
  402. // CHECK:STDOUT: %array_index.var_patt: %pattern_type.a98 = var_pattern %array_index.patt [concrete]
  403. // CHECK:STDOUT: }
  404. // CHECK:STDOUT: %array_index.var: ref %array_type.0cb = var %array_index.var_patt [concrete]
  405. // CHECK:STDOUT: %.loc9: type = splice_block %array_type [concrete = constants.%array_type.0cb] {
  406. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  407. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  408. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  409. // CHECK:STDOUT: %array_type: type = array_type %int_1, %i32 [concrete = constants.%array_type.0cb]
  410. // CHECK:STDOUT: }
  411. // CHECK:STDOUT: %array_index: ref %array_type.0cb = bind_name array_index, %array_index.var [concrete = %array_index.var]
  412. // CHECK:STDOUT: }
  413. // CHECK:STDOUT:
  414. // CHECK:STDOUT: fn @__global_init() {
  415. // CHECK:STDOUT: !entry:
  416. // CHECK:STDOUT: %int_0.loc9_35: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  417. // CHECK:STDOUT: %.loc9_37: %tuple.type.985 = tuple_literal (%int_0.loc9_35)
  418. // CHECK:STDOUT: %int_32.loc9_48: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  419. // CHECK:STDOUT: %i32.loc9_48: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  420. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5.64b]
  421. // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7.29f]
  422. // CHECK:STDOUT: %int_1.loc9_61: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  423. // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988]
  424. // CHECK:STDOUT: %.loc9_65.1: %tuple.type.d46 = tuple_literal (%int_5, %int_7, %int_1.loc9_61, %int_9)
  425. // CHECK:STDOUT: %int_32.loc9_76: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  426. // CHECK:STDOUT: %i32.loc9_76: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  427. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4]
  428. // CHECK:STDOUT: %array_type: type = array_type %int_4, %i32.loc9_76 [concrete = constants.%array_type.f32]
  429. // CHECK:STDOUT: %impl.elem0.loc9_65.1: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  430. // CHECK:STDOUT: %bound_method.loc9_65.1: <bound method> = bound_method %int_5, %impl.elem0.loc9_65.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.23d]
  431. // CHECK:STDOUT: %specific_fn.loc9_65.1: <specific function> = specific_function %impl.elem0.loc9_65.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  432. // CHECK:STDOUT: %bound_method.loc9_65.2: <bound method> = bound_method %int_5, %specific_fn.loc9_65.1 [concrete = constants.%bound_method.724]
  433. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.1: init %i32 = call %bound_method.loc9_65.2(%int_5) [concrete = constants.%int_5.0f6]
  434. // CHECK:STDOUT: %.loc9_65.2: init %i32 = converted %int_5, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.1 [concrete = constants.%int_5.0f6]
  435. // CHECK:STDOUT: %.loc9_65.3: ref %array_type.f32 = temporary_storage
  436. // CHECK:STDOUT: %int_0.loc9_65: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  437. // CHECK:STDOUT: %.loc9_65.4: ref %i32 = array_index %.loc9_65.3, %int_0.loc9_65
  438. // CHECK:STDOUT: %.loc9_65.5: init %i32 = initialize_from %.loc9_65.2 to %.loc9_65.4 [concrete = constants.%int_5.0f6]
  439. // CHECK:STDOUT: %impl.elem0.loc9_65.2: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  440. // CHECK:STDOUT: %bound_method.loc9_65.3: <bound method> = bound_method %int_7, %impl.elem0.loc9_65.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.113]
  441. // CHECK:STDOUT: %specific_fn.loc9_65.2: <specific function> = specific_function %impl.elem0.loc9_65.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  442. // CHECK:STDOUT: %bound_method.loc9_65.4: <bound method> = bound_method %int_7, %specific_fn.loc9_65.2 [concrete = constants.%bound_method.763]
  443. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.2: init %i32 = call %bound_method.loc9_65.4(%int_7) [concrete = constants.%int_7.0b1]
  444. // CHECK:STDOUT: %.loc9_65.6: init %i32 = converted %int_7, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.2 [concrete = constants.%int_7.0b1]
  445. // CHECK:STDOUT: %int_1.loc9_65: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  446. // CHECK:STDOUT: %.loc9_65.7: ref %i32 = array_index %.loc9_65.3, %int_1.loc9_65
  447. // CHECK:STDOUT: %.loc9_65.8: init %i32 = initialize_from %.loc9_65.6 to %.loc9_65.7 [concrete = constants.%int_7.0b1]
  448. // CHECK:STDOUT: %impl.elem0.loc9_65.3: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  449. // CHECK:STDOUT: %bound_method.loc9_65.5: <bound method> = bound_method %int_1.loc9_61, %impl.elem0.loc9_65.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.abf]
  450. // CHECK:STDOUT: %specific_fn.loc9_65.3: <specific function> = specific_function %impl.elem0.loc9_65.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  451. // CHECK:STDOUT: %bound_method.loc9_65.6: <bound method> = bound_method %int_1.loc9_61, %specific_fn.loc9_65.3 [concrete = constants.%bound_method.c11]
  452. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.3: init %i32 = call %bound_method.loc9_65.6(%int_1.loc9_61) [concrete = constants.%int_1.5d2]
  453. // CHECK:STDOUT: %.loc9_65.9: init %i32 = converted %int_1.loc9_61, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.3 [concrete = constants.%int_1.5d2]
  454. // CHECK:STDOUT: %int_2.loc9_65: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  455. // CHECK:STDOUT: %.loc9_65.10: ref %i32 = array_index %.loc9_65.3, %int_2.loc9_65
  456. // CHECK:STDOUT: %.loc9_65.11: init %i32 = initialize_from %.loc9_65.9 to %.loc9_65.10 [concrete = constants.%int_1.5d2]
  457. // CHECK:STDOUT: %impl.elem0.loc9_65.4: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  458. // CHECK:STDOUT: %bound_method.loc9_65.7: <bound method> = bound_method %int_9, %impl.elem0.loc9_65.4 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.36a]
  459. // CHECK:STDOUT: %specific_fn.loc9_65.4: <specific function> = specific_function %impl.elem0.loc9_65.4, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  460. // CHECK:STDOUT: %bound_method.loc9_65.8: <bound method> = bound_method %int_9, %specific_fn.loc9_65.4 [concrete = constants.%bound_method.942]
  461. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.4: init %i32 = call %bound_method.loc9_65.8(%int_9) [concrete = constants.%int_9.f88]
  462. // CHECK:STDOUT: %.loc9_65.12: init %i32 = converted %int_9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_65.4 [concrete = constants.%int_9.f88]
  463. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
  464. // CHECK:STDOUT: %.loc9_65.13: ref %i32 = array_index %.loc9_65.3, %int_3
  465. // CHECK:STDOUT: %.loc9_65.14: init %i32 = initialize_from %.loc9_65.12 to %.loc9_65.13 [concrete = constants.%int_9.f88]
  466. // CHECK:STDOUT: %.loc9_65.15: init %array_type.f32 = array_init (%.loc9_65.5, %.loc9_65.8, %.loc9_65.11, %.loc9_65.14) to %.loc9_65.3 [concrete = constants.%array]
  467. // CHECK:STDOUT: %.loc9_67.1: init %array_type.f32 = converted %.loc9_65.1, %.loc9_65.15 [concrete = constants.%array]
  468. // CHECK:STDOUT: %int_2.loc9_85: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  469. // CHECK:STDOUT: %.loc9_67.2: ref %array_type.f32 = temporary %.loc9_65.3, %.loc9_67.1
  470. // CHECK:STDOUT: %int_32.loc9_86: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  471. // CHECK:STDOUT: %i32.loc9_86: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  472. // CHECK:STDOUT: %impl.elem0.loc9_85: %.1df = impl_witness_access constants.%ImplicitAs.impl_witness.204, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0f0]
  473. // CHECK:STDOUT: %bound_method.loc9_85.1: <bound method> = bound_method %int_2.loc9_85, %impl.elem0.loc9_85 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b82]
  474. // CHECK:STDOUT: %specific_fn.loc9_85: <specific function> = specific_function %impl.elem0.loc9_85, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  475. // CHECK:STDOUT: %bound_method.loc9_85.2: <bound method> = bound_method %int_2.loc9_85, %specific_fn.loc9_85 [concrete = constants.%bound_method.8bd]
  476. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_85: init %i32 = call %bound_method.loc9_85.2(%int_2.loc9_85) [concrete = constants.%int_2.ef8]
  477. // CHECK:STDOUT: %.loc9_85.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_85 [concrete = constants.%int_2.ef8]
  478. // CHECK:STDOUT: %.loc9_85.2: %i32 = converted %int_2.loc9_85, %.loc9_85.1 [concrete = constants.%int_2.ef8]
  479. // CHECK:STDOUT: %.loc9_86.1: ref %i32 = array_index %.loc9_67.2, %.loc9_85.2
  480. // CHECK:STDOUT: %.loc9_86.2: %i32 = bind_value %.loc9_86.1
  481. // CHECK:STDOUT: assign file.%array_index.var, <error>
  482. // CHECK:STDOUT: <elided>
  483. // CHECK:STDOUT: }
  484. // CHECK:STDOUT:
  485. // CHECK:STDOUT: --- symbolic.carbon
  486. // CHECK:STDOUT:
  487. // CHECK:STDOUT: constants {
  488. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  489. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  490. // CHECK:STDOUT: %ptr.79f131.1: type = ptr_type %T [symbolic]
  491. // CHECK:STDOUT: %const.a1a: type = const_type %T [symbolic]
  492. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  493. // CHECK:STDOUT: %tuple.type.4f2: type = tuple_type (%ptr.79f131.1, %const.a1a) [symbolic]
  494. // CHECK:STDOUT: %require_complete.155: <witness> = require_complete_type %tuple.type.4f2 [symbolic]
  495. // CHECK:STDOUT: %pattern_type.973: type = pattern_type %tuple.type.4f2 [symbolic]
  496. // CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %T} [symbolic]
  497. // CHECK:STDOUT: %require_complete.28a: <witness> = require_complete_type %struct_type.a [symbolic]
  498. // CHECK:STDOUT: %pattern_type.95a: type = pattern_type %struct_type.a [symbolic]
  499. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete]
  500. // CHECK:STDOUT: %array_type.ec2: type = array_type %int_5, %T [symbolic]
  501. // CHECK:STDOUT: %ptr.1a0: type = ptr_type %array_type.ec2 [symbolic]
  502. // CHECK:STDOUT: %require_complete.fe1: <witness> = require_complete_type %array_type.ec2 [symbolic]
  503. // CHECK:STDOUT: %pattern_type.035: type = pattern_type %array_type.ec2 [symbolic]
  504. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  505. // CHECK:STDOUT: %Destroy.Op.type: type = fn_type @Destroy.Op [concrete]
  506. // CHECK:STDOUT: %type_where: type = facet_type <type where .Self impls <CanAggregateDestroy>> [concrete]
  507. // CHECK:STDOUT: %facet_value.daa: %type_where = facet_value %array_type.ec2, () [symbolic]
  508. // CHECK:STDOUT: %require_complete.b09: <witness> = require_complete_type %ptr.1a0 [symbolic]
  509. // CHECK:STDOUT: %Destroy.lookup_impl_witness.b45: <witness> = lookup_impl_witness %array_type.ec2, @Destroy [symbolic]
  510. // CHECK:STDOUT: %Destroy.facet.226: %Destroy.type = facet_value %array_type.ec2, (%Destroy.lookup_impl_witness.b45) [symbolic]
  511. // CHECK:STDOUT: %.59f: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.226 [symbolic]
  512. // CHECK:STDOUT: %impl.elem0.578: %.59f = impl_witness_access %Destroy.lookup_impl_witness.b45, element0 [symbolic]
  513. // CHECK:STDOUT: %specific_impl_fn.73f: <specific function> = specific_impl_function %impl.elem0.578, @Destroy.Op(%Destroy.facet.226) [symbolic]
  514. // CHECK:STDOUT: %facet_value.6d7: %type_where = facet_value %struct_type.a, () [symbolic]
  515. // CHECK:STDOUT: %ptr.48a: type = ptr_type %struct_type.a [symbolic]
  516. // CHECK:STDOUT: %require_complete.86d: <witness> = require_complete_type %ptr.48a [symbolic]
  517. // CHECK:STDOUT: %Destroy.lookup_impl_witness.b34: <witness> = lookup_impl_witness %struct_type.a, @Destroy [symbolic]
  518. // CHECK:STDOUT: %Destroy.facet.90b: %Destroy.type = facet_value %struct_type.a, (%Destroy.lookup_impl_witness.b34) [symbolic]
  519. // CHECK:STDOUT: %.aa5: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.90b [symbolic]
  520. // CHECK:STDOUT: %impl.elem0.d3d: %.aa5 = impl_witness_access %Destroy.lookup_impl_witness.b34, element0 [symbolic]
  521. // CHECK:STDOUT: %specific_impl_fn.612: <specific function> = specific_impl_function %impl.elem0.d3d, @Destroy.Op(%Destroy.facet.90b) [symbolic]
  522. // CHECK:STDOUT: %facet_value.2b4: %type_where = facet_value %tuple.type.4f2, () [symbolic]
  523. // CHECK:STDOUT: %ptr.6cd: type = ptr_type %tuple.type.4f2 [symbolic]
  524. // CHECK:STDOUT: %require_complete.66e: <witness> = require_complete_type %ptr.6cd [symbolic]
  525. // CHECK:STDOUT: %Destroy.lookup_impl_witness.a8a: <witness> = lookup_impl_witness %tuple.type.4f2, @Destroy [symbolic]
  526. // CHECK:STDOUT: %Destroy.facet.6c8: %Destroy.type = facet_value %tuple.type.4f2, (%Destroy.lookup_impl_witness.a8a) [symbolic]
  527. // CHECK:STDOUT: %.48c: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.6c8 [symbolic]
  528. // CHECK:STDOUT: %impl.elem0.373: %.48c = impl_witness_access %Destroy.lookup_impl_witness.a8a, element0 [symbolic]
  529. // CHECK:STDOUT: %specific_impl_fn.129: <specific function> = specific_impl_function %impl.elem0.373, @Destroy.Op(%Destroy.facet.6c8) [symbolic]
  530. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  531. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  532. // CHECK:STDOUT: %N.51e: %i32 = bind_symbolic_name N, 0 [symbolic]
  533. // CHECK:STDOUT: %ImplicitAs.type.7a9: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  534. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  535. // CHECK:STDOUT: %From: Core.IntLiteral = bind_symbolic_name From, 0 [symbolic]
  536. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.543: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic]
  537. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.c08: %Int.as.ImplicitAs.impl.Convert.type.543 = struct_value () [symbolic]
  538. // CHECK:STDOUT: %ImplicitAs.impl_witness.6bf: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.e99, @Int.as.ImplicitAs.impl(%int_32) [concrete]
  539. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.516: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_32) [concrete]
  540. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.b09: %Int.as.ImplicitAs.impl.Convert.type.516 = struct_value () [concrete]
  541. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.7a9 = facet_value %i32, (%ImplicitAs.impl_witness.6bf) [concrete]
  542. // CHECK:STDOUT: %.81e: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet [concrete]
  543. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %N.51e, %Int.as.ImplicitAs.impl.Convert.b09 [symbolic]
  544. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Int.as.ImplicitAs.impl.Convert.b09, @Int.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  545. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %N.51e, %Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic]
  546. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method(%N.51e) [symbolic]
  547. // CHECK:STDOUT: %array_type.120: type = array_type %Int.as.ImplicitAs.impl.Convert.call, %i32 [symbolic]
  548. // CHECK:STDOUT: %ptr.743: type = ptr_type %array_type.120 [symbolic]
  549. // CHECK:STDOUT: %require_complete.4c7: <witness> = require_complete_type %array_type.120 [symbolic]
  550. // CHECK:STDOUT: %pattern_type.aeb: type = pattern_type %array_type.120 [symbolic]
  551. // CHECK:STDOUT: %facet_value.8b7: %type_where = facet_value %array_type.120, () [symbolic]
  552. // CHECK:STDOUT: %require_complete.9c4: <witness> = require_complete_type %ptr.743 [symbolic]
  553. // CHECK:STDOUT: %Destroy.lookup_impl_witness.919: <witness> = lookup_impl_witness %array_type.120, @Destroy [symbolic]
  554. // CHECK:STDOUT: %Destroy.facet.69e: %Destroy.type = facet_value %array_type.120, (%Destroy.lookup_impl_witness.919) [symbolic]
  555. // CHECK:STDOUT: %.83d: type = fn_type_with_self_type %Destroy.Op.type, %Destroy.facet.69e [symbolic]
  556. // CHECK:STDOUT: %impl.elem0.8b9: %.83d = impl_witness_access %Destroy.lookup_impl_witness.919, element0 [symbolic]
  557. // CHECK:STDOUT: %specific_impl_fn.0a7: <specific function> = specific_impl_function %impl.elem0.8b9, @Destroy.Op(%Destroy.facet.69e) [symbolic]
  558. // CHECK:STDOUT: }
  559. // CHECK:STDOUT:
  560. // CHECK:STDOUT: imports {
  561. // CHECK:STDOUT: %Core.import_ref.25c: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.543) = import_ref Core//prelude/parts/int, loc27_44, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.c08)]
  562. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.e99 = impl_witness_table (%Core.import_ref.25c), @Int.as.ImplicitAs.impl [concrete]
  563. // CHECK:STDOUT: }
  564. // CHECK:STDOUT:
  565. // CHECK:STDOUT: generic fn @F(%T.loc4_6.2: type) {
  566. // CHECK:STDOUT: <elided>
  567. // CHECK:STDOUT:
  568. // CHECK:STDOUT: !definition:
  569. // CHECK:STDOUT: %ptr.loc6_12.2: type = ptr_type %T.loc4_6.1 [symbolic = %ptr.loc6_12.2 (constants.%ptr.79f131.1)]
  570. // CHECK:STDOUT: %const.loc6_15.2: type = const_type %T.loc4_6.1 [symbolic = %const.loc6_15.2 (constants.%const.a1a)]
  571. // CHECK:STDOUT: %tuple.type: type = tuple_type (%ptr.loc6_12.2, %const.loc6_15.2) [symbolic = %tuple.type (constants.%tuple.type.4f2)]
  572. // CHECK:STDOUT: %require_complete.loc6_22: <witness> = require_complete_type %tuple.type [symbolic = %require_complete.loc6_22 (constants.%require_complete.155)]
  573. // CHECK:STDOUT: %pattern_type.loc6: type = pattern_type %tuple.type [symbolic = %pattern_type.loc6 (constants.%pattern_type.973)]
  574. // CHECK:STDOUT: %struct_type.a.loc7_16.2: type = struct_type {.a: @F.%T.loc4_6.1 (%T)} [symbolic = %struct_type.a.loc7_16.2 (constants.%struct_type.a)]
  575. // CHECK:STDOUT: %require_complete.loc7_16: <witness> = require_complete_type %struct_type.a.loc7_16.2 [symbolic = %require_complete.loc7_16 (constants.%require_complete.28a)]
  576. // CHECK:STDOUT: %pattern_type.loc7: type = pattern_type %struct_type.a.loc7_16.2 [symbolic = %pattern_type.loc7 (constants.%pattern_type.95a)]
  577. // CHECK:STDOUT: %array_type.loc8_20.2: type = array_type constants.%int_5, %T.loc4_6.1 [symbolic = %array_type.loc8_20.2 (constants.%array_type.ec2)]
  578. // CHECK:STDOUT: %require_complete.loc8_20: <witness> = require_complete_type %array_type.loc8_20.2 [symbolic = %require_complete.loc8_20 (constants.%require_complete.fe1)]
  579. // CHECK:STDOUT: %pattern_type.loc8: type = pattern_type %array_type.loc8_20.2 [symbolic = %pattern_type.loc8 (constants.%pattern_type.035)]
  580. // CHECK:STDOUT: %facet_value.loc8_3.2: %type_where = facet_value %array_type.loc8_20.2, () [symbolic = %facet_value.loc8_3.2 (constants.%facet_value.daa)]
  581. // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc8: <witness> = lookup_impl_witness %array_type.loc8_20.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc8 (constants.%Destroy.lookup_impl_witness.b45)]
  582. // CHECK:STDOUT: %Destroy.facet.loc8: %Destroy.type = facet_value %array_type.loc8_20.2, (%Destroy.lookup_impl_witness.loc8) [symbolic = %Destroy.facet.loc8 (constants.%Destroy.facet.226)]
  583. // CHECK:STDOUT: %.loc8_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc8 [symbolic = %.loc8_3.3 (constants.%.59f)]
  584. // CHECK:STDOUT: %impl.elem0.loc8_3.2: @F.%.loc8_3.3 (%.59f) = impl_witness_access %Destroy.lookup_impl_witness.loc8, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.578)]
  585. // CHECK:STDOUT: %specific_impl_fn.loc8_3.2: <specific function> = specific_impl_function %impl.elem0.loc8_3.2, @Destroy.Op(%Destroy.facet.loc8) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.73f)]
  586. // CHECK:STDOUT: %ptr.loc8: type = ptr_type %array_type.loc8_20.2 [symbolic = %ptr.loc8 (constants.%ptr.1a0)]
  587. // CHECK:STDOUT: %require_complete.loc8_3: <witness> = require_complete_type %ptr.loc8 [symbolic = %require_complete.loc8_3 (constants.%require_complete.b09)]
  588. // CHECK:STDOUT: %facet_value.loc7_3.2: %type_where = facet_value %struct_type.a.loc7_16.2, () [symbolic = %facet_value.loc7_3.2 (constants.%facet_value.6d7)]
  589. // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc7: <witness> = lookup_impl_witness %struct_type.a.loc7_16.2, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc7 (constants.%Destroy.lookup_impl_witness.b34)]
  590. // CHECK:STDOUT: %Destroy.facet.loc7: %Destroy.type = facet_value %struct_type.a.loc7_16.2, (%Destroy.lookup_impl_witness.loc7) [symbolic = %Destroy.facet.loc7 (constants.%Destroy.facet.90b)]
  591. // CHECK:STDOUT: %.loc7_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc7 [symbolic = %.loc7_3.3 (constants.%.aa5)]
  592. // CHECK:STDOUT: %impl.elem0.loc7_3.2: @F.%.loc7_3.3 (%.aa5) = impl_witness_access %Destroy.lookup_impl_witness.loc7, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.d3d)]
  593. // CHECK:STDOUT: %specific_impl_fn.loc7_3.2: <specific function> = specific_impl_function %impl.elem0.loc7_3.2, @Destroy.Op(%Destroy.facet.loc7) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.612)]
  594. // CHECK:STDOUT: %ptr.loc7: type = ptr_type %struct_type.a.loc7_16.2 [symbolic = %ptr.loc7 (constants.%ptr.48a)]
  595. // CHECK:STDOUT: %require_complete.loc7_3: <witness> = require_complete_type %ptr.loc7 [symbolic = %require_complete.loc7_3 (constants.%require_complete.86d)]
  596. // CHECK:STDOUT: %facet_value.loc6_3.2: %type_where = facet_value %tuple.type, () [symbolic = %facet_value.loc6_3.2 (constants.%facet_value.2b4)]
  597. // CHECK:STDOUT: %Destroy.lookup_impl_witness.loc6: <witness> = lookup_impl_witness %tuple.type, @Destroy [symbolic = %Destroy.lookup_impl_witness.loc6 (constants.%Destroy.lookup_impl_witness.a8a)]
  598. // CHECK:STDOUT: %Destroy.facet.loc6: %Destroy.type = facet_value %tuple.type, (%Destroy.lookup_impl_witness.loc6) [symbolic = %Destroy.facet.loc6 (constants.%Destroy.facet.6c8)]
  599. // CHECK:STDOUT: %.loc6_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet.loc6 [symbolic = %.loc6_3.3 (constants.%.48c)]
  600. // CHECK:STDOUT: %impl.elem0.loc6_3.2: @F.%.loc6_3.3 (%.48c) = impl_witness_access %Destroy.lookup_impl_witness.loc6, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.373)]
  601. // CHECK:STDOUT: %specific_impl_fn.loc6_3.2: <specific function> = specific_impl_function %impl.elem0.loc6_3.2, @Destroy.Op(%Destroy.facet.loc6) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.129)]
  602. // CHECK:STDOUT: %ptr.loc6_3: type = ptr_type %tuple.type [symbolic = %ptr.loc6_3 (constants.%ptr.6cd)]
  603. // CHECK:STDOUT: %require_complete.loc6_3: <witness> = require_complete_type %ptr.loc6_3 [symbolic = %require_complete.loc6_3 (constants.%require_complete.66e)]
  604. // CHECK:STDOUT:
  605. // CHECK:STDOUT: fn() {
  606. // CHECK:STDOUT: !entry:
  607. // CHECK:STDOUT: name_binding_decl {
  608. // CHECK:STDOUT: %u.patt: @F.%pattern_type.loc6 (%pattern_type.973) = binding_pattern u [concrete]
  609. // CHECK:STDOUT: %u.var_patt: @F.%pattern_type.loc6 (%pattern_type.973) = var_pattern %u.patt [concrete]
  610. // CHECK:STDOUT: }
  611. // CHECK:STDOUT: %u.var: ref @F.%tuple.type (%tuple.type.4f2) = var %u.var_patt
  612. // CHECK:STDOUT: %.loc6_22.1: type = splice_block %.loc6_22.3 [symbolic = %tuple.type (constants.%tuple.type.4f2)] {
  613. // CHECK:STDOUT: %T.ref.loc6_11: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)]
  614. // CHECK:STDOUT: %ptr.loc6_12.1: type = ptr_type %T.ref.loc6_11 [symbolic = %ptr.loc6_12.2 (constants.%ptr.79f131.1)]
  615. // CHECK:STDOUT: %T.ref.loc6_21: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)]
  616. // CHECK:STDOUT: %const.loc6_15.1: type = const_type %T.ref.loc6_21 [symbolic = %const.loc6_15.2 (constants.%const.a1a)]
  617. // CHECK:STDOUT: %.loc6_22.2: %tuple.type.24b = tuple_literal (%ptr.loc6_12.1, %const.loc6_15.1)
  618. // CHECK:STDOUT: %.loc6_22.3: type = converted %.loc6_22.2, constants.%tuple.type.4f2 [symbolic = %tuple.type (constants.%tuple.type.4f2)]
  619. // CHECK:STDOUT: }
  620. // CHECK:STDOUT: %u: ref @F.%tuple.type (%tuple.type.4f2) = bind_name u, %u.var
  621. // CHECK:STDOUT: name_binding_decl {
  622. // CHECK:STDOUT: %v.patt: @F.%pattern_type.loc7 (%pattern_type.95a) = binding_pattern v [concrete]
  623. // CHECK:STDOUT: %v.var_patt: @F.%pattern_type.loc7 (%pattern_type.95a) = var_pattern %v.patt [concrete]
  624. // CHECK:STDOUT: }
  625. // CHECK:STDOUT: %v.var: ref @F.%struct_type.a.loc7_16.2 (%struct_type.a) = var %v.var_patt
  626. // CHECK:STDOUT: %.loc7_16: type = splice_block %struct_type.a.loc7_16.1 [symbolic = %struct_type.a.loc7_16.2 (constants.%struct_type.a)] {
  627. // CHECK:STDOUT: %T.ref.loc7: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)]
  628. // CHECK:STDOUT: %struct_type.a.loc7_16.1: type = struct_type {.a: @F.%T.loc4_6.1 (%T)} [symbolic = %struct_type.a.loc7_16.2 (constants.%struct_type.a)]
  629. // CHECK:STDOUT: }
  630. // CHECK:STDOUT: %v: ref @F.%struct_type.a.loc7_16.2 (%struct_type.a) = bind_name v, %v.var
  631. // CHECK:STDOUT: name_binding_decl {
  632. // CHECK:STDOUT: %w.patt: @F.%pattern_type.loc8 (%pattern_type.035) = binding_pattern w [concrete]
  633. // CHECK:STDOUT: %w.var_patt: @F.%pattern_type.loc8 (%pattern_type.035) = var_pattern %w.patt [concrete]
  634. // CHECK:STDOUT: }
  635. // CHECK:STDOUT: %w.var: ref @F.%array_type.loc8_20.2 (%array_type.ec2) = var %w.var_patt
  636. // CHECK:STDOUT: %.loc8_20: type = splice_block %array_type.loc8_20.1 [symbolic = %array_type.loc8_20.2 (constants.%array_type.ec2)] {
  637. // CHECK:STDOUT: %T.ref.loc8: type = name_ref T, %T.loc4_6.2 [symbolic = %T.loc4_6.1 (constants.%T)]
  638. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5]
  639. // CHECK:STDOUT: %array_type.loc8_20.1: type = array_type %int_5, %T.ref.loc8 [symbolic = %array_type.loc8_20.2 (constants.%array_type.ec2)]
  640. // CHECK:STDOUT: }
  641. // CHECK:STDOUT: %w: ref @F.%array_type.loc8_20.2 (%array_type.ec2) = bind_name w, %w.var
  642. // CHECK:STDOUT: %facet_value.loc8_3.1: %type_where = facet_value constants.%array_type.ec2, () [symbolic = %facet_value.loc8_3.2 (constants.%facet_value.daa)]
  643. // CHECK:STDOUT: %.loc8_3.1: %type_where = converted constants.%array_type.ec2, %facet_value.loc8_3.1 [symbolic = %facet_value.loc8_3.2 (constants.%facet_value.daa)]
  644. // CHECK:STDOUT: %impl.elem0.loc8_3.1: @F.%.loc8_3.3 (%.59f) = impl_witness_access constants.%Destroy.lookup_impl_witness.b45, element0 [symbolic = %impl.elem0.loc8_3.2 (constants.%impl.elem0.578)]
  645. // CHECK:STDOUT: %bound_method.loc8_3.1: <bound method> = bound_method %w.var, %impl.elem0.loc8_3.1
  646. // CHECK:STDOUT: %specific_impl_fn.loc8_3.1: <specific function> = specific_impl_function %impl.elem0.loc8_3.1, @Destroy.Op(constants.%Destroy.facet.226) [symbolic = %specific_impl_fn.loc8_3.2 (constants.%specific_impl_fn.73f)]
  647. // CHECK:STDOUT: %bound_method.loc8_3.2: <bound method> = bound_method %w.var, %specific_impl_fn.loc8_3.1
  648. // CHECK:STDOUT: %addr.loc8: @F.%ptr.loc8 (%ptr.1a0) = addr_of %w.var
  649. // CHECK:STDOUT: %.loc8_3.2: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8)
  650. // CHECK:STDOUT: %facet_value.loc7_3.1: %type_where = facet_value constants.%struct_type.a, () [symbolic = %facet_value.loc7_3.2 (constants.%facet_value.6d7)]
  651. // CHECK:STDOUT: %.loc7_3.1: %type_where = converted constants.%struct_type.a, %facet_value.loc7_3.1 [symbolic = %facet_value.loc7_3.2 (constants.%facet_value.6d7)]
  652. // CHECK:STDOUT: %impl.elem0.loc7_3.1: @F.%.loc7_3.3 (%.aa5) = impl_witness_access constants.%Destroy.lookup_impl_witness.b34, element0 [symbolic = %impl.elem0.loc7_3.2 (constants.%impl.elem0.d3d)]
  653. // CHECK:STDOUT: %bound_method.loc7_3.1: <bound method> = bound_method %v.var, %impl.elem0.loc7_3.1
  654. // CHECK:STDOUT: %specific_impl_fn.loc7_3.1: <specific function> = specific_impl_function %impl.elem0.loc7_3.1, @Destroy.Op(constants.%Destroy.facet.90b) [symbolic = %specific_impl_fn.loc7_3.2 (constants.%specific_impl_fn.612)]
  655. // CHECK:STDOUT: %bound_method.loc7_3.2: <bound method> = bound_method %v.var, %specific_impl_fn.loc7_3.1
  656. // CHECK:STDOUT: %addr.loc7: @F.%ptr.loc7 (%ptr.48a) = addr_of %v.var
  657. // CHECK:STDOUT: %.loc7_3.2: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7)
  658. // CHECK:STDOUT: %facet_value.loc6_3.1: %type_where = facet_value constants.%tuple.type.4f2, () [symbolic = %facet_value.loc6_3.2 (constants.%facet_value.2b4)]
  659. // CHECK:STDOUT: %.loc6_3.1: %type_where = converted constants.%tuple.type.4f2, %facet_value.loc6_3.1 [symbolic = %facet_value.loc6_3.2 (constants.%facet_value.2b4)]
  660. // CHECK:STDOUT: %impl.elem0.loc6_3.1: @F.%.loc6_3.3 (%.48c) = impl_witness_access constants.%Destroy.lookup_impl_witness.a8a, element0 [symbolic = %impl.elem0.loc6_3.2 (constants.%impl.elem0.373)]
  661. // CHECK:STDOUT: %bound_method.loc6_3.1: <bound method> = bound_method %u.var, %impl.elem0.loc6_3.1
  662. // CHECK:STDOUT: %specific_impl_fn.loc6_3.1: <specific function> = specific_impl_function %impl.elem0.loc6_3.1, @Destroy.Op(constants.%Destroy.facet.6c8) [symbolic = %specific_impl_fn.loc6_3.2 (constants.%specific_impl_fn.129)]
  663. // CHECK:STDOUT: %bound_method.loc6_3.2: <bound method> = bound_method %u.var, %specific_impl_fn.loc6_3.1
  664. // CHECK:STDOUT: %addr.loc6: @F.%ptr.loc6_3 (%ptr.6cd) = addr_of %u.var
  665. // CHECK:STDOUT: %.loc6_3.2: init %empty_tuple.type = call %bound_method.loc6_3.2(%addr.loc6)
  666. // CHECK:STDOUT: <elided>
  667. // CHECK:STDOUT: }
  668. // CHECK:STDOUT: }
  669. // CHECK:STDOUT:
  670. // CHECK:STDOUT: generic fn @G(%N.loc12_6.2: %i32) {
  671. // CHECK:STDOUT: <elided>
  672. // CHECK:STDOUT:
  673. // CHECK:STDOUT: !definition:
  674. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %N.loc12_6.1, constants.%Int.as.ImplicitAs.impl.Convert.b09 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)]
  675. // CHECK:STDOUT: %bound_method.loc14_21.3: <bound method> = bound_method %N.loc12_6.1, constants.%Int.as.ImplicitAs.impl.Convert.specific_fn [symbolic = %bound_method.loc14_21.3 (constants.%bound_method)]
  676. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc14_21.2: init Core.IntLiteral = call %bound_method.loc14_21.3(%N.loc12_6.1) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_21.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
  677. // CHECK:STDOUT: %array_type.loc14_22.2: type = array_type %Int.as.ImplicitAs.impl.Convert.call.loc14_21.2, constants.%i32 [symbolic = %array_type.loc14_22.2 (constants.%array_type.120)]
  678. // CHECK:STDOUT: %require_complete.loc14_22: <witness> = require_complete_type %array_type.loc14_22.2 [symbolic = %require_complete.loc14_22 (constants.%require_complete.4c7)]
  679. // CHECK:STDOUT: %pattern_type: type = pattern_type %array_type.loc14_22.2 [symbolic = %pattern_type (constants.%pattern_type.aeb)]
  680. // CHECK:STDOUT: %facet_value.loc14_3.2: %type_where = facet_value %array_type.loc14_22.2, () [symbolic = %facet_value.loc14_3.2 (constants.%facet_value.8b7)]
  681. // CHECK:STDOUT: %Destroy.lookup_impl_witness: <witness> = lookup_impl_witness %array_type.loc14_22.2, @Destroy [symbolic = %Destroy.lookup_impl_witness (constants.%Destroy.lookup_impl_witness.919)]
  682. // CHECK:STDOUT: %Destroy.facet: %Destroy.type = facet_value %array_type.loc14_22.2, (%Destroy.lookup_impl_witness) [symbolic = %Destroy.facet (constants.%Destroy.facet.69e)]
  683. // CHECK:STDOUT: %.loc14_3.3: type = fn_type_with_self_type constants.%Destroy.Op.type, %Destroy.facet [symbolic = %.loc14_3.3 (constants.%.83d)]
  684. // CHECK:STDOUT: %impl.elem0.loc14_3.2: @G.%.loc14_3.3 (%.83d) = impl_witness_access %Destroy.lookup_impl_witness, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.8b9)]
  685. // CHECK:STDOUT: %specific_impl_fn.loc14_3.2: <specific function> = specific_impl_function %impl.elem0.loc14_3.2, @Destroy.Op(%Destroy.facet) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.0a7)]
  686. // CHECK:STDOUT: %ptr: type = ptr_type %array_type.loc14_22.2 [symbolic = %ptr (constants.%ptr.743)]
  687. // CHECK:STDOUT: %require_complete.loc14_3: <witness> = require_complete_type %ptr [symbolic = %require_complete.loc14_3 (constants.%require_complete.9c4)]
  688. // CHECK:STDOUT:
  689. // CHECK:STDOUT: fn() {
  690. // CHECK:STDOUT: !entry:
  691. // CHECK:STDOUT: name_binding_decl {
  692. // CHECK:STDOUT: %k.patt: @G.%pattern_type (%pattern_type.aeb) = binding_pattern k [concrete]
  693. // CHECK:STDOUT: %k.var_patt: @G.%pattern_type (%pattern_type.aeb) = var_pattern %k.patt [concrete]
  694. // CHECK:STDOUT: }
  695. // CHECK:STDOUT: %k.var: ref @G.%array_type.loc14_22.2 (%array_type.120) = var %k.var_patt
  696. // CHECK:STDOUT: %.loc14_22: type = splice_block %array_type.loc14_22.1 [symbolic = %array_type.loc14_22.2 (constants.%array_type.120)] {
  697. // CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  698. // CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  699. // CHECK:STDOUT: %N.ref: %i32 = name_ref N, %N.loc12_6.2 [symbolic = %N.loc12_6.1 (constants.%N.51e)]
  700. // CHECK:STDOUT: %impl.elem0.loc14_21: %.81e = impl_witness_access constants.%ImplicitAs.impl_witness.6bf, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.b09]
  701. // CHECK:STDOUT: %bound_method.loc14_21.1: <bound method> = bound_method %N.ref, %impl.elem0.loc14_21 [symbolic = %Int.as.ImplicitAs.impl.Convert.bound (constants.%Int.as.ImplicitAs.impl.Convert.bound)]
  702. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc14_21, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
  703. // CHECK:STDOUT: %bound_method.loc14_21.2: <bound method> = bound_method %N.ref, %specific_fn [symbolic = %bound_method.loc14_21.3 (constants.%bound_method)]
  704. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call.loc14_21.1: init Core.IntLiteral = call %bound_method.loc14_21.2(%N.ref) [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_21.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
  705. // CHECK:STDOUT: %.loc14_21.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call.loc14_21.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_21.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
  706. // CHECK:STDOUT: %.loc14_21.2: Core.IntLiteral = converted %N.ref, %.loc14_21.1 [symbolic = %Int.as.ImplicitAs.impl.Convert.call.loc14_21.2 (constants.%Int.as.ImplicitAs.impl.Convert.call)]
  707. // CHECK:STDOUT: %array_type.loc14_22.1: type = array_type %.loc14_21.2, %i32.loc14 [symbolic = %array_type.loc14_22.2 (constants.%array_type.120)]
  708. // CHECK:STDOUT: }
  709. // CHECK:STDOUT: %k: ref @G.%array_type.loc14_22.2 (%array_type.120) = bind_name k, %k.var
  710. // CHECK:STDOUT: %facet_value.loc14_3.1: %type_where = facet_value constants.%array_type.120, () [symbolic = %facet_value.loc14_3.2 (constants.%facet_value.8b7)]
  711. // CHECK:STDOUT: %.loc14_3.1: %type_where = converted constants.%array_type.120, %facet_value.loc14_3.1 [symbolic = %facet_value.loc14_3.2 (constants.%facet_value.8b7)]
  712. // CHECK:STDOUT: %impl.elem0.loc14_3.1: @G.%.loc14_3.3 (%.83d) = impl_witness_access constants.%Destroy.lookup_impl_witness.919, element0 [symbolic = %impl.elem0.loc14_3.2 (constants.%impl.elem0.8b9)]
  713. // CHECK:STDOUT: %bound_method.loc14_3.1: <bound method> = bound_method %k.var, %impl.elem0.loc14_3.1
  714. // CHECK:STDOUT: %specific_impl_fn.loc14_3.1: <specific function> = specific_impl_function %impl.elem0.loc14_3.1, @Destroy.Op(constants.%Destroy.facet.69e) [symbolic = %specific_impl_fn.loc14_3.2 (constants.%specific_impl_fn.0a7)]
  715. // CHECK:STDOUT: %bound_method.loc14_3.2: <bound method> = bound_method %k.var, %specific_impl_fn.loc14_3.1
  716. // CHECK:STDOUT: %addr: @G.%ptr (%ptr.743) = addr_of %k.var
  717. // CHECK:STDOUT: %.loc14_3.2: init %empty_tuple.type = call %bound_method.loc14_3.2(%addr)
  718. // CHECK:STDOUT: <elided>
  719. // CHECK:STDOUT: }
  720. // CHECK:STDOUT: }
  721. // CHECK:STDOUT:
  722. // CHECK:STDOUT: specific @F(constants.%T) {
  723. // CHECK:STDOUT: %T.loc4_6.1 => constants.%T
  724. // CHECK:STDOUT: }
  725. // CHECK:STDOUT:
  726. // CHECK:STDOUT: specific @G(constants.%N.51e) {
  727. // CHECK:STDOUT: %N.loc12_6.1 => constants.%N.51e
  728. // CHECK:STDOUT: }
  729. // CHECK:STDOUT: