call_from_operator.carbon 88 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120
  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/none.carbon
  6. // TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
  7. // EXTRA-ARGS: --dump-sem-ir-ranges=if-present
  8. //
  9. // AUTOUPDATE
  10. // TIP: To test this file alone, run:
  11. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/builtin/call_from_operator.carbon
  12. // TIP: To dump output, run:
  13. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/builtin/call_from_operator.carbon
  14. // --- core.carbon
  15. package Core;
  16. fn IntLiteral() -> type = "int_literal.make_type";
  17. fn Int(N: IntLiteral()) -> type = "int.make_type_signed";
  18. interface AddWith(T:! type) {
  19. fn Op[self: Self](other: Self) -> Self;
  20. }
  21. interface As(T:! type) {
  22. fn Convert[self: Self]() -> T;
  23. }
  24. interface ImplicitAs(T:! type) {
  25. fn Convert[self: Self]() -> T;
  26. }
  27. impl i32 as AddWith(i32) {
  28. fn Op[self: Self](other: Self) -> Self = "int.sadd";
  29. }
  30. impl IntLiteral() as As(i32) {
  31. fn Convert[self: Self]() -> i32 = "int.convert_checked";
  32. }
  33. impl IntLiteral() as ImplicitAs(i32) {
  34. fn Convert[self: Self]() -> i32 = "int.convert_checked";
  35. }
  36. impl i32 as ImplicitAs(IntLiteral()) {
  37. fn Convert[self: Self]() -> IntLiteral() = "int.convert_checked";
  38. }
  39. // --- user.carbon
  40. import Core;
  41. var arr: array(i32, (1 as i32) + (2 as i32)) = (3, 4, (3 as i32) + (4 as i32));
  42. // CHECK:STDOUT: --- core.carbon
  43. // CHECK:STDOUT:
  44. // CHECK:STDOUT: constants {
  45. // CHECK:STDOUT: %pattern_type.98f: type = pattern_type type [concrete]
  46. // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [concrete]
  47. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [concrete]
  48. // CHECK:STDOUT: %pattern_type.dc0: type = pattern_type Core.IntLiteral [concrete]
  49. // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete]
  50. // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete]
  51. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  52. // CHECK:STDOUT: %AddWith.type.b35: type = generic_interface_type @AddWith [concrete]
  53. // CHECK:STDOUT: %AddWith.generic: %AddWith.type.b35 = struct_value () [concrete]
  54. // CHECK:STDOUT: %AddWith.type.bc7: type = facet_type <@AddWith, @AddWith(%T)> [symbolic]
  55. // CHECK:STDOUT: %Self.deb: %AddWith.type.bc7 = bind_symbolic_name Self, 1 [symbolic]
  56. // CHECK:STDOUT: %Self.as_type.6cc: type = facet_access_type %Self.deb [symbolic]
  57. // CHECK:STDOUT: %pattern_type.4a8: type = pattern_type %Self.as_type.6cc [symbolic]
  58. // CHECK:STDOUT: %Op.type.5b7: type = fn_type @Op.loc8, @AddWith(%T) [symbolic]
  59. // CHECK:STDOUT: %Op.037: %Op.type.5b7 = struct_value () [symbolic]
  60. // CHECK:STDOUT: %AddWith.assoc_type.36e: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic]
  61. // CHECK:STDOUT: %assoc0.adf: %AddWith.assoc_type.36e = assoc_entity element0, @AddWith.%Op.decl [symbolic]
  62. // CHECK:STDOUT: %As.type.b51: type = generic_interface_type @As [concrete]
  63. // CHECK:STDOUT: %As.generic: %As.type.b51 = struct_value () [concrete]
  64. // CHECK:STDOUT: %As.type.8ba: type = facet_type <@As, @As(%T)> [symbolic]
  65. // CHECK:STDOUT: %Self.b4e: %As.type.8ba = bind_symbolic_name Self, 1 [symbolic]
  66. // CHECK:STDOUT: %Self.as_type.7f0: type = facet_access_type %Self.b4e [symbolic]
  67. // CHECK:STDOUT: %pattern_type.947: type = pattern_type %Self.as_type.7f0 [symbolic]
  68. // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
  69. // CHECK:STDOUT: %Convert.type.ad1: type = fn_type @Convert.loc12, @As(%T) [symbolic]
  70. // CHECK:STDOUT: %Convert.0ed: %Convert.type.ad1 = struct_value () [symbolic]
  71. // CHECK:STDOUT: %As.assoc_type.a21: type = assoc_entity_type @As, @As(%T) [symbolic]
  72. // CHECK:STDOUT: %assoc0.1d5: %As.assoc_type.a21 = assoc_entity element0, @As.%Convert.decl [symbolic]
  73. // CHECK:STDOUT: %ImplicitAs.type.96f: type = generic_interface_type @ImplicitAs [concrete]
  74. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.96f = struct_value () [concrete]
  75. // CHECK:STDOUT: %ImplicitAs.type.07f: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic]
  76. // CHECK:STDOUT: %Self.0f3: %ImplicitAs.type.07f = bind_symbolic_name Self, 1 [symbolic]
  77. // CHECK:STDOUT: %Self.as_type.419: type = facet_access_type %Self.0f3 [symbolic]
  78. // CHECK:STDOUT: %pattern_type.a93: type = pattern_type %Self.as_type.419 [symbolic]
  79. // CHECK:STDOUT: %Convert.type.4cf: type = fn_type @Convert.loc16, @ImplicitAs(%T) [symbolic]
  80. // CHECK:STDOUT: %Convert.147: %Convert.type.4cf = struct_value () [symbolic]
  81. // CHECK:STDOUT: %ImplicitAs.assoc_type.095: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic]
  82. // CHECK:STDOUT: %assoc0.8f8: %ImplicitAs.assoc_type.095 = assoc_entity element0, @ImplicitAs.%Convert.decl [symbolic]
  83. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  84. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  85. // CHECK:STDOUT: %AddWith.type.49d: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete]
  86. // CHECK:STDOUT: %Self.da9: %AddWith.type.49d = bind_symbolic_name Self, 1 [symbolic]
  87. // CHECK:STDOUT: %Op.type.efc: type = fn_type @Op.loc8, @AddWith(%i32.builtin) [concrete]
  88. // CHECK:STDOUT: %Op.a62: %Op.type.efc = struct_value () [concrete]
  89. // CHECK:STDOUT: %AddWith.assoc_type.a65: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete]
  90. // CHECK:STDOUT: %assoc0.ee2: %AddWith.assoc_type.a65 = assoc_entity element0, @AddWith.%Op.decl [concrete]
  91. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness file.%AddWith.impl_witness_table [concrete]
  92. // CHECK:STDOUT: %pattern_type.956: type = pattern_type %i32.builtin [concrete]
  93. // CHECK:STDOUT: %Op.type.e57: type = fn_type @Op.loc20 [concrete]
  94. // CHECK:STDOUT: %Op.c8a: %Op.type.e57 = struct_value () [concrete]
  95. // CHECK:STDOUT: %AddWith.facet: %AddWith.type.49d = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete]
  96. // CHECK:STDOUT: %As.type.a09: type = facet_type <@As, @As(%i32.builtin)> [concrete]
  97. // CHECK:STDOUT: %Self.2fa: %As.type.a09 = bind_symbolic_name Self, 1 [symbolic]
  98. // CHECK:STDOUT: %Convert.type.c0d: type = fn_type @Convert.loc12, @As(%i32.builtin) [concrete]
  99. // CHECK:STDOUT: %Convert.713: %Convert.type.c0d = struct_value () [concrete]
  100. // CHECK:STDOUT: %As.assoc_type.b9b: type = assoc_entity_type @As, @As(%i32.builtin) [concrete]
  101. // CHECK:STDOUT: %assoc0.b02: %As.assoc_type.b9b = assoc_entity element0, @As.%Convert.decl [concrete]
  102. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness file.%As.impl_witness_table [concrete]
  103. // CHECK:STDOUT: %Convert.type.fc9: type = fn_type @Convert.loc24 [concrete]
  104. // CHECK:STDOUT: %Convert.33c: %Convert.type.fc9 = struct_value () [concrete]
  105. // CHECK:STDOUT: %As.facet: %As.type.a09 = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
  106. // CHECK:STDOUT: %ImplicitAs.type.11a: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete]
  107. // CHECK:STDOUT: %Self.e0a: %ImplicitAs.type.11a = bind_symbolic_name Self, 1 [symbolic]
  108. // CHECK:STDOUT: %Convert.type.752: type = fn_type @Convert.loc16, @ImplicitAs(%i32.builtin) [concrete]
  109. // CHECK:STDOUT: %Convert.fcc: %Convert.type.752 = struct_value () [concrete]
  110. // CHECK:STDOUT: %ImplicitAs.assoc_type.1cf: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete]
  111. // CHECK:STDOUT: %assoc0.3ce: %ImplicitAs.assoc_type.1cf = assoc_entity element0, @ImplicitAs.%Convert.decl [concrete]
  112. // CHECK:STDOUT: %ImplicitAs.impl_witness.be0: <witness> = impl_witness file.%ImplicitAs.impl_witness_table.loc27 [concrete]
  113. // CHECK:STDOUT: %Convert.type.c2a: type = fn_type @Convert.loc28 [concrete]
  114. // CHECK:STDOUT: %Convert.40d: %Convert.type.c2a = struct_value () [concrete]
  115. // CHECK:STDOUT: %ImplicitAs.facet.bcb: %ImplicitAs.type.11a = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.be0) [concrete]
  116. // CHECK:STDOUT: %ImplicitAs.type.9fc: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  117. // CHECK:STDOUT: %Self.37e: %ImplicitAs.type.9fc = bind_symbolic_name Self, 1 [symbolic]
  118. // CHECK:STDOUT: %Convert.type.60e: type = fn_type @Convert.loc16, @ImplicitAs(Core.IntLiteral) [concrete]
  119. // CHECK:STDOUT: %Convert.c73: %Convert.type.60e = struct_value () [concrete]
  120. // CHECK:STDOUT: %ImplicitAs.assoc_type.014: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete]
  121. // CHECK:STDOUT: %assoc0.757: %ImplicitAs.assoc_type.014 = assoc_entity element0, @ImplicitAs.%Convert.decl [concrete]
  122. // CHECK:STDOUT: %ImplicitAs.impl_witness.95b: <witness> = impl_witness file.%ImplicitAs.impl_witness_table.loc31 [concrete]
  123. // CHECK:STDOUT: %Convert.type.295: type = fn_type @Convert.loc32 [concrete]
  124. // CHECK:STDOUT: %Convert.2bf: %Convert.type.295 = struct_value () [concrete]
  125. // CHECK:STDOUT: %ImplicitAs.facet.a85: %ImplicitAs.type.9fc = facet_value %i32.builtin, (%ImplicitAs.impl_witness.95b) [concrete]
  126. // CHECK:STDOUT: }
  127. // CHECK:STDOUT:
  128. // CHECK:STDOUT: file {
  129. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  130. // CHECK:STDOUT: .IntLiteral = %IntLiteral.decl
  131. // CHECK:STDOUT: .Int = %Int.decl
  132. // CHECK:STDOUT: .AddWith = %AddWith.decl
  133. // CHECK:STDOUT: .As = %As.decl
  134. // CHECK:STDOUT: .ImplicitAs = %ImplicitAs.decl
  135. // CHECK:STDOUT: }
  136. // CHECK:STDOUT: %IntLiteral.decl: %IntLiteral.type = fn_decl @IntLiteral [concrete = constants.%IntLiteral] {
  137. // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
  138. // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param0 [concrete]
  139. // CHECK:STDOUT: } {
  140. // CHECK:STDOUT: %return.param: ref type = out_param call_param0
  141. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  142. // CHECK:STDOUT: }
  143. // CHECK:STDOUT: %Int.decl: %Int.type = fn_decl @Int [concrete = constants.%Int] {
  144. // CHECK:STDOUT: %N.patt: %pattern_type.dc0 = binding_pattern N [concrete]
  145. // CHECK:STDOUT: %N.param_patt: %pattern_type.dc0 = value_param_pattern %N.patt, call_param0 [concrete]
  146. // CHECK:STDOUT: %return.patt: %pattern_type.98f = return_slot_pattern [concrete]
  147. // CHECK:STDOUT: %return.param_patt: %pattern_type.98f = out_param_pattern %return.patt, call_param1 [concrete]
  148. // CHECK:STDOUT: } {
  149. // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param call_param0
  150. // CHECK:STDOUT: %.loc5_22.1: type = splice_block %.loc5_22.3 [concrete = Core.IntLiteral] {
  151. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  152. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  153. // CHECK:STDOUT: %.loc5_22.2: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  154. // CHECK:STDOUT: %.loc5_22.3: type = converted %int_literal.make_type, %.loc5_22.2 [concrete = Core.IntLiteral]
  155. // CHECK:STDOUT: }
  156. // CHECK:STDOUT: %N: Core.IntLiteral = bind_name N, %N.param
  157. // CHECK:STDOUT: %return.param: ref type = out_param call_param1
  158. // CHECK:STDOUT: %return: ref type = return_slot %return.param
  159. // CHECK:STDOUT: }
  160. // CHECK:STDOUT: %AddWith.decl: %AddWith.type.b35 = interface_decl @AddWith [concrete = constants.%AddWith.generic] {
  161. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  162. // CHECK:STDOUT: } {
  163. // CHECK:STDOUT: %T.loc7_19.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_19.2 (constants.%T)]
  164. // CHECK:STDOUT: }
  165. // CHECK:STDOUT: %As.decl: %As.type.b51 = interface_decl @As [concrete = constants.%As.generic] {
  166. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  167. // CHECK:STDOUT: } {
  168. // CHECK:STDOUT: %T.loc11_14.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
  169. // CHECK:STDOUT: }
  170. // CHECK:STDOUT: %ImplicitAs.decl: %ImplicitAs.type.96f = interface_decl @ImplicitAs [concrete = constants.%ImplicitAs.generic] {
  171. // CHECK:STDOUT: %T.patt: %pattern_type.98f = symbolic_binding_pattern T, 0 [concrete]
  172. // CHECK:STDOUT: } {
  173. // CHECK:STDOUT: %T.loc15_22.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.2 (constants.%T)]
  174. // CHECK:STDOUT: }
  175. // CHECK:STDOUT: impl_decl @AddWith.impl [concrete] {} {
  176. // CHECK:STDOUT: %int_32.loc19_6: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  177. // CHECK:STDOUT: %int.make_type_signed.loc19_6: init type = call constants.%Int(%int_32.loc19_6) [concrete = constants.%i32.builtin]
  178. // CHECK:STDOUT: %.loc19_6.1: type = value_of_initializer %int.make_type_signed.loc19_6 [concrete = constants.%i32.builtin]
  179. // CHECK:STDOUT: %.loc19_6.2: type = converted %int.make_type_signed.loc19_6, %.loc19_6.1 [concrete = constants.%i32.builtin]
  180. // CHECK:STDOUT: %AddWith.ref: %AddWith.type.b35 = name_ref AddWith, file.%AddWith.decl [concrete = constants.%AddWith.generic]
  181. // CHECK:STDOUT: %int_32.loc19_21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  182. // CHECK:STDOUT: %int.make_type_signed.loc19_21: init type = call constants.%Int(%int_32.loc19_21) [concrete = constants.%i32.builtin]
  183. // CHECK:STDOUT: %.loc19_24.1: type = value_of_initializer %int.make_type_signed.loc19_21 [concrete = constants.%i32.builtin]
  184. // CHECK:STDOUT: %.loc19_24.2: type = converted %int.make_type_signed.loc19_21, %.loc19_24.1 [concrete = constants.%i32.builtin]
  185. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(constants.%i32.builtin)> [concrete = constants.%AddWith.type.49d]
  186. // CHECK:STDOUT: }
  187. // CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (@AddWith.impl.%Op.decl), @AddWith.impl [concrete]
  188. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness %AddWith.impl_witness_table [concrete = constants.%AddWith.impl_witness]
  189. // CHECK:STDOUT: impl_decl @As.impl [concrete] {} {
  190. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  191. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  192. // CHECK:STDOUT: %.loc23_17.1: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  193. // CHECK:STDOUT: %.loc23_17.2: type = converted %int_literal.make_type, %.loc23_17.1 [concrete = Core.IntLiteral]
  194. // CHECK:STDOUT: %As.ref: %As.type.b51 = name_ref As, file.%As.decl [concrete = constants.%As.generic]
  195. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  196. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  197. // CHECK:STDOUT: %.loc23_28.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  198. // CHECK:STDOUT: %.loc23_28.2: type = converted %int.make_type_signed, %.loc23_28.1 [concrete = constants.%i32.builtin]
  199. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(constants.%i32.builtin)> [concrete = constants.%As.type.a09]
  200. // CHECK:STDOUT: }
  201. // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (@As.impl.%Convert.decl), @As.impl [concrete]
  202. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness %As.impl_witness_table [concrete = constants.%As.impl_witness]
  203. // CHECK:STDOUT: impl_decl @ImplicitAs.impl.e13 [concrete] {} {
  204. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  205. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  206. // CHECK:STDOUT: %.loc27_17.1: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  207. // CHECK:STDOUT: %.loc27_17.2: type = converted %int_literal.make_type, %.loc27_17.1 [concrete = Core.IntLiteral]
  208. // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.96f = name_ref ImplicitAs, file.%ImplicitAs.decl [concrete = constants.%ImplicitAs.generic]
  209. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  210. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  211. // CHECK:STDOUT: %.loc27_36.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  212. // CHECK:STDOUT: %.loc27_36.2: type = converted %int.make_type_signed, %.loc27_36.1 [concrete = constants.%i32.builtin]
  213. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(constants.%i32.builtin)> [concrete = constants.%ImplicitAs.type.11a]
  214. // CHECK:STDOUT: }
  215. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc27 = impl_witness_table (@ImplicitAs.impl.e13.%Convert.decl), @ImplicitAs.impl.e13 [concrete]
  216. // CHECK:STDOUT: %ImplicitAs.impl_witness.loc27: <witness> = impl_witness %ImplicitAs.impl_witness_table.loc27 [concrete = constants.%ImplicitAs.impl_witness.be0]
  217. // CHECK:STDOUT: impl_decl @ImplicitAs.impl.3df [concrete] {} {
  218. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  219. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  220. // CHECK:STDOUT: %.loc31_6.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  221. // CHECK:STDOUT: %.loc31_6.2: type = converted %int.make_type_signed, %.loc31_6.1 [concrete = constants.%i32.builtin]
  222. // CHECK:STDOUT: %ImplicitAs.ref: %ImplicitAs.type.96f = name_ref ImplicitAs, file.%ImplicitAs.decl [concrete = constants.%ImplicitAs.generic]
  223. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  224. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  225. // CHECK:STDOUT: %.loc31_36.1: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  226. // CHECK:STDOUT: %.loc31_36.2: type = converted %int_literal.make_type, %.loc31_36.1 [concrete = Core.IntLiteral]
  227. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete = constants.%ImplicitAs.type.9fc]
  228. // CHECK:STDOUT: }
  229. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.loc31 = impl_witness_table (@ImplicitAs.impl.3df.%Convert.decl), @ImplicitAs.impl.3df [concrete]
  230. // CHECK:STDOUT: %ImplicitAs.impl_witness.loc31: <witness> = impl_witness %ImplicitAs.impl_witness_table.loc31 [concrete = constants.%ImplicitAs.impl_witness.95b]
  231. // CHECK:STDOUT: }
  232. // CHECK:STDOUT:
  233. // CHECK:STDOUT: generic interface @AddWith(%T.loc7_19.1: type) {
  234. // CHECK:STDOUT: %T.loc7_19.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc7_19.2 (constants.%T)]
  235. // CHECK:STDOUT:
  236. // CHECK:STDOUT: !definition:
  237. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T.loc7_19.2)> [symbolic = %AddWith.type (constants.%AddWith.type.bc7)]
  238. // CHECK:STDOUT: %Self.2: @AddWith.%AddWith.type (%AddWith.type.bc7) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.deb)]
  239. // CHECK:STDOUT: %Op.type: type = fn_type @Op.loc8, @AddWith(%T.loc7_19.2) [symbolic = %Op.type (constants.%Op.type.5b7)]
  240. // CHECK:STDOUT: %Op: @AddWith.%Op.type (%Op.type.5b7) = struct_value () [symbolic = %Op (constants.%Op.037)]
  241. // CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T.loc7_19.2) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type.36e)]
  242. // CHECK:STDOUT: %assoc0.loc8_41.2: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.36e) = assoc_entity element0, %Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.adf)]
  243. // CHECK:STDOUT:
  244. // CHECK:STDOUT: interface {
  245. // CHECK:STDOUT: %Self.1: @AddWith.%AddWith.type (%AddWith.type.bc7) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.deb)]
  246. // CHECK:STDOUT: %Op.decl: @AddWith.%Op.type (%Op.type.5b7) = fn_decl @Op.loc8 [symbolic = @AddWith.%Op (constants.%Op.037)] {
  247. // CHECK:STDOUT: %self.patt: @Op.loc8.%pattern_type (%pattern_type.4a8) = binding_pattern self [concrete]
  248. // CHECK:STDOUT: %self.param_patt: @Op.loc8.%pattern_type (%pattern_type.4a8) = value_param_pattern %self.patt, call_param0 [concrete]
  249. // CHECK:STDOUT: %other.patt: @Op.loc8.%pattern_type (%pattern_type.4a8) = binding_pattern other [concrete]
  250. // CHECK:STDOUT: %other.param_patt: @Op.loc8.%pattern_type (%pattern_type.4a8) = value_param_pattern %other.patt, call_param1 [concrete]
  251. // CHECK:STDOUT: %return.patt: @Op.loc8.%pattern_type (%pattern_type.4a8) = return_slot_pattern [concrete]
  252. // CHECK:STDOUT: %return.param_patt: @Op.loc8.%pattern_type (%pattern_type.4a8) = out_param_pattern %return.patt, call_param2 [concrete]
  253. // CHECK:STDOUT: } {
  254. // CHECK:STDOUT: %.loc8_37.1: @Op.loc8.%AddWith.type (%AddWith.type.bc7) = specific_constant @AddWith.%Self.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.deb)]
  255. // CHECK:STDOUT: %Self.ref.loc8_37: @Op.loc8.%AddWith.type (%AddWith.type.bc7) = name_ref Self, %.loc8_37.1 [symbolic = %Self (constants.%Self.deb)]
  256. // CHECK:STDOUT: %Self.as_type.loc8_37: type = facet_access_type %Self.ref.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  257. // CHECK:STDOUT: %.loc8_37.2: type = converted %Self.ref.loc8_37, %Self.as_type.loc8_37 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  258. // CHECK:STDOUT: %self.param: @Op.loc8.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = value_param call_param0
  259. // CHECK:STDOUT: %.loc8_15.1: type = splice_block %.loc8_15.3 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] {
  260. // CHECK:STDOUT: %.loc8_15.2: @Op.loc8.%AddWith.type (%AddWith.type.bc7) = specific_constant @AddWith.%Self.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.deb)]
  261. // CHECK:STDOUT: %Self.ref.loc8_15: @Op.loc8.%AddWith.type (%AddWith.type.bc7) = name_ref Self, %.loc8_15.2 [symbolic = %Self (constants.%Self.deb)]
  262. // CHECK:STDOUT: %Self.as_type.loc8_15.2: type = facet_access_type %Self.ref.loc8_15 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  263. // CHECK:STDOUT: %.loc8_15.3: type = converted %Self.ref.loc8_15, %Self.as_type.loc8_15.2 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  264. // CHECK:STDOUT: }
  265. // CHECK:STDOUT: %self: @Op.loc8.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = bind_name self, %self.param
  266. // CHECK:STDOUT: %other.param: @Op.loc8.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = value_param call_param1
  267. // CHECK:STDOUT: %.loc8_28.1: type = splice_block %.loc8_28.3 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)] {
  268. // CHECK:STDOUT: %.loc8_28.2: @Op.loc8.%AddWith.type (%AddWith.type.bc7) = specific_constant @AddWith.%Self.1, @AddWith(constants.%T) [symbolic = %Self (constants.%Self.deb)]
  269. // CHECK:STDOUT: %Self.ref.loc8_28: @Op.loc8.%AddWith.type (%AddWith.type.bc7) = name_ref Self, %.loc8_28.2 [symbolic = %Self (constants.%Self.deb)]
  270. // CHECK:STDOUT: %Self.as_type.loc8_28: type = facet_access_type %Self.ref.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  271. // CHECK:STDOUT: %.loc8_28.3: type = converted %Self.ref.loc8_28, %Self.as_type.loc8_28 [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  272. // CHECK:STDOUT: }
  273. // CHECK:STDOUT: %other: @Op.loc8.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = bind_name other, %other.param
  274. // CHECK:STDOUT: %return.param: ref @Op.loc8.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = out_param call_param2
  275. // CHECK:STDOUT: %return: ref @Op.loc8.%Self.as_type.loc8_15.1 (%Self.as_type.6cc) = return_slot %return.param
  276. // CHECK:STDOUT: }
  277. // CHECK:STDOUT: %assoc0.loc8_41.1: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.36e) = assoc_entity element0, %Op.decl [symbolic = %assoc0.loc8_41.2 (constants.%assoc0.adf)]
  278. // CHECK:STDOUT:
  279. // CHECK:STDOUT: !members:
  280. // CHECK:STDOUT: .Self = %Self.1
  281. // CHECK:STDOUT: .Op = %assoc0.loc8_41.1
  282. // CHECK:STDOUT: witness = (%Op.decl)
  283. // CHECK:STDOUT: }
  284. // CHECK:STDOUT: }
  285. // CHECK:STDOUT:
  286. // CHECK:STDOUT: generic interface @As(%T.loc11_14.1: type) {
  287. // CHECK:STDOUT: %T.loc11_14.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc11_14.2 (constants.%T)]
  288. // CHECK:STDOUT:
  289. // CHECK:STDOUT: !definition:
  290. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T.loc11_14.2)> [symbolic = %As.type (constants.%As.type.8ba)]
  291. // CHECK:STDOUT: %Self.2: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
  292. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.loc12, @As(%T.loc11_14.2) [symbolic = %Convert.type (constants.%Convert.type.ad1)]
  293. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.ad1) = struct_value () [symbolic = %Convert (constants.%Convert.0ed)]
  294. // CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%T.loc11_14.2) [symbolic = %As.assoc_type (constants.%As.assoc_type.a21)]
  295. // CHECK:STDOUT: %assoc0.loc12_32.2: @As.%As.assoc_type (%As.assoc_type.a21) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.1d5)]
  296. // CHECK:STDOUT:
  297. // CHECK:STDOUT: interface {
  298. // CHECK:STDOUT: %Self.1: @As.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.b4e)]
  299. // CHECK:STDOUT: %Convert.decl: @As.%Convert.type (%Convert.type.ad1) = fn_decl @Convert.loc12 [symbolic = @As.%Convert (constants.%Convert.0ed)] {
  300. // CHECK:STDOUT: %self.patt: @Convert.loc12.%pattern_type.loc12_14 (%pattern_type.947) = binding_pattern self [concrete]
  301. // CHECK:STDOUT: %self.param_patt: @Convert.loc12.%pattern_type.loc12_14 (%pattern_type.947) = value_param_pattern %self.patt, call_param0 [concrete]
  302. // CHECK:STDOUT: %return.patt: @Convert.loc12.%pattern_type.loc12_28 (%pattern_type.7dc) = return_slot_pattern [concrete]
  303. // CHECK:STDOUT: %return.param_patt: @Convert.loc12.%pattern_type.loc12_28 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete]
  304. // CHECK:STDOUT: } {
  305. // CHECK:STDOUT: %T.ref: type = name_ref T, @As.%T.loc11_14.1 [symbolic = %T (constants.%T)]
  306. // CHECK:STDOUT: %self.param: @Convert.loc12.%Self.as_type.loc12_20.1 (%Self.as_type.7f0) = value_param call_param0
  307. // CHECK:STDOUT: %.loc12_20.1: type = splice_block %.loc12_20.3 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.7f0)] {
  308. // CHECK:STDOUT: %.loc12_20.2: @Convert.loc12.%As.type (%As.type.8ba) = specific_constant @As.%Self.1, @As(constants.%T) [symbolic = %Self (constants.%Self.b4e)]
  309. // CHECK:STDOUT: %Self.ref: @Convert.loc12.%As.type (%As.type.8ba) = name_ref Self, %.loc12_20.2 [symbolic = %Self (constants.%Self.b4e)]
  310. // CHECK:STDOUT: %Self.as_type.loc12_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.7f0)]
  311. // CHECK:STDOUT: %.loc12_20.3: type = converted %Self.ref, %Self.as_type.loc12_20.2 [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.7f0)]
  312. // CHECK:STDOUT: }
  313. // CHECK:STDOUT: %self: @Convert.loc12.%Self.as_type.loc12_20.1 (%Self.as_type.7f0) = bind_name self, %self.param
  314. // CHECK:STDOUT: %return.param: ref @Convert.loc12.%T (%T) = out_param call_param1
  315. // CHECK:STDOUT: %return: ref @Convert.loc12.%T (%T) = return_slot %return.param
  316. // CHECK:STDOUT: }
  317. // CHECK:STDOUT: %assoc0.loc12_32.1: @As.%As.assoc_type (%As.assoc_type.a21) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc12_32.2 (constants.%assoc0.1d5)]
  318. // CHECK:STDOUT:
  319. // CHECK:STDOUT: !members:
  320. // CHECK:STDOUT: .Self = %Self.1
  321. // CHECK:STDOUT: .T = <poisoned>
  322. // CHECK:STDOUT: .Convert = %assoc0.loc12_32.1
  323. // CHECK:STDOUT: witness = (%Convert.decl)
  324. // CHECK:STDOUT: }
  325. // CHECK:STDOUT: }
  326. // CHECK:STDOUT:
  327. // CHECK:STDOUT: generic interface @ImplicitAs(%T.loc15_22.1: type) {
  328. // CHECK:STDOUT: %T.loc15_22.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc15_22.2 (constants.%T)]
  329. // CHECK:STDOUT:
  330. // CHECK:STDOUT: !definition:
  331. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T.loc15_22.2)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  332. // CHECK:STDOUT: %Self.2: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
  333. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.loc16, @ImplicitAs(%T.loc15_22.2) [symbolic = %Convert.type (constants.%Convert.type.4cf)]
  334. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.4cf) = struct_value () [symbolic = %Convert (constants.%Convert.147)]
  335. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T.loc15_22.2) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.095)]
  336. // CHECK:STDOUT: %assoc0.loc16_32.2: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.095) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.8f8)]
  337. // CHECK:STDOUT:
  338. // CHECK:STDOUT: interface {
  339. // CHECK:STDOUT: %Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self.2 (constants.%Self.0f3)]
  340. // CHECK:STDOUT: %Convert.decl: @ImplicitAs.%Convert.type (%Convert.type.4cf) = fn_decl @Convert.loc16 [symbolic = @ImplicitAs.%Convert (constants.%Convert.147)] {
  341. // CHECK:STDOUT: %self.patt: @Convert.loc16.%pattern_type.loc16_14 (%pattern_type.a93) = binding_pattern self [concrete]
  342. // CHECK:STDOUT: %self.param_patt: @Convert.loc16.%pattern_type.loc16_14 (%pattern_type.a93) = value_param_pattern %self.patt, call_param0 [concrete]
  343. // CHECK:STDOUT: %return.patt: @Convert.loc16.%pattern_type.loc16_28 (%pattern_type.7dc) = return_slot_pattern [concrete]
  344. // CHECK:STDOUT: %return.param_patt: @Convert.loc16.%pattern_type.loc16_28 (%pattern_type.7dc) = out_param_pattern %return.patt, call_param1 [concrete]
  345. // CHECK:STDOUT: } {
  346. // CHECK:STDOUT: %T.ref: type = name_ref T, @ImplicitAs.%T.loc15_22.1 [symbolic = %T (constants.%T)]
  347. // CHECK:STDOUT: %self.param: @Convert.loc16.%Self.as_type.loc16_20.1 (%Self.as_type.419) = value_param call_param0
  348. // CHECK:STDOUT: %.loc16_20.1: type = splice_block %.loc16_20.3 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.419)] {
  349. // CHECK:STDOUT: %.loc16_20.2: @Convert.loc16.%ImplicitAs.type (%ImplicitAs.type.07f) = specific_constant @ImplicitAs.%Self.1, @ImplicitAs(constants.%T) [symbolic = %Self (constants.%Self.0f3)]
  350. // CHECK:STDOUT: %Self.ref: @Convert.loc16.%ImplicitAs.type (%ImplicitAs.type.07f) = name_ref Self, %.loc16_20.2 [symbolic = %Self (constants.%Self.0f3)]
  351. // CHECK:STDOUT: %Self.as_type.loc16_20.2: type = facet_access_type %Self.ref [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.419)]
  352. // CHECK:STDOUT: %.loc16_20.3: type = converted %Self.ref, %Self.as_type.loc16_20.2 [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.419)]
  353. // CHECK:STDOUT: }
  354. // CHECK:STDOUT: %self: @Convert.loc16.%Self.as_type.loc16_20.1 (%Self.as_type.419) = bind_name self, %self.param
  355. // CHECK:STDOUT: %return.param: ref @Convert.loc16.%T (%T) = out_param call_param1
  356. // CHECK:STDOUT: %return: ref @Convert.loc16.%T (%T) = return_slot %return.param
  357. // CHECK:STDOUT: }
  358. // CHECK:STDOUT: %assoc0.loc16_32.1: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.095) = assoc_entity element0, %Convert.decl [symbolic = %assoc0.loc16_32.2 (constants.%assoc0.8f8)]
  359. // CHECK:STDOUT:
  360. // CHECK:STDOUT: !members:
  361. // CHECK:STDOUT: .Self = %Self.1
  362. // CHECK:STDOUT: .T = <poisoned>
  363. // CHECK:STDOUT: .Convert = %assoc0.loc16_32.1
  364. // CHECK:STDOUT: witness = (%Convert.decl)
  365. // CHECK:STDOUT: }
  366. // CHECK:STDOUT: }
  367. // CHECK:STDOUT:
  368. // CHECK:STDOUT: impl @AddWith.impl: %.loc19_6.2 as %AddWith.type {
  369. // CHECK:STDOUT: %Op.decl: %Op.type.e57 = fn_decl @Op.loc20 [concrete = constants.%Op.c8a] {
  370. // CHECK:STDOUT: %self.patt: %pattern_type.956 = binding_pattern self [concrete]
  371. // CHECK:STDOUT: %self.param_patt: %pattern_type.956 = value_param_pattern %self.patt, call_param0 [concrete]
  372. // CHECK:STDOUT: %other.patt: %pattern_type.956 = binding_pattern other [concrete]
  373. // CHECK:STDOUT: %other.param_patt: %pattern_type.956 = value_param_pattern %other.patt, call_param1 [concrete]
  374. // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete]
  375. // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt, call_param2 [concrete]
  376. // CHECK:STDOUT: } {
  377. // CHECK:STDOUT: %Self.ref.loc20_37: type = name_ref Self, @AddWith.impl.%.loc19_6.2 [concrete = constants.%i32.builtin]
  378. // CHECK:STDOUT: %self.param: %i32.builtin = value_param call_param0
  379. // CHECK:STDOUT: %Self.ref.loc20_15: type = name_ref Self, @AddWith.impl.%.loc19_6.2 [concrete = constants.%i32.builtin]
  380. // CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param
  381. // CHECK:STDOUT: %other.param: %i32.builtin = value_param call_param1
  382. // CHECK:STDOUT: %Self.ref.loc20_28: type = name_ref Self, @AddWith.impl.%.loc19_6.2 [concrete = constants.%i32.builtin]
  383. // CHECK:STDOUT: %other: %i32.builtin = bind_name other, %other.param
  384. // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param2
  385. // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
  386. // CHECK:STDOUT: }
  387. // CHECK:STDOUT:
  388. // CHECK:STDOUT: !members:
  389. // CHECK:STDOUT: .Op = %Op.decl
  390. // CHECK:STDOUT: witness = file.%AddWith.impl_witness
  391. // CHECK:STDOUT: }
  392. // CHECK:STDOUT:
  393. // CHECK:STDOUT: impl @As.impl: %.loc23_17.2 as %As.type {
  394. // CHECK:STDOUT: %Convert.decl: %Convert.type.fc9 = fn_decl @Convert.loc24 [concrete = constants.%Convert.33c] {
  395. // CHECK:STDOUT: %self.patt: %pattern_type.dc0 = binding_pattern self [concrete]
  396. // CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = value_param_pattern %self.patt, call_param0 [concrete]
  397. // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete]
  398. // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt, call_param1 [concrete]
  399. // CHECK:STDOUT: } {
  400. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  401. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  402. // CHECK:STDOUT: %.loc24_31.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  403. // CHECK:STDOUT: %.loc24_31.2: type = converted %int.make_type_signed, %.loc24_31.1 [concrete = constants.%i32.builtin]
  404. // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param call_param0
  405. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @As.impl.%.loc23_17.2 [concrete = Core.IntLiteral]
  406. // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param
  407. // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param1
  408. // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
  409. // CHECK:STDOUT: }
  410. // CHECK:STDOUT:
  411. // CHECK:STDOUT: !members:
  412. // CHECK:STDOUT: .Convert = %Convert.decl
  413. // CHECK:STDOUT: witness = file.%As.impl_witness
  414. // CHECK:STDOUT: }
  415. // CHECK:STDOUT:
  416. // CHECK:STDOUT: impl @ImplicitAs.impl.e13: %.loc27_17.2 as %ImplicitAs.type {
  417. // CHECK:STDOUT: %Convert.decl: %Convert.type.c2a = fn_decl @Convert.loc28 [concrete = constants.%Convert.40d] {
  418. // CHECK:STDOUT: %self.patt: %pattern_type.dc0 = binding_pattern self [concrete]
  419. // CHECK:STDOUT: %self.param_patt: %pattern_type.dc0 = value_param_pattern %self.patt, call_param0 [concrete]
  420. // CHECK:STDOUT: %return.patt: %pattern_type.956 = return_slot_pattern [concrete]
  421. // CHECK:STDOUT: %return.param_patt: %pattern_type.956 = out_param_pattern %return.patt, call_param1 [concrete]
  422. // CHECK:STDOUT: } {
  423. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  424. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%int_32) [concrete = constants.%i32.builtin]
  425. // CHECK:STDOUT: %.loc28_31.1: type = value_of_initializer %int.make_type_signed [concrete = constants.%i32.builtin]
  426. // CHECK:STDOUT: %.loc28_31.2: type = converted %int.make_type_signed, %.loc28_31.1 [concrete = constants.%i32.builtin]
  427. // CHECK:STDOUT: %self.param: Core.IntLiteral = value_param call_param0
  428. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @ImplicitAs.impl.e13.%.loc27_17.2 [concrete = Core.IntLiteral]
  429. // CHECK:STDOUT: %self: Core.IntLiteral = bind_name self, %self.param
  430. // CHECK:STDOUT: %return.param: ref %i32.builtin = out_param call_param1
  431. // CHECK:STDOUT: %return: ref %i32.builtin = return_slot %return.param
  432. // CHECK:STDOUT: }
  433. // CHECK:STDOUT:
  434. // CHECK:STDOUT: !members:
  435. // CHECK:STDOUT: .Convert = %Convert.decl
  436. // CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc27
  437. // CHECK:STDOUT: }
  438. // CHECK:STDOUT:
  439. // CHECK:STDOUT: impl @ImplicitAs.impl.3df: %.loc31_6.2 as %ImplicitAs.type {
  440. // CHECK:STDOUT: %Convert.decl: %Convert.type.295 = fn_decl @Convert.loc32 [concrete = constants.%Convert.2bf] {
  441. // CHECK:STDOUT: %self.patt: %pattern_type.956 = binding_pattern self [concrete]
  442. // CHECK:STDOUT: %self.param_patt: %pattern_type.956 = value_param_pattern %self.patt, call_param0 [concrete]
  443. // CHECK:STDOUT: %return.patt: %pattern_type.dc0 = return_slot_pattern [concrete]
  444. // CHECK:STDOUT: %return.param_patt: %pattern_type.dc0 = out_param_pattern %return.patt, call_param1 [concrete]
  445. // CHECK:STDOUT: } {
  446. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, file.%IntLiteral.decl [concrete = constants.%IntLiteral]
  447. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [concrete = Core.IntLiteral]
  448. // CHECK:STDOUT: %.loc32_42.1: type = value_of_initializer %int_literal.make_type [concrete = Core.IntLiteral]
  449. // CHECK:STDOUT: %.loc32_42.2: type = converted %int_literal.make_type, %.loc32_42.1 [concrete = Core.IntLiteral]
  450. // CHECK:STDOUT: %self.param: %i32.builtin = value_param call_param0
  451. // CHECK:STDOUT: %Self.ref: type = name_ref Self, @ImplicitAs.impl.3df.%.loc31_6.2 [concrete = constants.%i32.builtin]
  452. // CHECK:STDOUT: %self: %i32.builtin = bind_name self, %self.param
  453. // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param call_param1
  454. // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
  455. // CHECK:STDOUT: }
  456. // CHECK:STDOUT:
  457. // CHECK:STDOUT: !members:
  458. // CHECK:STDOUT: .IntLiteral = <poisoned>
  459. // CHECK:STDOUT: .Convert = %Convert.decl
  460. // CHECK:STDOUT: witness = file.%ImplicitAs.impl_witness.loc31
  461. // CHECK:STDOUT: }
  462. // CHECK:STDOUT:
  463. // CHECK:STDOUT: fn @IntLiteral() -> type = "int_literal.make_type";
  464. // CHECK:STDOUT:
  465. // CHECK:STDOUT: fn @Int(%N.param: Core.IntLiteral) -> type = "int.make_type_signed";
  466. // CHECK:STDOUT:
  467. // CHECK:STDOUT: generic fn @Op.loc8(@AddWith.%T.loc7_19.1: type, @AddWith.%Self.1: @AddWith.%AddWith.type (%AddWith.type.bc7)) {
  468. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  469. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.bc7)]
  470. // CHECK:STDOUT: %Self: @Op.loc8.%AddWith.type (%AddWith.type.bc7) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.deb)]
  471. // CHECK:STDOUT: %Self.as_type.loc8_15.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc8_15.1 (constants.%Self.as_type.6cc)]
  472. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type.loc8_15.1 [symbolic = %pattern_type (constants.%pattern_type.4a8)]
  473. // CHECK:STDOUT:
  474. // CHECK:STDOUT: fn(%self.param: @Op.loc8.%Self.as_type.loc8_15.1 (%Self.as_type.6cc), %other.param: @Op.loc8.%Self.as_type.loc8_15.1 (%Self.as_type.6cc)) -> @Op.loc8.%Self.as_type.loc8_15.1 (%Self.as_type.6cc);
  475. // CHECK:STDOUT: }
  476. // CHECK:STDOUT:
  477. // CHECK:STDOUT: generic fn @Convert.loc12(@As.%T.loc11_14.1: type, @As.%Self.1: @As.%As.type (%As.type.8ba)) {
  478. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  479. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.8ba)]
  480. // CHECK:STDOUT: %Self: @Convert.loc12.%As.type (%As.type.8ba) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.b4e)]
  481. // CHECK:STDOUT: %Self.as_type.loc12_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc12_20.1 (constants.%Self.as_type.7f0)]
  482. // CHECK:STDOUT: %pattern_type.loc12_14: type = pattern_type %Self.as_type.loc12_20.1 [symbolic = %pattern_type.loc12_14 (constants.%pattern_type.947)]
  483. // CHECK:STDOUT: %pattern_type.loc12_28: type = pattern_type %T [symbolic = %pattern_type.loc12_28 (constants.%pattern_type.7dc)]
  484. // CHECK:STDOUT:
  485. // CHECK:STDOUT: fn(%self.param: @Convert.loc12.%Self.as_type.loc12_20.1 (%Self.as_type.7f0)) -> @Convert.loc12.%T (%T);
  486. // CHECK:STDOUT: }
  487. // CHECK:STDOUT:
  488. // CHECK:STDOUT: generic fn @Convert.loc16(@ImplicitAs.%T.loc15_22.1: type, @ImplicitAs.%Self.1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.07f)) {
  489. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  490. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.07f)]
  491. // CHECK:STDOUT: %Self: @Convert.loc16.%ImplicitAs.type (%ImplicitAs.type.07f) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.0f3)]
  492. // CHECK:STDOUT: %Self.as_type.loc16_20.1: type = facet_access_type %Self [symbolic = %Self.as_type.loc16_20.1 (constants.%Self.as_type.419)]
  493. // CHECK:STDOUT: %pattern_type.loc16_14: type = pattern_type %Self.as_type.loc16_20.1 [symbolic = %pattern_type.loc16_14 (constants.%pattern_type.a93)]
  494. // CHECK:STDOUT: %pattern_type.loc16_28: type = pattern_type %T [symbolic = %pattern_type.loc16_28 (constants.%pattern_type.7dc)]
  495. // CHECK:STDOUT:
  496. // CHECK:STDOUT: fn(%self.param: @Convert.loc16.%Self.as_type.loc16_20.1 (%Self.as_type.419)) -> @Convert.loc16.%T (%T);
  497. // CHECK:STDOUT: }
  498. // CHECK:STDOUT:
  499. // CHECK:STDOUT: fn @Op.loc20(%self.param: %i32.builtin, %other.param: %i32.builtin) -> %i32.builtin = "int.sadd";
  500. // CHECK:STDOUT:
  501. // CHECK:STDOUT: fn @Convert.loc24(%self.param: Core.IntLiteral) -> %i32.builtin = "int.convert_checked";
  502. // CHECK:STDOUT:
  503. // CHECK:STDOUT: fn @Convert.loc28(%self.param: Core.IntLiteral) -> %i32.builtin = "int.convert_checked";
  504. // CHECK:STDOUT:
  505. // CHECK:STDOUT: fn @Convert.loc32(%self.param: %i32.builtin) -> Core.IntLiteral = "int.convert_checked";
  506. // CHECK:STDOUT:
  507. // CHECK:STDOUT: specific @AddWith(constants.%T) {
  508. // CHECK:STDOUT: %T.loc7_19.2 => constants.%T
  509. // CHECK:STDOUT: }
  510. // CHECK:STDOUT:
  511. // CHECK:STDOUT: specific @Op.loc8(constants.%T, constants.%Self.deb) {
  512. // CHECK:STDOUT: %T => constants.%T
  513. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.bc7
  514. // CHECK:STDOUT: %Self => constants.%Self.deb
  515. // CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%Self.as_type.6cc
  516. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.4a8
  517. // CHECK:STDOUT: }
  518. // CHECK:STDOUT:
  519. // CHECK:STDOUT: specific @As(constants.%T) {
  520. // CHECK:STDOUT: %T.loc11_14.2 => constants.%T
  521. // CHECK:STDOUT: }
  522. // CHECK:STDOUT:
  523. // CHECK:STDOUT: specific @Convert.loc12(constants.%T, constants.%Self.b4e) {
  524. // CHECK:STDOUT: %T => constants.%T
  525. // CHECK:STDOUT: %As.type => constants.%As.type.8ba
  526. // CHECK:STDOUT: %Self => constants.%Self.b4e
  527. // CHECK:STDOUT: %Self.as_type.loc12_20.1 => constants.%Self.as_type.7f0
  528. // CHECK:STDOUT: %pattern_type.loc12_14 => constants.%pattern_type.947
  529. // CHECK:STDOUT: %pattern_type.loc12_28 => constants.%pattern_type.7dc
  530. // CHECK:STDOUT: }
  531. // CHECK:STDOUT:
  532. // CHECK:STDOUT: specific @ImplicitAs(constants.%T) {
  533. // CHECK:STDOUT: %T.loc15_22.2 => constants.%T
  534. // CHECK:STDOUT: }
  535. // CHECK:STDOUT:
  536. // CHECK:STDOUT: specific @Convert.loc16(constants.%T, constants.%Self.0f3) {
  537. // CHECK:STDOUT: %T => constants.%T
  538. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.07f
  539. // CHECK:STDOUT: %Self => constants.%Self.0f3
  540. // CHECK:STDOUT: %Self.as_type.loc16_20.1 => constants.%Self.as_type.419
  541. // CHECK:STDOUT: %pattern_type.loc16_14 => constants.%pattern_type.a93
  542. // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.7dc
  543. // CHECK:STDOUT: }
  544. // CHECK:STDOUT:
  545. // CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) {
  546. // CHECK:STDOUT: %T.loc7_19.2 => constants.%i32.builtin
  547. // CHECK:STDOUT:
  548. // CHECK:STDOUT: !definition:
  549. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.49d
  550. // CHECK:STDOUT: %Self.2 => constants.%Self.da9
  551. // CHECK:STDOUT: %Op.type => constants.%Op.type.efc
  552. // CHECK:STDOUT: %Op => constants.%Op.a62
  553. // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.a65
  554. // CHECK:STDOUT: %assoc0.loc8_41.2 => constants.%assoc0.ee2
  555. // CHECK:STDOUT: }
  556. // CHECK:STDOUT:
  557. // CHECK:STDOUT: specific @Op.loc8(constants.%i32.builtin, constants.%AddWith.facet) {
  558. // CHECK:STDOUT: %T => constants.%i32.builtin
  559. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.49d
  560. // CHECK:STDOUT: %Self => constants.%AddWith.facet
  561. // CHECK:STDOUT: %Self.as_type.loc8_15.1 => constants.%i32.builtin
  562. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.956
  563. // CHECK:STDOUT: }
  564. // CHECK:STDOUT:
  565. // CHECK:STDOUT: specific @As(constants.%i32.builtin) {
  566. // CHECK:STDOUT: %T.loc11_14.2 => constants.%i32.builtin
  567. // CHECK:STDOUT:
  568. // CHECK:STDOUT: !definition:
  569. // CHECK:STDOUT: %As.type => constants.%As.type.a09
  570. // CHECK:STDOUT: %Self.2 => constants.%Self.2fa
  571. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.c0d
  572. // CHECK:STDOUT: %Convert => constants.%Convert.713
  573. // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.b9b
  574. // CHECK:STDOUT: %assoc0.loc12_32.2 => constants.%assoc0.b02
  575. // CHECK:STDOUT: }
  576. // CHECK:STDOUT:
  577. // CHECK:STDOUT: specific @Convert.loc12(constants.%i32.builtin, constants.%As.facet) {
  578. // CHECK:STDOUT: %T => constants.%i32.builtin
  579. // CHECK:STDOUT: %As.type => constants.%As.type.a09
  580. // CHECK:STDOUT: %Self => constants.%As.facet
  581. // CHECK:STDOUT: %Self.as_type.loc12_20.1 => Core.IntLiteral
  582. // CHECK:STDOUT: %pattern_type.loc12_14 => constants.%pattern_type.dc0
  583. // CHECK:STDOUT: %pattern_type.loc12_28 => constants.%pattern_type.956
  584. // CHECK:STDOUT: }
  585. // CHECK:STDOUT:
  586. // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) {
  587. // CHECK:STDOUT: %T.loc15_22.2 => constants.%i32.builtin
  588. // CHECK:STDOUT:
  589. // CHECK:STDOUT: !definition:
  590. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.11a
  591. // CHECK:STDOUT: %Self.2 => constants.%Self.e0a
  592. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.752
  593. // CHECK:STDOUT: %Convert => constants.%Convert.fcc
  594. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.1cf
  595. // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.3ce
  596. // CHECK:STDOUT: }
  597. // CHECK:STDOUT:
  598. // CHECK:STDOUT: specific @Convert.loc16(constants.%i32.builtin, constants.%ImplicitAs.facet.bcb) {
  599. // CHECK:STDOUT: %T => constants.%i32.builtin
  600. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.11a
  601. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.bcb
  602. // CHECK:STDOUT: %Self.as_type.loc16_20.1 => Core.IntLiteral
  603. // CHECK:STDOUT: %pattern_type.loc16_14 => constants.%pattern_type.dc0
  604. // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.956
  605. // CHECK:STDOUT: }
  606. // CHECK:STDOUT:
  607. // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
  608. // CHECK:STDOUT: %T.loc15_22.2 => Core.IntLiteral
  609. // CHECK:STDOUT:
  610. // CHECK:STDOUT: !definition:
  611. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fc
  612. // CHECK:STDOUT: %Self.2 => constants.%Self.37e
  613. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.60e
  614. // CHECK:STDOUT: %Convert => constants.%Convert.c73
  615. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.014
  616. // CHECK:STDOUT: %assoc0.loc16_32.2 => constants.%assoc0.757
  617. // CHECK:STDOUT: }
  618. // CHECK:STDOUT:
  619. // CHECK:STDOUT: specific @Convert.loc16(Core.IntLiteral, constants.%ImplicitAs.facet.a85) {
  620. // CHECK:STDOUT: %T => Core.IntLiteral
  621. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.9fc
  622. // CHECK:STDOUT: %Self => constants.%ImplicitAs.facet.a85
  623. // CHECK:STDOUT: %Self.as_type.loc16_20.1 => constants.%i32.builtin
  624. // CHECK:STDOUT: %pattern_type.loc16_14 => constants.%pattern_type.956
  625. // CHECK:STDOUT: %pattern_type.loc16_28 => constants.%pattern_type.dc0
  626. // CHECK:STDOUT: }
  627. // CHECK:STDOUT:
  628. // CHECK:STDOUT: --- user.carbon
  629. // CHECK:STDOUT:
  630. // CHECK:STDOUT: constants {
  631. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  632. // CHECK:STDOUT: %Int.type: type = fn_type @Int [concrete]
  633. // CHECK:STDOUT: %Int: %Int.type = struct_value () [concrete]
  634. // CHECK:STDOUT: %i32.builtin: type = int_type signed, %int_32 [concrete]
  635. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  636. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  637. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  638. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  639. // CHECK:STDOUT: %As.type.eed: type = facet_type <@As, @As(%T)> [symbolic]
  640. // CHECK:STDOUT: %Self.65a: %As.type.eed = bind_symbolic_name Self, 1 [symbolic]
  641. // CHECK:STDOUT: %Convert.type.843: type = fn_type @Convert.1, @As(%T) [symbolic]
  642. // CHECK:STDOUT: %Convert.95f: %Convert.type.843 = struct_value () [symbolic]
  643. // CHECK:STDOUT: %pattern_type.7dc: type = pattern_type %T [symbolic]
  644. // CHECK:STDOUT: %Self.as_type.04d: type = facet_access_type %Self.65a [symbolic]
  645. // CHECK:STDOUT: %pattern_type.ca4: type = pattern_type %Self.as_type.04d [symbolic]
  646. // CHECK:STDOUT: %As.assoc_type.760: type = assoc_entity_type @As, @As(%T) [symbolic]
  647. // CHECK:STDOUT: %assoc0.076: %As.assoc_type.760 = assoc_entity element0, imports.%Core.import_ref.708 [symbolic]
  648. // CHECK:STDOUT: %As.type.a6d: type = facet_type <@As, @As(%i32.builtin)> [concrete]
  649. // CHECK:STDOUT: %Self.c25: %As.type.a6d = bind_symbolic_name Self, 1 [symbolic]
  650. // CHECK:STDOUT: %Convert.type.378: type = fn_type @Convert.1, @As(%i32.builtin) [concrete]
  651. // CHECK:STDOUT: %Convert.e51: %Convert.type.378 = struct_value () [concrete]
  652. // CHECK:STDOUT: %As.assoc_type.bc2: type = assoc_entity_type @As, @As(%i32.builtin) [concrete]
  653. // CHECK:STDOUT: %assoc0.9fb: %As.assoc_type.bc2 = assoc_entity element0, imports.%Core.import_ref.708 [concrete]
  654. // CHECK:STDOUT: %assoc0.97d: %As.assoc_type.760 = assoc_entity element0, imports.%Core.import_ref.4e8 [symbolic]
  655. // CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete]
  656. // CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete]
  657. // CHECK:STDOUT: %AddWith.type.6d3: type = facet_type <@AddWith, @AddWith(%T)> [symbolic]
  658. // CHECK:STDOUT: %Self.6c1: %AddWith.type.6d3 = bind_symbolic_name Self, 1 [symbolic]
  659. // CHECK:STDOUT: %AddWith.type.6f5: type = facet_type <@AddWith, @AddWith(%i32.builtin)> [concrete]
  660. // CHECK:STDOUT: %Op.type.22d: type = fn_type @Op.1, @AddWith(%T) [symbolic]
  661. // CHECK:STDOUT: %Op.965: %Op.type.22d = struct_value () [symbolic]
  662. // CHECK:STDOUT: %Self.as_type.030: type = facet_access_type %Self.6c1 [symbolic]
  663. // CHECK:STDOUT: %pattern_type.7fc: type = pattern_type %Self.as_type.030 [symbolic]
  664. // CHECK:STDOUT: %AddWith.assoc_type.c10: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic]
  665. // CHECK:STDOUT: %assoc0.89962d.1: %AddWith.assoc_type.c10 = assoc_entity element0, imports.%Core.import_ref.7e6ace.1 [symbolic]
  666. // CHECK:STDOUT: %Self.ec3: %AddWith.type.6f5 = bind_symbolic_name Self, 1 [symbolic]
  667. // CHECK:STDOUT: %Op.type.0b7: type = fn_type @Op.1, @AddWith(%i32.builtin) [concrete]
  668. // CHECK:STDOUT: %Op.9d6: %Op.type.0b7 = struct_value () [concrete]
  669. // CHECK:STDOUT: %AddWith.assoc_type.dff: type = assoc_entity_type @AddWith, @AddWith(%i32.builtin) [concrete]
  670. // CHECK:STDOUT: %assoc0.7f1: %AddWith.assoc_type.dff = assoc_entity element0, imports.%Core.import_ref.1b9 [concrete]
  671. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  672. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  673. // CHECK:STDOUT: %ImplicitAs.type.d62: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic]
  674. // CHECK:STDOUT: %Self.519: %ImplicitAs.type.d62 = bind_symbolic_name Self, 1 [symbolic]
  675. // CHECK:STDOUT: %ImplicitAs.type.61e: type = facet_type <@ImplicitAs, @ImplicitAs(%i32.builtin)> [concrete]
  676. // CHECK:STDOUT: %Convert.type.275: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic]
  677. // CHECK:STDOUT: %Convert.42e: %Convert.type.275 = struct_value () [symbolic]
  678. // CHECK:STDOUT: %Self.as_type.40a: type = facet_access_type %Self.519 [symbolic]
  679. // CHECK:STDOUT: %pattern_type.f3e: type = pattern_type %Self.as_type.40a [symbolic]
  680. // CHECK:STDOUT: %ImplicitAs.assoc_type.ca0: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic]
  681. // CHECK:STDOUT: %assoc0.dc001e.1: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic]
  682. // CHECK:STDOUT: %Self.d28: %ImplicitAs.type.61e = bind_symbolic_name Self, 1 [symbolic]
  683. // CHECK:STDOUT: %Convert.type.059: type = fn_type @Convert.2, @ImplicitAs(%i32.builtin) [concrete]
  684. // CHECK:STDOUT: %Convert.4d7: %Convert.type.059 = struct_value () [concrete]
  685. // CHECK:STDOUT: %ImplicitAs.assoc_type.398: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%i32.builtin) [concrete]
  686. // CHECK:STDOUT: %assoc0.6fd: %ImplicitAs.assoc_type.398 = assoc_entity element0, imports.%Core.import_ref.1c752f.1 [concrete]
  687. // CHECK:STDOUT: %ImplicitAs.type.2fd: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  688. // CHECK:STDOUT: %Self.9ac: %ImplicitAs.type.2fd = bind_symbolic_name Self, 1 [symbolic]
  689. // CHECK:STDOUT: %Convert.type.71e: type = fn_type @Convert.2, @ImplicitAs(Core.IntLiteral) [concrete]
  690. // CHECK:STDOUT: %Convert.0e2: %Convert.type.71e = struct_value () [concrete]
  691. // CHECK:STDOUT: %ImplicitAs.assoc_type.959: type = assoc_entity_type @ImplicitAs, @ImplicitAs(Core.IntLiteral) [concrete]
  692. // CHECK:STDOUT: %assoc0.8c4: %ImplicitAs.assoc_type.959 = assoc_entity element0, imports.%Core.import_ref.1c752f.2 [concrete]
  693. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness imports.%As.impl_witness_table [concrete]
  694. // CHECK:STDOUT: %As.facet: %As.type.a6d = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
  695. // CHECK:STDOUT: %.387: type = fn_type_with_self_type %Convert.type.378, %As.facet [concrete]
  696. // CHECK:STDOUT: %Convert.type.953: type = fn_type @Convert.3 [concrete]
  697. // CHECK:STDOUT: %Convert.5bc: %Convert.type.953 = struct_value () [concrete]
  698. // CHECK:STDOUT: %Convert.bound.b34: <bound method> = bound_method %int_1.5b8, %Convert.5bc [concrete]
  699. // CHECK:STDOUT: %int_1.f38: %i32.builtin = int_value 1 [concrete]
  700. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  701. // CHECK:STDOUT: %Convert.bound.324: <bound method> = bound_method %int_2.ecc, %Convert.5bc [concrete]
  702. // CHECK:STDOUT: %int_2.5a1: %i32.builtin = int_value 2 [concrete]
  703. // CHECK:STDOUT: %assoc0.89962d.2: %AddWith.assoc_type.c10 = assoc_entity element0, imports.%Core.import_ref.7e6ace.2 [symbolic]
  704. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness imports.%AddWith.impl_witness_table [concrete]
  705. // CHECK:STDOUT: %AddWith.facet: %AddWith.type.6f5 = facet_value %i32.builtin, (%AddWith.impl_witness) [concrete]
  706. // CHECK:STDOUT: %.1e7: type = fn_type_with_self_type %Op.type.0b7, %AddWith.facet [concrete]
  707. // CHECK:STDOUT: %Op.type.2bc: type = fn_type @Op.2 [concrete]
  708. // CHECK:STDOUT: %Op.9d1: %Op.type.2bc = struct_value () [concrete]
  709. // CHECK:STDOUT: %Op.bound.de8: <bound method> = bound_method %int_1.f38, %Op.9d1 [concrete]
  710. // CHECK:STDOUT: %int_3.a0f: %i32.builtin = int_value 3 [concrete]
  711. // CHECK:STDOUT: %assoc0.dc001e.2: %ImplicitAs.assoc_type.ca0 = assoc_entity element0, imports.%Core.import_ref.207961.2 [symbolic]
  712. // CHECK:STDOUT: %ImplicitAs.impl_witness.9c5: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.5fc [concrete]
  713. // CHECK:STDOUT: %ImplicitAs.facet.07b: %ImplicitAs.type.2fd = facet_value %i32.builtin, (%ImplicitAs.impl_witness.9c5) [concrete]
  714. // CHECK:STDOUT: %.53b: type = fn_type_with_self_type %Convert.type.71e, %ImplicitAs.facet.07b [concrete]
  715. // CHECK:STDOUT: %Convert.type.0e4: type = fn_type @Convert.4 [concrete]
  716. // CHECK:STDOUT: %Convert.b32: %Convert.type.0e4 = struct_value () [concrete]
  717. // CHECK:STDOUT: %Convert.bound.65a: <bound method> = bound_method %int_3.a0f, %Convert.b32 [concrete]
  718. // CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
  719. // CHECK:STDOUT: %array_type: type = array_type %int_3.1ba, %i32.builtin [concrete]
  720. // CHECK:STDOUT: %pattern_type.9e2: type = pattern_type %array_type [concrete]
  721. // CHECK:STDOUT: %int_4.0c1: Core.IntLiteral = int_value 4 [concrete]
  722. // CHECK:STDOUT: %Convert.bound.94d: <bound method> = bound_method %int_3.1ba, %Convert.5bc [concrete]
  723. // CHECK:STDOUT: %Convert.bound.8fc: <bound method> = bound_method %int_4.0c1, %Convert.5bc [concrete]
  724. // CHECK:STDOUT: %int_4.4f1: %i32.builtin = int_value 4 [concrete]
  725. // CHECK:STDOUT: %Op.bound.703: <bound method> = bound_method %int_3.a0f, %Op.9d1 [concrete]
  726. // CHECK:STDOUT: %int_7: %i32.builtin = int_value 7 [concrete]
  727. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.IntLiteral, Core.IntLiteral, %i32.builtin) [concrete]
  728. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  729. // CHECK:STDOUT: %ImplicitAs.impl_witness.07a: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.78e [concrete]
  730. // CHECK:STDOUT: %ImplicitAs.facet.a3d: %ImplicitAs.type.61e = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.07a) [concrete]
  731. // CHECK:STDOUT: %.ec1: type = fn_type_with_self_type %Convert.type.059, %ImplicitAs.facet.a3d [concrete]
  732. // CHECK:STDOUT: %Convert.type.49f: type = fn_type @Convert.5 [concrete]
  733. // CHECK:STDOUT: %Convert.cb5: %Convert.type.49f = struct_value () [concrete]
  734. // CHECK:STDOUT: %Convert.bound.b6b: <bound method> = bound_method %int_3.1ba, %Convert.cb5 [concrete]
  735. // CHECK:STDOUT: %Convert.bound.626: <bound method> = bound_method %int_4.0c1, %Convert.cb5 [concrete]
  736. // CHECK:STDOUT: %array: %array_type = tuple_value (%int_3.a0f, %int_4.4f1, %int_7) [concrete]
  737. // CHECK:STDOUT: }
  738. // CHECK:STDOUT:
  739. // CHECK:STDOUT: imports {
  740. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  741. // CHECK:STDOUT: .Int = %Core.Int
  742. // CHECK:STDOUT: .As = %Core.As
  743. // CHECK:STDOUT: .AddWith = %Core.AddWith
  744. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  745. // CHECK:STDOUT: import Core//default
  746. // CHECK:STDOUT: }
  747. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//default, Int, loaded [concrete = constants.%Int]
  748. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//default, As, loaded [concrete = constants.%As.generic]
  749. // CHECK:STDOUT: %Core.import_ref.5ab3ec.1: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)]
  750. // CHECK:STDOUT: %Core.import_ref.a7c = import_ref Core//default, inst103 [no loc], unloaded
  751. // CHECK:STDOUT: %Core.import_ref.5e1: @As.%As.assoc_type (%As.assoc_type.760) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%assoc0 (constants.%assoc0.97d)]
  752. // CHECK:STDOUT: %Core.Convert.313 = import_ref Core//default, Convert, unloaded
  753. // CHECK:STDOUT: %Core.import_ref.5ab3ec.2: type = import_ref Core//default, loc11_14, loaded [symbolic = @As.%T (constants.%T)]
  754. // CHECK:STDOUT: %Core.import_ref.996: @As.%As.type (%As.type.eed) = import_ref Core//default, inst103 [no loc], loaded [symbolic = @As.%Self (constants.%Self.65a)]
  755. // CHECK:STDOUT: %Core.import_ref.708: @As.%Convert.type (%Convert.type.843) = import_ref Core//default, loc12_32, loaded [symbolic = @As.%Convert (constants.%Convert.95f)]
  756. // CHECK:STDOUT: %Core.import_ref.4e8 = import_ref Core//default, loc12_32, unloaded
  757. // CHECK:STDOUT: %Core.import_ref.5ab3ec.3: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)]
  758. // CHECK:STDOUT: %Core.import_ref.476 = import_ref Core//default, inst49 [no loc], unloaded
  759. // CHECK:STDOUT: %Core.import_ref.35d: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.c10) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%assoc0 (constants.%assoc0.89962d.2)]
  760. // CHECK:STDOUT: %Core.Op = import_ref Core//default, Op, unloaded
  761. // CHECK:STDOUT: %Core.import_ref.772: <witness> = import_ref Core//default, loc19_26, loaded [concrete = constants.%AddWith.impl_witness]
  762. // CHECK:STDOUT: %Core.import_ref.c8c7cd.1: type = import_ref Core//default, loc19_6, loaded [concrete = constants.%i32.builtin]
  763. // CHECK:STDOUT: %Core.import_ref.ef3: type = import_ref Core//default, loc19_24, loaded [concrete = constants.%AddWith.type.6f5]
  764. // CHECK:STDOUT: %Core.import_ref.5ab3ec.4: type = import_ref Core//default, loc7_19, loaded [symbolic = @AddWith.%T (constants.%T)]
  765. // CHECK:STDOUT: %Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3) = import_ref Core//default, inst49 [no loc], loaded [symbolic = @AddWith.%Self (constants.%Self.6c1)]
  766. // CHECK:STDOUT: %Core.import_ref.7e6ace.1 = import_ref Core//default, loc8_41, unloaded
  767. // CHECK:STDOUT: %Core.import_ref.1b9: @AddWith.%Op.type (%Op.type.22d) = import_ref Core//default, loc8_41, loaded [symbolic = @AddWith.%Op (constants.%Op.965)]
  768. // CHECK:STDOUT: %Core.import_ref.cb6: <witness> = import_ref Core//default, loc23_30, loaded [concrete = constants.%As.impl_witness]
  769. // CHECK:STDOUT: %Core.import_ref.8721d7.1: type = import_ref Core//default, loc23_17, loaded [concrete = Core.IntLiteral]
  770. // CHECK:STDOUT: %Core.import_ref.1e5: type = import_ref Core//default, loc23_28, loaded [concrete = constants.%As.type.a6d]
  771. // CHECK:STDOUT: %Core.import_ref.5ab3ec.5: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
  772. // CHECK:STDOUT: %Core.import_ref.ff5 = import_ref Core//default, inst147 [no loc], unloaded
  773. // CHECK:STDOUT: %Core.import_ref.492: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%assoc0 (constants.%assoc0.dc001e.2)]
  774. // CHECK:STDOUT: %Core.Convert.e69 = import_ref Core//default, Convert, unloaded
  775. // CHECK:STDOUT: %Core.import_ref.c62: <witness> = import_ref Core//default, loc27_38, loaded [concrete = constants.%ImplicitAs.impl_witness.07a]
  776. // CHECK:STDOUT: %Core.import_ref.8721d7.2: type = import_ref Core//default, loc27_17, loaded [concrete = Core.IntLiteral]
  777. // CHECK:STDOUT: %Core.import_ref.4d9: type = import_ref Core//default, loc27_36, loaded [concrete = constants.%ImplicitAs.type.61e]
  778. // CHECK:STDOUT: %Core.import_ref.5ab3ec.6: type = import_ref Core//default, loc15_22, loaded [symbolic = @ImplicitAs.%T (constants.%T)]
  779. // CHECK:STDOUT: %Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = import_ref Core//default, inst147 [no loc], loaded [symbolic = @ImplicitAs.%Self (constants.%Self.519)]
  780. // CHECK:STDOUT: %Core.import_ref.207961.1 = import_ref Core//default, loc16_32, unloaded
  781. // CHECK:STDOUT: %Core.import_ref.1c752f.1: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
  782. // CHECK:STDOUT: %Core.import_ref.c5f: <witness> = import_ref Core//default, loc31_38, loaded [concrete = constants.%ImplicitAs.impl_witness.9c5]
  783. // CHECK:STDOUT: %Core.import_ref.c8c7cd.2: type = import_ref Core//default, loc31_6, loaded [concrete = constants.%i32.builtin]
  784. // CHECK:STDOUT: %Core.import_ref.efb: type = import_ref Core//default, loc31_36, loaded [concrete = constants.%ImplicitAs.type.2fd]
  785. // CHECK:STDOUT: %Core.import_ref.1c752f.2: @ImplicitAs.%Convert.type (%Convert.type.275) = import_ref Core//default, loc16_32, loaded [symbolic = @ImplicitAs.%Convert (constants.%Convert.42e)]
  786. // CHECK:STDOUT: %Core.import_ref.73a: %Convert.type.953 = import_ref Core//default, loc24_35, loaded [concrete = constants.%Convert.5bc]
  787. // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.import_ref.73a), @As.impl [concrete]
  788. // CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//default, AddWith, loaded [concrete = constants.%AddWith.generic]
  789. // CHECK:STDOUT: %Core.import_ref.7e6ace.2 = import_ref Core//default, loc8_41, unloaded
  790. // CHECK:STDOUT: %Core.import_ref.079: %Op.type.2bc = import_ref Core//default, loc20_42, loaded [concrete = constants.%Op.9d1]
  791. // CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (%Core.import_ref.079), @AddWith.impl [concrete]
  792. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//default, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  793. // CHECK:STDOUT: %Core.import_ref.207961.2 = import_ref Core//default, loc16_32, unloaded
  794. // CHECK:STDOUT: %Core.import_ref.4f9: %Convert.type.0e4 = import_ref Core//default, loc32_44, loaded [concrete = constants.%Convert.b32]
  795. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.5fc = impl_witness_table (%Core.import_ref.4f9), @ImplicitAs.impl.ddc [concrete]
  796. // CHECK:STDOUT: %Core.import_ref.f35: %Convert.type.49f = import_ref Core//default, loc28_35, loaded [concrete = constants.%Convert.cb5]
  797. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.78e = impl_witness_table (%Core.import_ref.f35), @ImplicitAs.impl.68b [concrete]
  798. // CHECK:STDOUT: }
  799. // CHECK:STDOUT:
  800. // CHECK:STDOUT: file {
  801. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  802. // CHECK:STDOUT: .Core = imports.%Core
  803. // CHECK:STDOUT: .arr = %arr
  804. // CHECK:STDOUT: }
  805. // CHECK:STDOUT: %Core.import = import Core
  806. // CHECK:STDOUT: name_binding_decl {
  807. // CHECK:STDOUT: %arr.patt: %pattern_type.9e2 = binding_pattern arr [concrete]
  808. // CHECK:STDOUT: %arr.var_patt: %pattern_type.9e2 = var_pattern %arr.patt [concrete]
  809. // CHECK:STDOUT: }
  810. // CHECK:STDOUT: %arr.var: ref %array_type = var %arr.var_patt [concrete]
  811. // CHECK:STDOUT: %.loc4_44: type = splice_block %array_type [concrete = constants.%array_type] {
  812. // CHECK:STDOUT: %int_32.loc4_16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  813. // CHECK:STDOUT: %int.make_type_signed.loc4_16: init type = call constants.%Int(%int_32.loc4_16) [concrete = constants.%i32.builtin]
  814. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  815. // CHECK:STDOUT: %int_32.loc4_27: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  816. // CHECK:STDOUT: %int.make_type_signed.loc4_27: init type = call constants.%Int(%int_32.loc4_27) [concrete = constants.%i32.builtin]
  817. // CHECK:STDOUT: %.loc4_27.1: type = value_of_initializer %int.make_type_signed.loc4_27 [concrete = constants.%i32.builtin]
  818. // CHECK:STDOUT: %.loc4_27.2: type = converted %int.make_type_signed.loc4_27, %.loc4_27.1 [concrete = constants.%i32.builtin]
  819. // CHECK:STDOUT: %impl.elem0.loc4_24: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc]
  820. // CHECK:STDOUT: %bound_method.loc4_24: <bound method> = bound_method %int_1, %impl.elem0.loc4_24 [concrete = constants.%Convert.bound.b34]
  821. // CHECK:STDOUT: %int.convert_checked.loc4_24: init %i32.builtin = call %bound_method.loc4_24(%int_1) [concrete = constants.%int_1.f38]
  822. // CHECK:STDOUT: %.loc4_24.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_24 [concrete = constants.%int_1.f38]
  823. // CHECK:STDOUT: %.loc4_24.2: %i32.builtin = converted %int_1, %.loc4_24.1 [concrete = constants.%int_1.f38]
  824. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  825. // CHECK:STDOUT: %int_32.loc4_40: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  826. // CHECK:STDOUT: %int.make_type_signed.loc4_40: init type = call constants.%Int(%int_32.loc4_40) [concrete = constants.%i32.builtin]
  827. // CHECK:STDOUT: %.loc4_40.1: type = value_of_initializer %int.make_type_signed.loc4_40 [concrete = constants.%i32.builtin]
  828. // CHECK:STDOUT: %.loc4_40.2: type = converted %int.make_type_signed.loc4_40, %.loc4_40.1 [concrete = constants.%i32.builtin]
  829. // CHECK:STDOUT: %impl.elem0.loc4_37: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc]
  830. // CHECK:STDOUT: %bound_method.loc4_37: <bound method> = bound_method %int_2, %impl.elem0.loc4_37 [concrete = constants.%Convert.bound.324]
  831. // CHECK:STDOUT: %int.convert_checked.loc4_37: init %i32.builtin = call %bound_method.loc4_37(%int_2) [concrete = constants.%int_2.5a1]
  832. // CHECK:STDOUT: %.loc4_37.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_37 [concrete = constants.%int_2.5a1]
  833. // CHECK:STDOUT: %.loc4_37.2: %i32.builtin = converted %int_2, %.loc4_37.1 [concrete = constants.%int_2.5a1]
  834. // CHECK:STDOUT: %impl.elem0.loc4_32.1: %.1e7 = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%Op.9d1]
  835. // CHECK:STDOUT: %bound_method.loc4_32.1: <bound method> = bound_method %.loc4_24.2, %impl.elem0.loc4_32.1 [concrete = constants.%Op.bound.de8]
  836. // CHECK:STDOUT: %int.sadd: init %i32.builtin = call %bound_method.loc4_32.1(%.loc4_24.2, %.loc4_37.2) [concrete = constants.%int_3.a0f]
  837. // CHECK:STDOUT: %.loc4_16.1: type = value_of_initializer %int.make_type_signed.loc4_16 [concrete = constants.%i32.builtin]
  838. // CHECK:STDOUT: %.loc4_16.2: type = converted %int.make_type_signed.loc4_16, %.loc4_16.1 [concrete = constants.%i32.builtin]
  839. // CHECK:STDOUT: %impl.elem0.loc4_32.2: %.53b = impl_witness_access constants.%ImplicitAs.impl_witness.9c5, element0 [concrete = constants.%Convert.b32]
  840. // CHECK:STDOUT: %bound_method.loc4_32.2: <bound method> = bound_method %int.sadd, %impl.elem0.loc4_32.2 [concrete = constants.%Convert.bound.65a]
  841. // CHECK:STDOUT: %.loc4_32.1: %i32.builtin = value_of_initializer %int.sadd [concrete = constants.%int_3.a0f]
  842. // CHECK:STDOUT: %.loc4_32.2: %i32.builtin = converted %int.sadd, %.loc4_32.1 [concrete = constants.%int_3.a0f]
  843. // CHECK:STDOUT: %int.convert_checked.loc4_32: init Core.IntLiteral = call %bound_method.loc4_32.2(%.loc4_32.2) [concrete = constants.%int_3.1ba]
  844. // CHECK:STDOUT: %.loc4_32.3: Core.IntLiteral = value_of_initializer %int.convert_checked.loc4_32 [concrete = constants.%int_3.1ba]
  845. // CHECK:STDOUT: %.loc4_32.4: Core.IntLiteral = converted %int.sadd, %.loc4_32.3 [concrete = constants.%int_3.1ba]
  846. // CHECK:STDOUT: %array_type: type = array_type %.loc4_32.4, %.loc4_16.2 [concrete = constants.%array_type]
  847. // CHECK:STDOUT: }
  848. // CHECK:STDOUT: %arr: ref %array_type = bind_name arr, %arr.var [concrete = %arr.var]
  849. // CHECK:STDOUT: }
  850. // CHECK:STDOUT:
  851. // CHECK:STDOUT: generic interface @As(imports.%Core.import_ref.5ab3ec.1: type) [from "core.carbon"] {
  852. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  853. // CHECK:STDOUT:
  854. // CHECK:STDOUT: !definition:
  855. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.eed)]
  856. // CHECK:STDOUT: %Self: @As.%As.type (%As.type.eed) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.65a)]
  857. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.1, @As(%T) [symbolic = %Convert.type (constants.%Convert.type.843)]
  858. // CHECK:STDOUT: %Convert: @As.%Convert.type (%Convert.type.843) = struct_value () [symbolic = %Convert (constants.%Convert.95f)]
  859. // CHECK:STDOUT: %As.assoc_type: type = assoc_entity_type @As, @As(%T) [symbolic = %As.assoc_type (constants.%As.assoc_type.760)]
  860. // CHECK:STDOUT: %assoc0: @As.%As.assoc_type (%As.assoc_type.760) = assoc_entity element0, imports.%Core.import_ref.708 [symbolic = %assoc0 (constants.%assoc0.076)]
  861. // CHECK:STDOUT:
  862. // CHECK:STDOUT: interface {
  863. // CHECK:STDOUT: !members:
  864. // CHECK:STDOUT: .Self = imports.%Core.import_ref.a7c
  865. // CHECK:STDOUT: .Convert = imports.%Core.import_ref.5e1
  866. // CHECK:STDOUT: witness = (imports.%Core.Convert.313)
  867. // CHECK:STDOUT: }
  868. // CHECK:STDOUT: }
  869. // CHECK:STDOUT:
  870. // CHECK:STDOUT: generic interface @AddWith(imports.%Core.import_ref.5ab3ec.3: type) [from "core.carbon"] {
  871. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  872. // CHECK:STDOUT:
  873. // CHECK:STDOUT: !definition:
  874. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d3)]
  875. // CHECK:STDOUT: %Self: @AddWith.%AddWith.type (%AddWith.type.6d3) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.6c1)]
  876. // CHECK:STDOUT: %Op.type: type = fn_type @Op.1, @AddWith(%T) [symbolic = %Op.type (constants.%Op.type.22d)]
  877. // CHECK:STDOUT: %Op: @AddWith.%Op.type (%Op.type.22d) = struct_value () [symbolic = %Op (constants.%Op.965)]
  878. // CHECK:STDOUT: %AddWith.assoc_type: type = assoc_entity_type @AddWith, @AddWith(%T) [symbolic = %AddWith.assoc_type (constants.%AddWith.assoc_type.c10)]
  879. // CHECK:STDOUT: %assoc0: @AddWith.%AddWith.assoc_type (%AddWith.assoc_type.c10) = assoc_entity element0, imports.%Core.import_ref.7e6ace.1 [symbolic = %assoc0 (constants.%assoc0.89962d.1)]
  880. // CHECK:STDOUT:
  881. // CHECK:STDOUT: interface {
  882. // CHECK:STDOUT: !members:
  883. // CHECK:STDOUT: .Self = imports.%Core.import_ref.476
  884. // CHECK:STDOUT: .Op = imports.%Core.import_ref.35d
  885. // CHECK:STDOUT: witness = (imports.%Core.Op)
  886. // CHECK:STDOUT: }
  887. // CHECK:STDOUT: }
  888. // CHECK:STDOUT:
  889. // CHECK:STDOUT: generic interface @ImplicitAs(imports.%Core.import_ref.5ab3ec.5: type) [from "core.carbon"] {
  890. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  891. // CHECK:STDOUT:
  892. // CHECK:STDOUT: !definition:
  893. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
  894. // CHECK:STDOUT: %Self: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
  895. // CHECK:STDOUT: %Convert.type: type = fn_type @Convert.2, @ImplicitAs(%T) [symbolic = %Convert.type (constants.%Convert.type.275)]
  896. // CHECK:STDOUT: %Convert: @ImplicitAs.%Convert.type (%Convert.type.275) = struct_value () [symbolic = %Convert (constants.%Convert.42e)]
  897. // CHECK:STDOUT: %ImplicitAs.assoc_type: type = assoc_entity_type @ImplicitAs, @ImplicitAs(%T) [symbolic = %ImplicitAs.assoc_type (constants.%ImplicitAs.assoc_type.ca0)]
  898. // CHECK:STDOUT: %assoc0: @ImplicitAs.%ImplicitAs.assoc_type (%ImplicitAs.assoc_type.ca0) = assoc_entity element0, imports.%Core.import_ref.207961.1 [symbolic = %assoc0 (constants.%assoc0.dc001e.1)]
  899. // CHECK:STDOUT:
  900. // CHECK:STDOUT: interface {
  901. // CHECK:STDOUT: !members:
  902. // CHECK:STDOUT: .Self = imports.%Core.import_ref.ff5
  903. // CHECK:STDOUT: .Convert = imports.%Core.import_ref.492
  904. // CHECK:STDOUT: witness = (imports.%Core.Convert.e69)
  905. // CHECK:STDOUT: }
  906. // CHECK:STDOUT: }
  907. // CHECK:STDOUT:
  908. // CHECK:STDOUT: impl @AddWith.impl: imports.%Core.import_ref.c8c7cd.1 as imports.%Core.import_ref.ef3 [from "core.carbon"] {
  909. // CHECK:STDOUT: !members:
  910. // CHECK:STDOUT: witness = imports.%Core.import_ref.772
  911. // CHECK:STDOUT: }
  912. // CHECK:STDOUT:
  913. // CHECK:STDOUT: impl @As.impl: imports.%Core.import_ref.8721d7.1 as imports.%Core.import_ref.1e5 [from "core.carbon"] {
  914. // CHECK:STDOUT: !members:
  915. // CHECK:STDOUT: witness = imports.%Core.import_ref.cb6
  916. // CHECK:STDOUT: }
  917. // CHECK:STDOUT:
  918. // CHECK:STDOUT: impl @ImplicitAs.impl.68b: imports.%Core.import_ref.8721d7.2 as imports.%Core.import_ref.4d9 [from "core.carbon"] {
  919. // CHECK:STDOUT: !members:
  920. // CHECK:STDOUT: witness = imports.%Core.import_ref.c62
  921. // CHECK:STDOUT: }
  922. // CHECK:STDOUT:
  923. // CHECK:STDOUT: impl @ImplicitAs.impl.ddc: imports.%Core.import_ref.c8c7cd.2 as imports.%Core.import_ref.efb [from "core.carbon"] {
  924. // CHECK:STDOUT: !members:
  925. // CHECK:STDOUT: witness = imports.%Core.import_ref.c5f
  926. // CHECK:STDOUT: }
  927. // CHECK:STDOUT:
  928. // CHECK:STDOUT: fn @Int = "int.make_type_signed" [from "core.carbon"];
  929. // CHECK:STDOUT:
  930. // CHECK:STDOUT: generic fn @Convert.1(imports.%Core.import_ref.5ab3ec.2: type, imports.%Core.import_ref.996: @As.%As.type (%As.type.eed)) [from "core.carbon"] {
  931. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  932. // CHECK:STDOUT: %As.type: type = facet_type <@As, @As(%T)> [symbolic = %As.type (constants.%As.type.eed)]
  933. // CHECK:STDOUT: %Self: @Convert.1.%As.type (%As.type.eed) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.65a)]
  934. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.04d)]
  935. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.ca4)]
  936. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %T [symbolic = %pattern_type.2 (constants.%pattern_type.7dc)]
  937. // CHECK:STDOUT:
  938. // CHECK:STDOUT: fn;
  939. // CHECK:STDOUT: }
  940. // CHECK:STDOUT:
  941. // CHECK:STDOUT: generic fn @Op.1(imports.%Core.import_ref.5ab3ec.4: type, imports.%Core.import_ref.6bf: @AddWith.%AddWith.type (%AddWith.type.6d3)) [from "core.carbon"] {
  942. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  943. // CHECK:STDOUT: %AddWith.type: type = facet_type <@AddWith, @AddWith(%T)> [symbolic = %AddWith.type (constants.%AddWith.type.6d3)]
  944. // CHECK:STDOUT: %Self: @Op.1.%AddWith.type (%AddWith.type.6d3) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.6c1)]
  945. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.030)]
  946. // CHECK:STDOUT: %pattern_type: type = pattern_type %Self.as_type [symbolic = %pattern_type (constants.%pattern_type.7fc)]
  947. // CHECK:STDOUT:
  948. // CHECK:STDOUT: fn;
  949. // CHECK:STDOUT: }
  950. // CHECK:STDOUT:
  951. // CHECK:STDOUT: generic fn @Convert.2(imports.%Core.import_ref.5ab3ec.6: type, imports.%Core.import_ref.ce1: @ImplicitAs.%ImplicitAs.type (%ImplicitAs.type.d62)) [from "core.carbon"] {
  952. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic = %T (constants.%T)]
  953. // CHECK:STDOUT: %ImplicitAs.type: type = facet_type <@ImplicitAs, @ImplicitAs(%T)> [symbolic = %ImplicitAs.type (constants.%ImplicitAs.type.d62)]
  954. // CHECK:STDOUT: %Self: @Convert.2.%ImplicitAs.type (%ImplicitAs.type.d62) = bind_symbolic_name Self, 1 [symbolic = %Self (constants.%Self.519)]
  955. // CHECK:STDOUT: %Self.as_type: type = facet_access_type %Self [symbolic = %Self.as_type (constants.%Self.as_type.40a)]
  956. // CHECK:STDOUT: %pattern_type.1: type = pattern_type %Self.as_type [symbolic = %pattern_type.1 (constants.%pattern_type.f3e)]
  957. // CHECK:STDOUT: %pattern_type.2: type = pattern_type %T [symbolic = %pattern_type.2 (constants.%pattern_type.7dc)]
  958. // CHECK:STDOUT:
  959. // CHECK:STDOUT: fn;
  960. // CHECK:STDOUT: }
  961. // CHECK:STDOUT:
  962. // CHECK:STDOUT: fn @Convert.3 = "int.convert_checked" [from "core.carbon"];
  963. // CHECK:STDOUT:
  964. // CHECK:STDOUT: fn @Op.2 = "int.sadd" [from "core.carbon"];
  965. // CHECK:STDOUT:
  966. // CHECK:STDOUT: fn @Convert.4 = "int.convert_checked" [from "core.carbon"];
  967. // CHECK:STDOUT:
  968. // CHECK:STDOUT: fn @Convert.5 = "int.convert_checked" [from "core.carbon"];
  969. // CHECK:STDOUT:
  970. // CHECK:STDOUT: fn @__global_init() {
  971. // CHECK:STDOUT: !entry:
  972. // CHECK:STDOUT: %int_3.loc4_49: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  973. // CHECK:STDOUT: %int_4.loc4_52: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  974. // CHECK:STDOUT: %int_3.loc4_56: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
  975. // CHECK:STDOUT: %int_32.loc4_61: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  976. // CHECK:STDOUT: %int.make_type_signed.loc4_61: init type = call constants.%Int(%int_32.loc4_61) [concrete = constants.%i32.builtin]
  977. // CHECK:STDOUT: %.loc4_61.1: type = value_of_initializer %int.make_type_signed.loc4_61 [concrete = constants.%i32.builtin]
  978. // CHECK:STDOUT: %.loc4_61.2: type = converted %int.make_type_signed.loc4_61, %.loc4_61.1 [concrete = constants.%i32.builtin]
  979. // CHECK:STDOUT: %impl.elem0.loc4_58: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc]
  980. // CHECK:STDOUT: %bound_method.loc4_58: <bound method> = bound_method %int_3.loc4_56, %impl.elem0.loc4_58 [concrete = constants.%Convert.bound.94d]
  981. // CHECK:STDOUT: %int.convert_checked.loc4_58: init %i32.builtin = call %bound_method.loc4_58(%int_3.loc4_56) [concrete = constants.%int_3.a0f]
  982. // CHECK:STDOUT: %.loc4_58.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_58 [concrete = constants.%int_3.a0f]
  983. // CHECK:STDOUT: %.loc4_58.2: %i32.builtin = converted %int_3.loc4_56, %.loc4_58.1 [concrete = constants.%int_3.a0f]
  984. // CHECK:STDOUT: %int_4.loc4_69: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
  985. // CHECK:STDOUT: %int_32.loc4_74: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  986. // CHECK:STDOUT: %int.make_type_signed.loc4_74: init type = call constants.%Int(%int_32.loc4_74) [concrete = constants.%i32.builtin]
  987. // CHECK:STDOUT: %.loc4_74.1: type = value_of_initializer %int.make_type_signed.loc4_74 [concrete = constants.%i32.builtin]
  988. // CHECK:STDOUT: %.loc4_74.2: type = converted %int.make_type_signed.loc4_74, %.loc4_74.1 [concrete = constants.%i32.builtin]
  989. // CHECK:STDOUT: %impl.elem0.loc4_71: %.387 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Convert.5bc]
  990. // CHECK:STDOUT: %bound_method.loc4_71: <bound method> = bound_method %int_4.loc4_69, %impl.elem0.loc4_71 [concrete = constants.%Convert.bound.8fc]
  991. // CHECK:STDOUT: %int.convert_checked.loc4_71: init %i32.builtin = call %bound_method.loc4_71(%int_4.loc4_69) [concrete = constants.%int_4.4f1]
  992. // CHECK:STDOUT: %.loc4_71.1: %i32.builtin = value_of_initializer %int.convert_checked.loc4_71 [concrete = constants.%int_4.4f1]
  993. // CHECK:STDOUT: %.loc4_71.2: %i32.builtin = converted %int_4.loc4_69, %.loc4_71.1 [concrete = constants.%int_4.4f1]
  994. // CHECK:STDOUT: %impl.elem0.loc4_66: %.1e7 = impl_witness_access constants.%AddWith.impl_witness, element0 [concrete = constants.%Op.9d1]
  995. // CHECK:STDOUT: %bound_method.loc4_66: <bound method> = bound_method %.loc4_58.2, %impl.elem0.loc4_66 [concrete = constants.%Op.bound.703]
  996. // CHECK:STDOUT: %int.sadd: init %i32.builtin = call %bound_method.loc4_66(%.loc4_58.2, %.loc4_71.2) [concrete = constants.%int_7]
  997. // CHECK:STDOUT: %.loc4_78.1: %tuple.type = tuple_literal (%int_3.loc4_49, %int_4.loc4_52, %int.sadd)
  998. // CHECK:STDOUT: %impl.elem0.loc4_78.1: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5]
  999. // CHECK:STDOUT: %bound_method.loc4_78.1: <bound method> = bound_method %int_3.loc4_49, %impl.elem0.loc4_78.1 [concrete = constants.%Convert.bound.b6b]
  1000. // CHECK:STDOUT: %int.convert_checked.loc4_78.1: init %i32.builtin = call %bound_method.loc4_78.1(%int_3.loc4_49) [concrete = constants.%int_3.a0f]
  1001. // CHECK:STDOUT: %.loc4_78.2: init %i32.builtin = converted %int_3.loc4_49, %int.convert_checked.loc4_78.1 [concrete = constants.%int_3.a0f]
  1002. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  1003. // CHECK:STDOUT: %.loc4_78.3: ref %i32.builtin = array_index file.%arr.var, %int_0
  1004. // CHECK:STDOUT: %.loc4_78.4: init %i32.builtin = initialize_from %.loc4_78.2 to %.loc4_78.3 [concrete = constants.%int_3.a0f]
  1005. // CHECK:STDOUT: %impl.elem0.loc4_78.2: %.ec1 = impl_witness_access constants.%ImplicitAs.impl_witness.07a, element0 [concrete = constants.%Convert.cb5]
  1006. // CHECK:STDOUT: %bound_method.loc4_78.2: <bound method> = bound_method %int_4.loc4_52, %impl.elem0.loc4_78.2 [concrete = constants.%Convert.bound.626]
  1007. // CHECK:STDOUT: %int.convert_checked.loc4_78.2: init %i32.builtin = call %bound_method.loc4_78.2(%int_4.loc4_52) [concrete = constants.%int_4.4f1]
  1008. // CHECK:STDOUT: %.loc4_78.5: init %i32.builtin = converted %int_4.loc4_52, %int.convert_checked.loc4_78.2 [concrete = constants.%int_4.4f1]
  1009. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1010. // CHECK:STDOUT: %.loc4_78.6: ref %i32.builtin = array_index file.%arr.var, %int_1
  1011. // CHECK:STDOUT: %.loc4_78.7: init %i32.builtin = initialize_from %.loc4_78.5 to %.loc4_78.6 [concrete = constants.%int_4.4f1]
  1012. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  1013. // CHECK:STDOUT: %.loc4_78.8: ref %i32.builtin = array_index file.%arr.var, %int_2
  1014. // CHECK:STDOUT: %.loc4_78.9: init %i32.builtin = initialize_from %int.sadd to %.loc4_78.8 [concrete = constants.%int_7]
  1015. // CHECK:STDOUT: %.loc4_78.10: init %array_type = array_init (%.loc4_78.4, %.loc4_78.7, %.loc4_78.9) to file.%arr.var [concrete = constants.%array]
  1016. // CHECK:STDOUT: %.loc4_1: init %array_type = converted %.loc4_78.1, %.loc4_78.10 [concrete = constants.%array]
  1017. // CHECK:STDOUT: assign file.%arr.var, %.loc4_1
  1018. // CHECK:STDOUT: return
  1019. // CHECK:STDOUT: }
  1020. // CHECK:STDOUT:
  1021. // CHECK:STDOUT: specific @As(constants.%T) {
  1022. // CHECK:STDOUT: %T => constants.%T
  1023. // CHECK:STDOUT: }
  1024. // CHECK:STDOUT:
  1025. // CHECK:STDOUT: specific @Convert.1(constants.%T, constants.%Self.65a) {
  1026. // CHECK:STDOUT: %T => constants.%T
  1027. // CHECK:STDOUT: %As.type => constants.%As.type.eed
  1028. // CHECK:STDOUT: %Self => constants.%Self.65a
  1029. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.04d
  1030. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.ca4
  1031. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.7dc
  1032. // CHECK:STDOUT: }
  1033. // CHECK:STDOUT:
  1034. // CHECK:STDOUT: specific @As(constants.%i32.builtin) {
  1035. // CHECK:STDOUT: %T => constants.%i32.builtin
  1036. // CHECK:STDOUT:
  1037. // CHECK:STDOUT: !definition:
  1038. // CHECK:STDOUT: %As.type => constants.%As.type.a6d
  1039. // CHECK:STDOUT: %Self => constants.%Self.c25
  1040. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.378
  1041. // CHECK:STDOUT: %Convert => constants.%Convert.e51
  1042. // CHECK:STDOUT: %As.assoc_type => constants.%As.assoc_type.bc2
  1043. // CHECK:STDOUT: %assoc0 => constants.%assoc0.9fb
  1044. // CHECK:STDOUT: }
  1045. // CHECK:STDOUT:
  1046. // CHECK:STDOUT: specific @AddWith(constants.%T) {
  1047. // CHECK:STDOUT: %T => constants.%T
  1048. // CHECK:STDOUT: }
  1049. // CHECK:STDOUT:
  1050. // CHECK:STDOUT: specific @AddWith(constants.%i32.builtin) {
  1051. // CHECK:STDOUT: %T => constants.%i32.builtin
  1052. // CHECK:STDOUT:
  1053. // CHECK:STDOUT: !definition:
  1054. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.6f5
  1055. // CHECK:STDOUT: %Self => constants.%Self.ec3
  1056. // CHECK:STDOUT: %Op.type => constants.%Op.type.0b7
  1057. // CHECK:STDOUT: %Op => constants.%Op.9d6
  1058. // CHECK:STDOUT: %AddWith.assoc_type => constants.%AddWith.assoc_type.dff
  1059. // CHECK:STDOUT: %assoc0 => constants.%assoc0.7f1
  1060. // CHECK:STDOUT: }
  1061. // CHECK:STDOUT:
  1062. // CHECK:STDOUT: specific @Op.1(constants.%T, constants.%Self.6c1) {
  1063. // CHECK:STDOUT: %T => constants.%T
  1064. // CHECK:STDOUT: %AddWith.type => constants.%AddWith.type.6d3
  1065. // CHECK:STDOUT: %Self => constants.%Self.6c1
  1066. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.030
  1067. // CHECK:STDOUT: %pattern_type => constants.%pattern_type.7fc
  1068. // CHECK:STDOUT: }
  1069. // CHECK:STDOUT:
  1070. // CHECK:STDOUT: specific @ImplicitAs(constants.%T) {
  1071. // CHECK:STDOUT: %T => constants.%T
  1072. // CHECK:STDOUT: }
  1073. // CHECK:STDOUT:
  1074. // CHECK:STDOUT: specific @ImplicitAs(constants.%i32.builtin) {
  1075. // CHECK:STDOUT: %T => constants.%i32.builtin
  1076. // CHECK:STDOUT:
  1077. // CHECK:STDOUT: !definition:
  1078. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.61e
  1079. // CHECK:STDOUT: %Self => constants.%Self.d28
  1080. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.059
  1081. // CHECK:STDOUT: %Convert => constants.%Convert.4d7
  1082. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.398
  1083. // CHECK:STDOUT: %assoc0 => constants.%assoc0.6fd
  1084. // CHECK:STDOUT: }
  1085. // CHECK:STDOUT:
  1086. // CHECK:STDOUT: specific @Convert.2(constants.%T, constants.%Self.519) {
  1087. // CHECK:STDOUT: %T => constants.%T
  1088. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.d62
  1089. // CHECK:STDOUT: %Self => constants.%Self.519
  1090. // CHECK:STDOUT: %Self.as_type => constants.%Self.as_type.40a
  1091. // CHECK:STDOUT: %pattern_type.1 => constants.%pattern_type.f3e
  1092. // CHECK:STDOUT: %pattern_type.2 => constants.%pattern_type.7dc
  1093. // CHECK:STDOUT: }
  1094. // CHECK:STDOUT:
  1095. // CHECK:STDOUT: specific @ImplicitAs(Core.IntLiteral) {
  1096. // CHECK:STDOUT: %T => Core.IntLiteral
  1097. // CHECK:STDOUT:
  1098. // CHECK:STDOUT: !definition:
  1099. // CHECK:STDOUT: %ImplicitAs.type => constants.%ImplicitAs.type.2fd
  1100. // CHECK:STDOUT: %Self => constants.%Self.9ac
  1101. // CHECK:STDOUT: %Convert.type => constants.%Convert.type.71e
  1102. // CHECK:STDOUT: %Convert => constants.%Convert.0e2
  1103. // CHECK:STDOUT: %ImplicitAs.assoc_type => constants.%ImplicitAs.assoc_type.959
  1104. // CHECK:STDOUT: %assoc0 => constants.%assoc0.8c4
  1105. // CHECK:STDOUT: }
  1106. // CHECK:STDOUT: