builtins.llp64.carbon 123 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  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/full.carbon
  6. // EXTRA-ARGS: --target=x86_64-pc-windows-msvc --clang-arg=-fno-PIE
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/builtins.llp64.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/builtins.llp64.carbon
  13. // --- long_long.carbon
  14. library "[[@TEST_NAME]]";
  15. import Cpp;
  16. fn F() {
  17. //@dump-sem-ir-begin
  18. let cpp_long_long: Cpp.long_long = 1;
  19. let carbon_long_long: i64 = cpp_long_long;
  20. var a: array(f32, 1 as Cpp.long_long) = (1.0,);
  21. //@dump-sem-ir-end
  22. }
  23. // --- unsigned_long_long.carbon
  24. library "[[@TEST_NAME]]";
  25. import Cpp;
  26. fn F() {
  27. //@dump-sem-ir-begin
  28. let cpp_unsigned_long_long: Cpp.unsigned_long_long = 1;
  29. let carbon_unsigned_long_long: u64 = cpp_unsigned_long_long;
  30. var a: array(f32, 1 as Cpp.unsigned_long_long) = (1.0,);
  31. //@dump-sem-ir-end
  32. }
  33. // --- long.carbon
  34. library "[[@TEST_NAME]]";
  35. import Cpp inline
  36. '''
  37. class LongResult {};
  38. auto PassLong(long x) -> LongResult;
  39. class IntResult {};
  40. auto PassLong(int x) -> IntResult;
  41. ''';
  42. fn F() {
  43. //@dump-sem-ir-begin
  44. let cpp_long: Cpp.long = 1;
  45. let cpp_long_result: Cpp.LongResult = Cpp.PassLong(cpp_long);
  46. let cpp_compat_long: Core.CppCompat.Long32 = cpp_long;
  47. let cpp_compat_long_result: Cpp.LongResult = Cpp.PassLong(cpp_compat_long);
  48. let carbon_i32: i32 = cpp_long;
  49. let carbon_i32_result: Cpp.IntResult = Cpp.PassLong(carbon_i32);
  50. var a: array(f32, 1 as Cpp.long) = (1.0,);
  51. //@dump-sem-ir-end
  52. }
  53. // operators
  54. fn ArithmeticOperatorsLong() {
  55. //@dump-sem-ir-begin
  56. let x: Cpp.long = 1;
  57. let y: Cpp.long = 1;
  58. let a: Cpp.long = -x;
  59. let b: Cpp.long = x + y;
  60. let c: Cpp.long = x - y;
  61. let d: Cpp.long = x * y;
  62. let e: Cpp.long = x / y;
  63. let f: Cpp.long = x % y;
  64. //@dump-sem-ir-end
  65. }
  66. // --- fail_todo_bitwise_long.carbon
  67. library "[[@TEST_NAME]]";
  68. import Cpp;
  69. fn BitWiseOperatorsLong() {
  70. //@dump-sem-ir-begin
  71. let a: Cpp.long = 1;
  72. let b: Cpp.long = 1;
  73. // CHECK:STDERR: fail_todo_bitwise_long.carbon:[[@LINE+4]]:21: error: cannot access member of interface `Core.BitAndWith(Cpp.long)` in type `Cpp.long` that does not implement that interface [MissingImplInMemberAccess]
  74. // CHECK:STDERR: let c: Cpp.long = a & b;
  75. // CHECK:STDERR: ^~~~~
  76. // CHECK:STDERR:
  77. let c: Cpp.long = a & b;
  78. //@dump-sem-ir-end
  79. }
  80. // --- unsigned_long.carbon
  81. library "[[@TEST_NAME]]";
  82. import Cpp inline
  83. '''
  84. class ULongResult {};
  85. auto PassULong(unsigned long x) -> ULongResult;
  86. class UIntResult {};
  87. auto PassULong(unsigned int x) -> UIntResult;
  88. ''';
  89. fn F() {
  90. //@dump-sem-ir-begin
  91. let cpp_unsigned_long: Cpp.unsigned_long = 1;
  92. let cpp_unsigned_long_result: Cpp.ULongResult = Cpp.PassULong(cpp_unsigned_long);
  93. let cpp_compat_ulong: Core.CppCompat.ULong32 = cpp_unsigned_long;
  94. let cpp_compat_ulong_result: Cpp.ULongResult = Cpp.PassULong(cpp_compat_ulong);
  95. let carbon_u32: u32 = cpp_unsigned_long;
  96. let carbon_u32_result: Cpp.UIntResult = Cpp.PassULong(carbon_u32);
  97. var a: array(f32, 1 as Cpp.unsigned_long) = (1.0,);
  98. //@dump-sem-ir-end
  99. }
  100. // CHECK:STDOUT: --- long_long.carbon
  101. // CHECK:STDOUT:
  102. // CHECK:STDOUT: constants {
  103. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  104. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
  105. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  106. // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
  107. // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete]
  108. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  109. // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete]
  110. // CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete]
  111. // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  112. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.fe9) [symbolic]
  113. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
  114. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  115. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  116. // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
  117. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic]
  118. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic]
  119. // CHECK:STDOUT: %ImplicitAs.impl_witness.556: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
  120. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
  121. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete]
  122. // CHECK:STDOUT: %ImplicitAs.facet.d48: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete]
  123. // CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.d48 [concrete]
  124. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete]
  125. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete]
  126. // CHECK:STDOUT: %bound_method.288: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  127. // CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
  128. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  129. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  130. // CHECK:STDOUT: %As.type.229: type = facet_type <@As, @As(%i64)> [concrete]
  131. // CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete]
  132. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.09e: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic]
  133. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
  134. // CHECK:STDOUT: %As.impl_witness.c71: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  135. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.cee: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  136. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a54: %Core.IntLiteral.as.As.impl.Convert.type.cee = struct_value () [concrete]
  137. // CHECK:STDOUT: %As.facet: %As.type.229 = facet_value Core.IntLiteral, (%As.impl_witness.c71) [concrete]
  138. // CHECK:STDOUT: %.aba: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete]
  139. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a54 [concrete]
  140. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.a54, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete]
  141. // CHECK:STDOUT: %bound_method.41b: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  142. // CHECK:STDOUT: %ImplicitAs.impl_witness.e86: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.ea2, @Int.as.ImplicitAs.impl(%int_64) [concrete]
  143. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.ccf: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_64) [concrete]
  144. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.535: %Int.as.ImplicitAs.impl.Convert.type.ccf = struct_value () [concrete]
  145. // CHECK:STDOUT: %ImplicitAs.facet.234: %ImplicitAs.type.139 = facet_value %i64, (%ImplicitAs.impl_witness.e86) [concrete]
  146. // CHECK:STDOUT: %.3aa: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.234 [concrete]
  147. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.535 [concrete]
  148. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Int.as.ImplicitAs.impl.Convert.535, @Int.as.ImplicitAs.impl.Convert(%int_64) [concrete]
  149. // CHECK:STDOUT: %bound_method.d1e: <bound method> = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  150. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  151. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  152. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  153. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  154. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  155. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  156. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  157. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  158. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic]
  159. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  160. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  161. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  162. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  163. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  164. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  165. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  166. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  167. // CHECK:STDOUT: %bound_method.1e4: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  168. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  169. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  170. // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
  171. // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
  172. // CHECK:STDOUT: }
  173. // CHECK:STDOUT:
  174. // CHECK:STDOUT: imports {
  175. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  176. // CHECK:STDOUT: .long_long = @F.%i64.1
  177. // CHECK:STDOUT: import Cpp//...
  178. // CHECK:STDOUT: }
  179. // CHECK:STDOUT: %Core.import_ref.42d: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2)]
  180. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.74f = impl_witness_table (%Core.import_ref.42d), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  181. // CHECK:STDOUT: %Core.import_ref.0bc: @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert.type (%Int.as.ImplicitAs.impl.Convert.type.2ed) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.ImplicitAs.impl.%Int.as.ImplicitAs.impl.Convert (constants.%Int.as.ImplicitAs.impl.Convert.d29)]
  182. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.ea2 = impl_witness_table (%Core.import_ref.0bc), @Int.as.ImplicitAs.impl [concrete]
  183. // CHECK:STDOUT: %Core.import_ref.ca0: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.09e) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.dbe)]
  184. // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
  185. // CHECK:STDOUT: %Core.import_ref.38a: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0)]
  186. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  187. // CHECK:STDOUT: }
  188. // CHECK:STDOUT:
  189. // CHECK:STDOUT: fn @F() {
  190. // CHECK:STDOUT: !entry:
  191. // CHECK:STDOUT: name_binding_decl {
  192. // CHECK:STDOUT: %cpp_long_long.patt: %pattern_type.95b = value_binding_pattern cpp_long_long [concrete]
  193. // CHECK:STDOUT: }
  194. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  195. // CHECK:STDOUT: %.loc8_25: type = splice_block %long_long.ref.loc8 [concrete = constants.%i64] {
  196. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  197. // CHECK:STDOUT: <elided>
  198. // CHECK:STDOUT: %long_long.ref.loc8: type = name_ref long_long, %i64.1 [concrete = constants.%i64]
  199. // CHECK:STDOUT: }
  200. // CHECK:STDOUT: %impl.elem0.loc8: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
  201. // CHECK:STDOUT: %bound_method.loc8_38.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  202. // CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  203. // CHECK:STDOUT: %bound_method.loc8_38.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.288]
  204. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i64 = call %bound_method.loc8_38.2(%int_1.loc8) [concrete = constants.%int_1.41a]
  205. // CHECK:STDOUT: %.loc8_38.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.41a]
  206. // CHECK:STDOUT: %.loc8_38.2: %i64 = converted %int_1.loc8, %.loc8_38.1 [concrete = constants.%int_1.41a]
  207. // CHECK:STDOUT: %cpp_long_long: %i64 = value_binding cpp_long_long, %.loc8_38.2
  208. // CHECK:STDOUT: name_binding_decl {
  209. // CHECK:STDOUT: %carbon_long_long.patt: %pattern_type.95b = value_binding_pattern carbon_long_long [concrete]
  210. // CHECK:STDOUT: }
  211. // CHECK:STDOUT: %cpp_long_long.ref: %i64 = name_ref cpp_long_long, %cpp_long_long
  212. // CHECK:STDOUT: %.loc9: type = splice_block %i64.loc9 [concrete = constants.%i64] {
  213. // CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  214. // CHECK:STDOUT: %i64.loc9: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
  215. // CHECK:STDOUT: }
  216. // CHECK:STDOUT: %carbon_long_long: %i64 = value_binding carbon_long_long, %cpp_long_long.ref
  217. // CHECK:STDOUT: name_binding_decl {
  218. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  219. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  220. // CHECK:STDOUT: }
  221. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  222. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  223. // CHECK:STDOUT: %.loc11_48.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  224. // CHECK:STDOUT: %impl.elem0.loc11_48: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
  225. // CHECK:STDOUT: %bound_method.loc11_48.1: <bound method> = bound_method %float, %impl.elem0.loc11_48 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
  226. // CHECK:STDOUT: %specific_fn.loc11_48: <specific function> = specific_function %impl.elem0.loc11_48, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  227. // CHECK:STDOUT: %bound_method.loc11_48.2: <bound method> = bound_method %float, %specific_fn.loc11_48 [concrete = constants.%bound_method.1e4]
  228. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_48.2(%float) [concrete = constants.%float.e3b]
  229. // CHECK:STDOUT: %.loc11_48.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  230. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  231. // CHECK:STDOUT: %.loc11_48.3: ref %f32.97e = array_index %a.var, %int_0
  232. // CHECK:STDOUT: %.loc11_48.4: init %f32.97e = initialize_from %.loc11_48.2 to %.loc11_48.3 [concrete = constants.%float.e3b]
  233. // CHECK:STDOUT: %.loc11_48.5: init %array_type = array_init (%.loc11_48.4) to %a.var [concrete = constants.%array]
  234. // CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_48.1, %.loc11_48.5 [concrete = constants.%array]
  235. // CHECK:STDOUT: assign %a.var, %.loc11_3
  236. // CHECK:STDOUT: %.loc11_39: type = splice_block %array_type [concrete = constants.%array_type] {
  237. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  238. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  239. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  240. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  241. // CHECK:STDOUT: %long_long.ref.loc11: type = name_ref long_long, %i64.1 [concrete = constants.%i64]
  242. // CHECK:STDOUT: %impl.elem0.loc11_23.1: %.aba = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54]
  243. // CHECK:STDOUT: %bound_method.loc11_23.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
  244. // CHECK:STDOUT: %specific_fn.loc11_23.1: <specific function> = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
  245. // CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.41b]
  246. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.41a]
  247. // CHECK:STDOUT: %.loc11_23.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
  248. // CHECK:STDOUT: %.loc11_23.2: %i64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.41a]
  249. // CHECK:STDOUT: %impl.elem0.loc11_23.2: %.3aa = impl_witness_access constants.%ImplicitAs.impl_witness.e86, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.535]
  250. // CHECK:STDOUT: %bound_method.loc11_23.3: <bound method> = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound]
  251. // CHECK:STDOUT: %specific_fn.loc11_23.2: <specific function> = specific_function %impl.elem0.loc11_23.2, @Int.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
  252. // CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.d1e]
  253. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_23.4(%.loc11_23.2) [concrete = constants.%int_1.5b8]
  254. // CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
  255. // CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
  256. // CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  259. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
  260. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  261. // CHECK:STDOUT: <elided>
  262. // CHECK:STDOUT: }
  263. // CHECK:STDOUT:
  264. // CHECK:STDOUT: fn @DestroyOp(%self.param: %array_type) = "no_op";
  265. // CHECK:STDOUT:
  266. // CHECK:STDOUT: --- unsigned_long_long.carbon
  267. // CHECK:STDOUT:
  268. // CHECK:STDOUT: constants {
  269. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  270. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
  271. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  272. // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete]
  273. // CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete]
  274. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  275. // CHECK:STDOUT: %ImplicitAs.type.584: type = facet_type <@ImplicitAs, @ImplicitAs(%u64)> [concrete]
  276. // CHECK:STDOUT: %ImplicitAs.Convert.type.c65: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u64) [concrete]
  277. // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  278. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To.fe9) [symbolic]
  279. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic]
  280. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  281. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  282. // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
  283. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.7f8: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%From) [symbolic]
  284. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.0ea: %UInt.as.ImplicitAs.impl.Convert.type.7f8 = struct_value () [symbolic]
  285. // CHECK:STDOUT: %ImplicitAs.impl_witness.bb3: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.899, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
  286. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fb8: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
  287. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.042: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fb8 = struct_value () [concrete]
  288. // CHECK:STDOUT: %ImplicitAs.facet.dfe: %ImplicitAs.type.584 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bb3) [concrete]
  289. // CHECK:STDOUT: %.da7: type = fn_type_with_self_type %ImplicitAs.Convert.type.c65, %ImplicitAs.facet.dfe [concrete]
  290. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.042 [concrete]
  291. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.042, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_64) [concrete]
  292. // CHECK:STDOUT: %bound_method.fec: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  293. // CHECK:STDOUT: %int_1.f23: %u64 = int_value 1 [concrete]
  294. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  295. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  296. // CHECK:STDOUT: %As.type.f20: type = facet_type <@As, @As(%u64)> [concrete]
  297. // CHECK:STDOUT: %As.Convert.type.7eb: type = fn_type @As.Convert, @As(%u64) [concrete]
  298. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.2b1: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%To.fe9) [symbolic]
  299. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.979: %Core.IntLiteral.as.As.impl.Convert.type.2b1 = struct_value () [symbolic]
  300. // CHECK:STDOUT: %As.impl_witness.f54: <witness> = impl_witness imports.%As.impl_witness_table.7eb, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  301. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.0f2: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  302. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.715: %Core.IntLiteral.as.As.impl.Convert.type.0f2 = struct_value () [concrete]
  303. // CHECK:STDOUT: %As.facet: %As.type.f20 = facet_value Core.IntLiteral, (%As.impl_witness.f54) [concrete]
  304. // CHECK:STDOUT: %.11a: type = fn_type_with_self_type %As.Convert.type.7eb, %As.facet [concrete]
  305. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.715 [concrete]
  306. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.715, @Core.IntLiteral.as.As.impl.Convert(%int_64) [concrete]
  307. // CHECK:STDOUT: %bound_method.9cf: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  308. // CHECK:STDOUT: %ImplicitAs.impl_witness.2cc: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.493, @UInt.as.ImplicitAs.impl(%int_64) [concrete]
  309. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.812: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%int_64) [concrete]
  310. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.309: %UInt.as.ImplicitAs.impl.Convert.type.812 = struct_value () [concrete]
  311. // CHECK:STDOUT: %ImplicitAs.facet.02d: %ImplicitAs.type.139 = facet_value %u64, (%ImplicitAs.impl_witness.2cc) [concrete]
  312. // CHECK:STDOUT: %.a1c: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.02d [concrete]
  313. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.309 [concrete]
  314. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %UInt.as.ImplicitAs.impl.Convert.309, @UInt.as.ImplicitAs.impl.Convert(%int_64) [concrete]
  315. // CHECK:STDOUT: %bound_method.f18: <bound method> = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  316. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  317. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  318. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  319. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  320. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  321. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  322. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  323. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  324. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic]
  325. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  326. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  327. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  328. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  329. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  330. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  331. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  332. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  333. // CHECK:STDOUT: %bound_method.1e4: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  334. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  335. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  336. // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
  337. // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
  338. // CHECK:STDOUT: }
  339. // CHECK:STDOUT:
  340. // CHECK:STDOUT: imports {
  341. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  342. // CHECK:STDOUT: .unsigned_long_long = @F.%u64.1
  343. // CHECK:STDOUT: import Cpp//...
  344. // CHECK:STDOUT: }
  345. // CHECK:STDOUT: %Core.import_ref.741: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.46e)]
  346. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.899 = impl_witness_table (%Core.import_ref.741), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  347. // CHECK:STDOUT: %Core.import_ref.483: @UInt.as.ImplicitAs.impl.%UInt.as.ImplicitAs.impl.Convert.type (%UInt.as.ImplicitAs.impl.Convert.type.7f8) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @UInt.as.ImplicitAs.impl.%UInt.as.ImplicitAs.impl.Convert (constants.%UInt.as.ImplicitAs.impl.Convert.0ea)]
  348. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.493 = impl_witness_table (%Core.import_ref.483), @UInt.as.ImplicitAs.impl [concrete]
  349. // CHECK:STDOUT: %Core.import_ref.600: @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert.type (%Core.IntLiteral.as.As.impl.Convert.type.2b1) = import_ref Core//prelude/types/uint, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.As.impl.%Core.IntLiteral.as.As.impl.Convert (constants.%Core.IntLiteral.as.As.impl.Convert.979)]
  350. // CHECK:STDOUT: %As.impl_witness_table.7eb = impl_witness_table (%Core.import_ref.600), @Core.IntLiteral.as.As.impl [concrete]
  351. // CHECK:STDOUT: %Core.import_ref.38a: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0)]
  352. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  353. // CHECK:STDOUT: }
  354. // CHECK:STDOUT:
  355. // CHECK:STDOUT: fn @F() {
  356. // CHECK:STDOUT: !entry:
  357. // CHECK:STDOUT: name_binding_decl {
  358. // CHECK:STDOUT: %cpp_unsigned_long_long.patt: %pattern_type.157 = value_binding_pattern cpp_unsigned_long_long [concrete]
  359. // CHECK:STDOUT: }
  360. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  361. // CHECK:STDOUT: %.loc8_34: type = splice_block %unsigned_long_long.ref.loc8 [concrete = constants.%u64] {
  362. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  363. // CHECK:STDOUT: <elided>
  364. // CHECK:STDOUT: %unsigned_long_long.ref.loc8: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64]
  365. // CHECK:STDOUT: }
  366. // CHECK:STDOUT: %impl.elem0.loc8: %.da7 = impl_witness_access constants.%ImplicitAs.impl_witness.bb3, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.042]
  367. // CHECK:STDOUT: %bound_method.loc8_56.1: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  368. // CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  369. // CHECK:STDOUT: %bound_method.loc8_56.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.fec]
  370. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %u64 = call %bound_method.loc8_56.2(%int_1.loc8) [concrete = constants.%int_1.f23]
  371. // CHECK:STDOUT: %.loc8_56.1: %u64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.f23]
  372. // CHECK:STDOUT: %.loc8_56.2: %u64 = converted %int_1.loc8, %.loc8_56.1 [concrete = constants.%int_1.f23]
  373. // CHECK:STDOUT: %cpp_unsigned_long_long: %u64 = value_binding cpp_unsigned_long_long, %.loc8_56.2
  374. // CHECK:STDOUT: name_binding_decl {
  375. // CHECK:STDOUT: %carbon_unsigned_long_long.patt: %pattern_type.157 = value_binding_pattern carbon_unsigned_long_long [concrete]
  376. // CHECK:STDOUT: }
  377. // CHECK:STDOUT: %cpp_unsigned_long_long.ref: %u64 = name_ref cpp_unsigned_long_long, %cpp_unsigned_long_long
  378. // CHECK:STDOUT: %.loc9: type = splice_block %u64.loc9 [concrete = constants.%u64] {
  379. // CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  380. // CHECK:STDOUT: %u64.loc9: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
  381. // CHECK:STDOUT: }
  382. // CHECK:STDOUT: %carbon_unsigned_long_long: %u64 = value_binding carbon_unsigned_long_long, %cpp_unsigned_long_long.ref
  383. // CHECK:STDOUT: name_binding_decl {
  384. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  385. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  386. // CHECK:STDOUT: }
  387. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  388. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  389. // CHECK:STDOUT: %.loc11_57.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  390. // CHECK:STDOUT: %impl.elem0.loc11_57: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
  391. // CHECK:STDOUT: %bound_method.loc11_57.1: <bound method> = bound_method %float, %impl.elem0.loc11_57 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
  392. // CHECK:STDOUT: %specific_fn.loc11_57: <specific function> = specific_function %impl.elem0.loc11_57, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  393. // CHECK:STDOUT: %bound_method.loc11_57.2: <bound method> = bound_method %float, %specific_fn.loc11_57 [concrete = constants.%bound_method.1e4]
  394. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_57.2(%float) [concrete = constants.%float.e3b]
  395. // CHECK:STDOUT: %.loc11_57.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  396. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  397. // CHECK:STDOUT: %.loc11_57.3: ref %f32.97e = array_index %a.var, %int_0
  398. // CHECK:STDOUT: %.loc11_57.4: init %f32.97e = initialize_from %.loc11_57.2 to %.loc11_57.3 [concrete = constants.%float.e3b]
  399. // CHECK:STDOUT: %.loc11_57.5: init %array_type = array_init (%.loc11_57.4) to %a.var [concrete = constants.%array]
  400. // CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_57.1, %.loc11_57.5 [concrete = constants.%array]
  401. // CHECK:STDOUT: assign %a.var, %.loc11_3
  402. // CHECK:STDOUT: %.loc11_48: type = splice_block %array_type [concrete = constants.%array_type] {
  403. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  404. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  405. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  406. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  407. // CHECK:STDOUT: %unsigned_long_long.ref.loc11: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64]
  408. // CHECK:STDOUT: %impl.elem0.loc11_23.1: %.11a = impl_witness_access constants.%As.impl_witness.f54, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.715]
  409. // CHECK:STDOUT: %bound_method.loc11_23.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
  410. // CHECK:STDOUT: %specific_fn.loc11_23.1: <specific function> = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
  411. // CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.9cf]
  412. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.f23]
  413. // CHECK:STDOUT: %.loc11_23.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
  414. // CHECK:STDOUT: %.loc11_23.2: %u64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.f23]
  415. // CHECK:STDOUT: %impl.elem0.loc11_23.2: %.a1c = impl_witness_access constants.%ImplicitAs.impl_witness.2cc, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.309]
  416. // CHECK:STDOUT: %bound_method.loc11_23.3: <bound method> = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.bound]
  417. // CHECK:STDOUT: %specific_fn.loc11_23.2: <specific function> = specific_function %impl.elem0.loc11_23.2, @UInt.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.specific_fn]
  418. // CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.f18]
  419. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_23.4(%.loc11_23.2) [concrete = constants.%int_1.5b8]
  420. // CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
  421. // CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
  422. // CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
  423. // CHECK:STDOUT: }
  424. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  425. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
  426. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  427. // CHECK:STDOUT: <elided>
  428. // CHECK:STDOUT: }
  429. // CHECK:STDOUT:
  430. // CHECK:STDOUT: fn @DestroyOp(%self.param: %array_type) = "no_op";
  431. // CHECK:STDOUT:
  432. // CHECK:STDOUT: --- long.carbon
  433. // CHECK:STDOUT:
  434. // CHECK:STDOUT: constants {
  435. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  436. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  437. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  438. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  439. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  440. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  441. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  442. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  443. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  444. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  445. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  446. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  447. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  448. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  449. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  450. // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  451. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  452. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  453. // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  454. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete]
  455. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete]
  456. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = struct_value () [concrete]
  457. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a [concrete]
  458. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  459. // CHECK:STDOUT: %LongResult: type = class_type @LongResult [concrete]
  460. // CHECK:STDOUT: %pattern_type.cd9: type = pattern_type %LongResult [concrete]
  461. // CHECK:STDOUT: %PassLong.cpp_overload_set.type: type = cpp_overload_set_type @PassLong.cpp_overload_set [concrete]
  462. // CHECK:STDOUT: %PassLong.cpp_overload_set.value: %PassLong.cpp_overload_set.type = cpp_overload_set_value @PassLong.cpp_overload_set [concrete]
  463. // CHECK:STDOUT: %ptr.305: type = ptr_type %LongResult [concrete]
  464. // CHECK:STDOUT: %PassLong__carbon_thunk.type.9d9430.1: type = fn_type @PassLong__carbon_thunk.1 [concrete]
  465. // CHECK:STDOUT: %PassLong__carbon_thunk.58a8f3.1: %PassLong__carbon_thunk.type.9d9430.1 = struct_value () [concrete]
  466. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  467. // CHECK:STDOUT: %ImplicitAs.impl_witness.925: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.c80 [concrete]
  468. // CHECK:STDOUT: %ImplicitAs.facet.96f: %ImplicitAs.type.e8c = facet_value %Cpp.long, (%ImplicitAs.impl_witness.925) [concrete]
  469. // CHECK:STDOUT: %.79c: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.96f [concrete]
  470. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.796: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.1 [concrete]
  471. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.3eb: %Cpp.long.as.ImplicitAs.impl.Convert.type.796 = struct_value () [concrete]
  472. // CHECK:STDOUT: %IntResult: type = class_type @IntResult [concrete]
  473. // CHECK:STDOUT: %pattern_type.454: type = pattern_type %IntResult [concrete]
  474. // CHECK:STDOUT: %ptr.3cb: type = ptr_type %IntResult [concrete]
  475. // CHECK:STDOUT: %PassLong__carbon_thunk.type.9d9430.2: type = fn_type @PassLong__carbon_thunk.2 [concrete]
  476. // CHECK:STDOUT: %PassLong__carbon_thunk.58a8f3.2: %PassLong__carbon_thunk.type.9d9430.2 = struct_value () [concrete]
  477. // CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
  478. // CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
  479. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  480. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  481. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  482. // CHECK:STDOUT: %As.type.508: type = facet_type <@As, @As(%Cpp.long)> [concrete]
  483. // CHECK:STDOUT: %As.Convert.type.229: type = fn_type @As.Convert, @As(%Cpp.long) [concrete]
  484. // CHECK:STDOUT: %As.impl_witness.60c: <witness> = impl_witness imports.%As.impl_witness_table.797 [concrete]
  485. // CHECK:STDOUT: %As.facet: %As.type.508 = facet_value Core.IntLiteral, (%As.impl_witness.60c) [concrete]
  486. // CHECK:STDOUT: %.040: type = fn_type_with_self_type %As.Convert.type.229, %As.facet [concrete]
  487. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
  488. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
  489. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete]
  490. // CHECK:STDOUT: %ImplicitAs.impl_witness.e4d: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a09 [concrete]
  491. // CHECK:STDOUT: %ImplicitAs.facet.772: %ImplicitAs.type.139 = facet_value %Cpp.long, (%ImplicitAs.impl_witness.e4d) [concrete]
  492. // CHECK:STDOUT: %.8e3: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.772 [concrete]
  493. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.9ed: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.2 [concrete]
  494. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.d49: %Cpp.long.as.ImplicitAs.impl.Convert.type.9ed = struct_value () [concrete]
  495. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5a4, %Cpp.long.as.ImplicitAs.impl.Convert.d49 [concrete]
  496. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  497. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  498. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  499. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  500. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  501. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  502. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  503. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  504. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic]
  505. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  506. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  507. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  508. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  509. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  510. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  511. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  512. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  513. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  514. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  515. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  516. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  517. // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc24 [concrete]
  518. // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete]
  519. // CHECK:STDOUT: %IntResult.cpp_destructor.type: type = fn_type @IntResult.cpp_destructor [concrete]
  520. // CHECK:STDOUT: %IntResult.cpp_destructor: %IntResult.cpp_destructor.type = struct_value () [concrete]
  521. // CHECK:STDOUT: %LongResult.cpp_destructor.type: type = fn_type @LongResult.cpp_destructor [concrete]
  522. // CHECK:STDOUT: %LongResult.cpp_destructor: %LongResult.cpp_destructor.type = struct_value () [concrete]
  523. // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete]
  524. // CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete]
  525. // CHECK:STDOUT: %Negate.impl_witness: <witness> = impl_witness imports.%Negate.impl_witness_table [concrete]
  526. // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %Cpp.long, (%Negate.impl_witness) [concrete]
  527. // CHECK:STDOUT: %.494: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete]
  528. // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op.type: type = fn_type @Cpp.long.as.Negate.impl.Op [concrete]
  529. // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op: %Cpp.long.as.Negate.impl.Op.type = struct_value () [concrete]
  530. // CHECK:STDOUT: %AddWith.type.e05: type = generic_interface_type @AddWith [concrete]
  531. // CHECK:STDOUT: %AddWith.generic: %AddWith.type.e05 = struct_value () [concrete]
  532. // CHECK:STDOUT: %AddWith.type.9c2: type = facet_type <@AddWith, @AddWith(%Cpp.long)> [concrete]
  533. // CHECK:STDOUT: %AddWith.Op.type.9a6: type = fn_type @AddWith.Op, @AddWith(%Cpp.long) [concrete]
  534. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness imports.%AddWith.impl_witness_table [concrete]
  535. // CHECK:STDOUT: %AddWith.facet: %AddWith.type.9c2 = facet_value %Cpp.long, (%AddWith.impl_witness) [concrete]
  536. // CHECK:STDOUT: %.a81: type = fn_type_with_self_type %AddWith.Op.type.9a6, %AddWith.facet [concrete]
  537. // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.type: type = fn_type @Cpp.long.as.AddWith.impl.Op [concrete]
  538. // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op: %Cpp.long.as.AddWith.impl.Op.type = struct_value () [concrete]
  539. // CHECK:STDOUT: %SubWith.type.378: type = generic_interface_type @SubWith [concrete]
  540. // CHECK:STDOUT: %SubWith.generic: %SubWith.type.378 = struct_value () [concrete]
  541. // CHECK:STDOUT: %SubWith.type.e8e: type = facet_type <@SubWith, @SubWith(%Cpp.long)> [concrete]
  542. // CHECK:STDOUT: %SubWith.Op.type.533: type = fn_type @SubWith.Op, @SubWith(%Cpp.long) [concrete]
  543. // CHECK:STDOUT: %SubWith.impl_witness: <witness> = impl_witness imports.%SubWith.impl_witness_table [concrete]
  544. // CHECK:STDOUT: %SubWith.facet: %SubWith.type.e8e = facet_value %Cpp.long, (%SubWith.impl_witness) [concrete]
  545. // CHECK:STDOUT: %.70d: type = fn_type_with_self_type %SubWith.Op.type.533, %SubWith.facet [concrete]
  546. // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.type: type = fn_type @Cpp.long.as.SubWith.impl.Op [concrete]
  547. // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op: %Cpp.long.as.SubWith.impl.Op.type = struct_value () [concrete]
  548. // CHECK:STDOUT: %MulWith.type.8b4: type = generic_interface_type @MulWith [concrete]
  549. // CHECK:STDOUT: %MulWith.generic: %MulWith.type.8b4 = struct_value () [concrete]
  550. // CHECK:STDOUT: %MulWith.type.a32: type = facet_type <@MulWith, @MulWith(%Cpp.long)> [concrete]
  551. // CHECK:STDOUT: %MulWith.Op.type.44b: type = fn_type @MulWith.Op, @MulWith(%Cpp.long) [concrete]
  552. // CHECK:STDOUT: %MulWith.impl_witness: <witness> = impl_witness imports.%MulWith.impl_witness_table [concrete]
  553. // CHECK:STDOUT: %MulWith.facet: %MulWith.type.a32 = facet_value %Cpp.long, (%MulWith.impl_witness) [concrete]
  554. // CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %MulWith.Op.type.44b, %MulWith.facet [concrete]
  555. // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.type: type = fn_type @Cpp.long.as.MulWith.impl.Op [concrete]
  556. // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op: %Cpp.long.as.MulWith.impl.Op.type = struct_value () [concrete]
  557. // CHECK:STDOUT: %DivWith.type.fc9: type = generic_interface_type @DivWith [concrete]
  558. // CHECK:STDOUT: %DivWith.generic: %DivWith.type.fc9 = struct_value () [concrete]
  559. // CHECK:STDOUT: %DivWith.type.0c0: type = facet_type <@DivWith, @DivWith(%Cpp.long)> [concrete]
  560. // CHECK:STDOUT: %DivWith.Op.type.494: type = fn_type @DivWith.Op, @DivWith(%Cpp.long) [concrete]
  561. // CHECK:STDOUT: %DivWith.impl_witness: <witness> = impl_witness imports.%DivWith.impl_witness_table [concrete]
  562. // CHECK:STDOUT: %DivWith.facet: %DivWith.type.0c0 = facet_value %Cpp.long, (%DivWith.impl_witness) [concrete]
  563. // CHECK:STDOUT: %.22b: type = fn_type_with_self_type %DivWith.Op.type.494, %DivWith.facet [concrete]
  564. // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.type: type = fn_type @Cpp.long.as.DivWith.impl.Op [concrete]
  565. // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op: %Cpp.long.as.DivWith.impl.Op.type = struct_value () [concrete]
  566. // CHECK:STDOUT: %ModWith.type.ff8: type = generic_interface_type @ModWith [concrete]
  567. // CHECK:STDOUT: %ModWith.generic: %ModWith.type.ff8 = struct_value () [concrete]
  568. // CHECK:STDOUT: %ModWith.type.2fc: type = facet_type <@ModWith, @ModWith(%Cpp.long)> [concrete]
  569. // CHECK:STDOUT: %ModWith.Op.type.c13: type = fn_type @ModWith.Op, @ModWith(%Cpp.long) [concrete]
  570. // CHECK:STDOUT: %ModWith.impl_witness: <witness> = impl_witness imports.%ModWith.impl_witness_table [concrete]
  571. // CHECK:STDOUT: %ModWith.facet: %ModWith.type.2fc = facet_value %Cpp.long, (%ModWith.impl_witness) [concrete]
  572. // CHECK:STDOUT: %.300: type = fn_type_with_self_type %ModWith.Op.type.c13, %ModWith.facet [concrete]
  573. // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.type: type = fn_type @Cpp.long.as.ModWith.impl.Op [concrete]
  574. // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op: %Cpp.long.as.ModWith.impl.Op.type = struct_value () [concrete]
  575. // CHECK:STDOUT: }
  576. // CHECK:STDOUT:
  577. // CHECK:STDOUT: imports {
  578. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  579. // CHECK:STDOUT: .CppCompat = %CppCompat.4b4
  580. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  581. // CHECK:STDOUT: .Int = %Core.Int
  582. // CHECK:STDOUT: .Float = %Core.Float
  583. // CHECK:STDOUT: .As = %Core.As
  584. // CHECK:STDOUT: .Destroy = %Core.Destroy
  585. // CHECK:STDOUT: .Negate = %Core.Negate
  586. // CHECK:STDOUT: .AddWith = %Core.AddWith
  587. // CHECK:STDOUT: .SubWith = %Core.SubWith
  588. // CHECK:STDOUT: .MulWith = %Core.MulWith
  589. // CHECK:STDOUT: .DivWith = %Core.DivWith
  590. // CHECK:STDOUT: .ModWith = %Core.ModWith
  591. // CHECK:STDOUT: import Core//prelude
  592. // CHECK:STDOUT: import Core//prelude/...
  593. // CHECK:STDOUT: }
  594. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  595. // CHECK:STDOUT: .long = constants.%Cpp.long
  596. // CHECK:STDOUT: .LongResult = %LongResult.decl
  597. // CHECK:STDOUT: .PassLong = %PassLong.cpp_overload_set.value
  598. // CHECK:STDOUT: .IntResult = %IntResult.decl
  599. // CHECK:STDOUT: import Cpp//...
  600. // CHECK:STDOUT: }
  601. // CHECK:STDOUT: %Core.CppCompat: <namespace> = import_ref Core//prelude, CppCompat, loaded
  602. // CHECK:STDOUT: %CppCompat.4b4: <namespace> = namespace %Core.CppCompat, [concrete] {
  603. // CHECK:STDOUT: .Long32 = %Core.Long32
  604. // CHECK:STDOUT: import Core//prelude
  605. // CHECK:STDOUT: import Core//prelude/...
  606. // CHECK:STDOUT: }
  607. // CHECK:STDOUT: %Core.Long32: type = import_ref Core//prelude/types/cpp/int, Long32, loaded [concrete = constants.%Cpp.long]
  608. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  609. // CHECK:STDOUT: %Core.import_ref.b8a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a]
  610. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  611. // CHECK:STDOUT: %LongResult.decl: type = class_decl @LongResult [concrete = constants.%LongResult] {} {}
  612. // CHECK:STDOUT: %PassLong.cpp_overload_set.value: %PassLong.cpp_overload_set.type = cpp_overload_set_value @PassLong.cpp_overload_set [concrete = constants.%PassLong.cpp_overload_set.value]
  613. // CHECK:STDOUT: %PassLong__carbon_thunk.decl.d16229.1: %PassLong__carbon_thunk.type.9d9430.1 = fn_decl @PassLong__carbon_thunk.1 [concrete = constants.%PassLong__carbon_thunk.58a8f3.1] {
  614. // CHECK:STDOUT: <elided>
  615. // CHECK:STDOUT: } {
  616. // CHECK:STDOUT: <elided>
  617. // CHECK:STDOUT: }
  618. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  619. // CHECK:STDOUT: %Core.import_ref.946: %Cpp.long.as.ImplicitAs.impl.Convert.type.796 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.3eb]
  620. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.c80 = impl_witness_table (%Core.import_ref.946), @Cpp.long.as.ImplicitAs.impl.9f8 [concrete]
  621. // CHECK:STDOUT: %IntResult.decl: type = class_decl @IntResult [concrete = constants.%IntResult] {} {}
  622. // CHECK:STDOUT: %PassLong__carbon_thunk.decl.d16229.2: %PassLong__carbon_thunk.type.9d9430.2 = fn_decl @PassLong__carbon_thunk.2 [concrete = constants.%PassLong__carbon_thunk.58a8f3.2] {
  623. // CHECK:STDOUT: <elided>
  624. // CHECK:STDOUT: } {
  625. // CHECK:STDOUT: <elided>
  626. // CHECK:STDOUT: }
  627. // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types/float, Float, loaded [concrete = constants.%Float.generic]
  628. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
  629. // CHECK:STDOUT: %Core.import_ref.686: %Core.IntLiteral.as.As.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  630. // CHECK:STDOUT: %As.impl_witness_table.797 = impl_witness_table (%Core.import_ref.686), @Core.IntLiteral.as.As.impl.a00 [concrete]
  631. // CHECK:STDOUT: %Core.import_ref.168: %Cpp.long.as.ImplicitAs.impl.Convert.type.9ed = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.d49]
  632. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a09 = impl_witness_table (%Core.import_ref.168), @Cpp.long.as.ImplicitAs.impl.e94 [concrete]
  633. // CHECK:STDOUT: %Core.import_ref.38a: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0)]
  634. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  635. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  636. // CHECK:STDOUT: %Core.Negate: type = import_ref Core//prelude/operators/arithmetic, Negate, loaded [concrete = constants.%Negate.type]
  637. // CHECK:STDOUT: %Core.import_ref.cb912f.1 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  638. // CHECK:STDOUT: %Core.import_ref.412: %Cpp.long.as.Negate.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.Negate.impl.Op]
  639. // CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.1, %Core.import_ref.412), @Cpp.long.as.Negate.impl [concrete]
  640. // CHECK:STDOUT: %Core.AddWith: %AddWith.type.e05 = import_ref Core//prelude/operators/arithmetic, AddWith, loaded [concrete = constants.%AddWith.generic]
  641. // CHECK:STDOUT: %Core.import_ref.cb912f.2 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  642. // CHECK:STDOUT: %Core.import_ref.437: %Cpp.long.as.AddWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.AddWith.impl.Op]
  643. // CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.2, %Core.import_ref.437), @Cpp.long.as.AddWith.impl [concrete]
  644. // CHECK:STDOUT: %Core.SubWith: %SubWith.type.378 = import_ref Core//prelude/operators/arithmetic, SubWith, loaded [concrete = constants.%SubWith.generic]
  645. // CHECK:STDOUT: %Core.import_ref.cb912f.3 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  646. // CHECK:STDOUT: %Core.import_ref.51f: %Cpp.long.as.SubWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.SubWith.impl.Op]
  647. // CHECK:STDOUT: %SubWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.3, %Core.import_ref.51f), @Cpp.long.as.SubWith.impl [concrete]
  648. // CHECK:STDOUT: %Core.MulWith: %MulWith.type.8b4 = import_ref Core//prelude/operators/arithmetic, MulWith, loaded [concrete = constants.%MulWith.generic]
  649. // CHECK:STDOUT: %Core.import_ref.cb912f.4 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  650. // CHECK:STDOUT: %Core.import_ref.ec4: %Cpp.long.as.MulWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.MulWith.impl.Op]
  651. // CHECK:STDOUT: %MulWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.4, %Core.import_ref.ec4), @Cpp.long.as.MulWith.impl [concrete]
  652. // CHECK:STDOUT: %Core.DivWith: %DivWith.type.fc9 = import_ref Core//prelude/operators/arithmetic, DivWith, loaded [concrete = constants.%DivWith.generic]
  653. // CHECK:STDOUT: %Core.import_ref.cb912f.5 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  654. // CHECK:STDOUT: %Core.import_ref.d85: %Cpp.long.as.DivWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.DivWith.impl.Op]
  655. // CHECK:STDOUT: %DivWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.5, %Core.import_ref.d85), @Cpp.long.as.DivWith.impl [concrete]
  656. // CHECK:STDOUT: %Core.ModWith: %ModWith.type.ff8 = import_ref Core//prelude/operators/arithmetic, ModWith, loaded [concrete = constants.%ModWith.generic]
  657. // CHECK:STDOUT: %Core.import_ref.cb912f.6 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  658. // CHECK:STDOUT: %Core.import_ref.394: %Cpp.long.as.ModWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.ModWith.impl.Op]
  659. // CHECK:STDOUT: %ModWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.6, %Core.import_ref.394), @Cpp.long.as.ModWith.impl [concrete]
  660. // CHECK:STDOUT: }
  661. // CHECK:STDOUT:
  662. // CHECK:STDOUT: fn @F() {
  663. // CHECK:STDOUT: !entry:
  664. // CHECK:STDOUT: name_binding_decl {
  665. // CHECK:STDOUT: %cpp_long.patt: %pattern_type.68c = value_binding_pattern cpp_long [concrete]
  666. // CHECK:STDOUT: }
  667. // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  668. // CHECK:STDOUT: %.loc15_20: type = splice_block %long.ref.loc15 [concrete = constants.%Cpp.long] {
  669. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  670. // CHECK:STDOUT: %long.ref.loc15: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  671. // CHECK:STDOUT: }
  672. // CHECK:STDOUT: %impl.elem0.loc15: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a]
  673. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  674. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.5a4]
  675. // CHECK:STDOUT: %.loc15_28.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5a4]
  676. // CHECK:STDOUT: %.loc15_28.2: %Cpp.long = converted %int_1.loc15, %.loc15_28.1 [concrete = constants.%int_1.5a4]
  677. // CHECK:STDOUT: %cpp_long: %Cpp.long = value_binding cpp_long, %.loc15_28.2
  678. // CHECK:STDOUT: name_binding_decl {
  679. // CHECK:STDOUT: %cpp_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_long_result [concrete]
  680. // CHECK:STDOUT: }
  681. // CHECK:STDOUT: %Cpp.ref.loc16_41: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  682. // CHECK:STDOUT: %PassLong.ref.loc16: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value]
  683. // CHECK:STDOUT: %cpp_long.ref.loc16: %Cpp.long = name_ref cpp_long, %cpp_long
  684. // CHECK:STDOUT: %.loc16_62.1: ref %LongResult = temporary_storage
  685. // CHECK:STDOUT: %addr.loc16: %ptr.305 = addr_of %.loc16_62.1
  686. // CHECK:STDOUT: %PassLong__carbon_thunk.call.loc16: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.1(%cpp_long.ref.loc16, %addr.loc16)
  687. // CHECK:STDOUT: %.loc16_62.2: init %LongResult = in_place_init %PassLong__carbon_thunk.call.loc16, %.loc16_62.1
  688. // CHECK:STDOUT: %.loc16_27: type = splice_block %LongResult.ref.loc16 [concrete = constants.%LongResult] {
  689. // CHECK:STDOUT: %Cpp.ref.loc16_24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  690. // CHECK:STDOUT: %LongResult.ref.loc16: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
  691. // CHECK:STDOUT: }
  692. // CHECK:STDOUT: %.loc16_62.3: ref %LongResult = temporary %.loc16_62.1, %.loc16_62.2
  693. // CHECK:STDOUT: %.loc16_62.4: %LongResult = acquire_value %.loc16_62.3
  694. // CHECK:STDOUT: %cpp_long_result: %LongResult = value_binding cpp_long_result, %.loc16_62.4
  695. // CHECK:STDOUT: name_binding_decl {
  696. // CHECK:STDOUT: %cpp_compat_long.patt: %pattern_type.68c = value_binding_pattern cpp_compat_long [concrete]
  697. // CHECK:STDOUT: }
  698. // CHECK:STDOUT: %cpp_long.ref.loc18: %Cpp.long = name_ref cpp_long, %cpp_long
  699. // CHECK:STDOUT: %.loc18: type = splice_block %Long32.ref [concrete = constants.%Cpp.long] {
  700. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  701. // CHECK:STDOUT: %CppCompat.ref: <namespace> = name_ref CppCompat, imports.%CppCompat.4b4 [concrete = imports.%CppCompat.4b4]
  702. // CHECK:STDOUT: %Long32.ref: type = name_ref Long32, imports.%Core.Long32 [concrete = constants.%Cpp.long]
  703. // CHECK:STDOUT: }
  704. // CHECK:STDOUT: %cpp_compat_long: %Cpp.long = value_binding cpp_compat_long, %cpp_long.ref.loc18
  705. // CHECK:STDOUT: name_binding_decl {
  706. // CHECK:STDOUT: %cpp_compat_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_compat_long_result [concrete]
  707. // CHECK:STDOUT: }
  708. // CHECK:STDOUT: %Cpp.ref.loc19_48: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  709. // CHECK:STDOUT: %PassLong.ref.loc19: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value]
  710. // CHECK:STDOUT: %cpp_compat_long.ref: %Cpp.long = name_ref cpp_compat_long, %cpp_compat_long
  711. // CHECK:STDOUT: %.loc19_76.1: ref %LongResult = temporary_storage
  712. // CHECK:STDOUT: %addr.loc19: %ptr.305 = addr_of %.loc19_76.1
  713. // CHECK:STDOUT: %PassLong__carbon_thunk.call.loc19: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.1(%cpp_compat_long.ref, %addr.loc19)
  714. // CHECK:STDOUT: %.loc19_76.2: init %LongResult = in_place_init %PassLong__carbon_thunk.call.loc19, %.loc19_76.1
  715. // CHECK:STDOUT: %.loc19_34: type = splice_block %LongResult.ref.loc19 [concrete = constants.%LongResult] {
  716. // CHECK:STDOUT: %Cpp.ref.loc19_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  717. // CHECK:STDOUT: %LongResult.ref.loc19: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
  718. // CHECK:STDOUT: }
  719. // CHECK:STDOUT: %.loc19_76.3: ref %LongResult = temporary %.loc19_76.1, %.loc19_76.2
  720. // CHECK:STDOUT: %.loc19_76.4: %LongResult = acquire_value %.loc19_76.3
  721. // CHECK:STDOUT: %cpp_compat_long_result: %LongResult = value_binding cpp_compat_long_result, %.loc19_76.4
  722. // CHECK:STDOUT: name_binding_decl {
  723. // CHECK:STDOUT: %carbon_i32.patt: %pattern_type.7ce = value_binding_pattern carbon_i32 [concrete]
  724. // CHECK:STDOUT: }
  725. // CHECK:STDOUT: %cpp_long.ref.loc21: %Cpp.long = name_ref cpp_long, %cpp_long
  726. // CHECK:STDOUT: %.loc21_19: type = splice_block %i32 [concrete = constants.%i32] {
  727. // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  728. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  729. // CHECK:STDOUT: }
  730. // CHECK:STDOUT: %impl.elem0.loc21: %.79c = impl_witness_access constants.%ImplicitAs.impl_witness.925, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.3eb]
  731. // CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %cpp_long.ref.loc21, %impl.elem0.loc21
  732. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc21: init %i32 = call %bound_method.loc21(%cpp_long.ref.loc21)
  733. // CHECK:STDOUT: %.loc21_25.1: %i32 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc21
  734. // CHECK:STDOUT: %.loc21_25.2: %i32 = converted %cpp_long.ref.loc21, %.loc21_25.1
  735. // CHECK:STDOUT: %carbon_i32: %i32 = value_binding carbon_i32, %.loc21_25.2
  736. // CHECK:STDOUT: name_binding_decl {
  737. // CHECK:STDOUT: %carbon_i32_result.patt: %pattern_type.454 = value_binding_pattern carbon_i32_result [concrete]
  738. // CHECK:STDOUT: }
  739. // CHECK:STDOUT: %Cpp.ref.loc22_42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  740. // CHECK:STDOUT: %PassLong.ref.loc22: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value]
  741. // CHECK:STDOUT: %carbon_i32.ref: %i32 = name_ref carbon_i32, %carbon_i32
  742. // CHECK:STDOUT: %.loc22_65.1: ref %IntResult = temporary_storage
  743. // CHECK:STDOUT: %addr.loc22: %ptr.3cb = addr_of %.loc22_65.1
  744. // CHECK:STDOUT: %PassLong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.2(%carbon_i32.ref, %addr.loc22)
  745. // CHECK:STDOUT: %.loc22_65.2: init %IntResult = in_place_init %PassLong__carbon_thunk.call.loc22, %.loc22_65.1
  746. // CHECK:STDOUT: %.loc22_29: type = splice_block %IntResult.ref [concrete = constants.%IntResult] {
  747. // CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  748. // CHECK:STDOUT: %IntResult.ref: type = name_ref IntResult, imports.%IntResult.decl [concrete = constants.%IntResult]
  749. // CHECK:STDOUT: }
  750. // CHECK:STDOUT: %.loc22_65.3: ref %IntResult = temporary %.loc22_65.1, %.loc22_65.2
  751. // CHECK:STDOUT: %.loc22_65.4: %IntResult = acquire_value %.loc22_65.3
  752. // CHECK:STDOUT: %carbon_i32_result: %IntResult = value_binding carbon_i32_result, %.loc22_65.4
  753. // CHECK:STDOUT: name_binding_decl {
  754. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  755. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  756. // CHECK:STDOUT: }
  757. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  758. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  759. // CHECK:STDOUT: %.loc24_43.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  760. // CHECK:STDOUT: %impl.elem0.loc24_43: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
  761. // CHECK:STDOUT: %bound_method.loc24_43.1: <bound method> = bound_method %float, %impl.elem0.loc24_43 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
  762. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_43, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  763. // CHECK:STDOUT: %bound_method.loc24_43.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
  764. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_43.2(%float) [concrete = constants.%float.e3b]
  765. // CHECK:STDOUT: %.loc24_43.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  766. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  767. // CHECK:STDOUT: %.loc24_43.3: ref %f32.97e = array_index %a.var, %int_0
  768. // CHECK:STDOUT: %.loc24_43.4: init %f32.97e = initialize_from %.loc24_43.2 to %.loc24_43.3 [concrete = constants.%float.e3b]
  769. // CHECK:STDOUT: %.loc24_43.5: init %array_type = array_init (%.loc24_43.4) to %a.var [concrete = constants.%array]
  770. // CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_43.1, %.loc24_43.5 [concrete = constants.%array]
  771. // CHECK:STDOUT: assign %a.var, %.loc24_3
  772. // CHECK:STDOUT: %.loc24_34: type = splice_block %array_type [concrete = constants.%array_type] {
  773. // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  774. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  775. // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  776. // CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  777. // CHECK:STDOUT: %long.ref.loc24: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  778. // CHECK:STDOUT: %impl.elem0.loc24_23.1: %.040 = impl_witness_access constants.%As.impl_witness.60c, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  779. // CHECK:STDOUT: %bound_method.loc24_23.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
  780. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.5a4]
  781. // CHECK:STDOUT: %.loc24_23.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5a4]
  782. // CHECK:STDOUT: %.loc24_23.2: %Cpp.long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.5a4]
  783. // CHECK:STDOUT: %impl.elem0.loc24_23.2: %.8e3 = impl_witness_access constants.%ImplicitAs.impl_witness.e4d, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.d49]
  784. // CHECK:STDOUT: %bound_method.loc24_23.2: <bound method> = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.bound]
  785. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8]
  786. // CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
  787. // CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
  788. // CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
  789. // CHECK:STDOUT: }
  790. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  791. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp.b0ebf8.1
  792. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  793. // CHECK:STDOUT: %IntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_65.3, constants.%IntResult.cpp_destructor
  794. // CHECK:STDOUT: %IntResult.cpp_destructor.call: init %empty_tuple.type = call %IntResult.cpp_destructor.bound(%.loc22_65.3)
  795. // CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_76.3, constants.%LongResult.cpp_destructor
  796. // CHECK:STDOUT: %LongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc19(%.loc19_76.3)
  797. // CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_62.3, constants.%LongResult.cpp_destructor
  798. // CHECK:STDOUT: %LongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc16(%.loc16_62.3)
  799. // CHECK:STDOUT: <elided>
  800. // CHECK:STDOUT: }
  801. // CHECK:STDOUT:
  802. // CHECK:STDOUT: fn @DestroyOp.loc24(%self.param: %array_type) = "no_op";
  803. // CHECK:STDOUT:
  804. // CHECK:STDOUT: fn @DestroyOp.loc22(%self.param: %IntResult) = "no_op";
  805. // CHECK:STDOUT:
  806. // CHECK:STDOUT: fn @DestroyOp.loc19(%self.param: %LongResult) = "no_op";
  807. // CHECK:STDOUT:
  808. // CHECK:STDOUT: fn @ArithmeticOperatorsLong() {
  809. // CHECK:STDOUT: !entry:
  810. // CHECK:STDOUT: name_binding_decl {
  811. // CHECK:STDOUT: %x.patt: %pattern_type.68c = value_binding_pattern x [concrete]
  812. // CHECK:STDOUT: }
  813. // CHECK:STDOUT: %int_1.loc32: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  814. // CHECK:STDOUT: %.loc32_13: type = splice_block %long.ref.loc32 [concrete = constants.%Cpp.long] {
  815. // CHECK:STDOUT: %Cpp.ref.loc32: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  816. // CHECK:STDOUT: %long.ref.loc32: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  817. // CHECK:STDOUT: }
  818. // CHECK:STDOUT: %impl.elem0.loc32: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a]
  819. // CHECK:STDOUT: %bound_method.loc32: <bound method> = bound_method %int_1.loc32, %impl.elem0.loc32 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  820. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc32: init %Cpp.long = call %bound_method.loc32(%int_1.loc32) [concrete = constants.%int_1.5a4]
  821. // CHECK:STDOUT: %.loc32_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc32 [concrete = constants.%int_1.5a4]
  822. // CHECK:STDOUT: %.loc32_21.2: %Cpp.long = converted %int_1.loc32, %.loc32_21.1 [concrete = constants.%int_1.5a4]
  823. // CHECK:STDOUT: %x: %Cpp.long = value_binding x, %.loc32_21.2
  824. // CHECK:STDOUT: name_binding_decl {
  825. // CHECK:STDOUT: %y.patt: %pattern_type.68c = value_binding_pattern y [concrete]
  826. // CHECK:STDOUT: }
  827. // CHECK:STDOUT: %int_1.loc33: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  828. // CHECK:STDOUT: %.loc33_13: type = splice_block %long.ref.loc33 [concrete = constants.%Cpp.long] {
  829. // CHECK:STDOUT: %Cpp.ref.loc33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  830. // CHECK:STDOUT: %long.ref.loc33: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  831. // CHECK:STDOUT: }
  832. // CHECK:STDOUT: %impl.elem0.loc33: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a]
  833. // CHECK:STDOUT: %bound_method.loc33: <bound method> = bound_method %int_1.loc33, %impl.elem0.loc33 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  834. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc33: init %Cpp.long = call %bound_method.loc33(%int_1.loc33) [concrete = constants.%int_1.5a4]
  835. // CHECK:STDOUT: %.loc33_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc33 [concrete = constants.%int_1.5a4]
  836. // CHECK:STDOUT: %.loc33_21.2: %Cpp.long = converted %int_1.loc33, %.loc33_21.1 [concrete = constants.%int_1.5a4]
  837. // CHECK:STDOUT: %y: %Cpp.long = value_binding y, %.loc33_21.2
  838. // CHECK:STDOUT: name_binding_decl {
  839. // CHECK:STDOUT: %a.patt: %pattern_type.68c = value_binding_pattern a [concrete]
  840. // CHECK:STDOUT: }
  841. // CHECK:STDOUT: %x.ref.loc35: %Cpp.long = name_ref x, %x
  842. // CHECK:STDOUT: %impl.elem1.loc35: %.494 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Cpp.long.as.Negate.impl.Op]
  843. // CHECK:STDOUT: %bound_method.loc35: <bound method> = bound_method %x.ref.loc35, %impl.elem1.loc35
  844. // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op.call: init %Cpp.long = call %bound_method.loc35(%x.ref.loc35)
  845. // CHECK:STDOUT: %.loc35_13: type = splice_block %long.ref.loc35 [concrete = constants.%Cpp.long] {
  846. // CHECK:STDOUT: %Cpp.ref.loc35: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  847. // CHECK:STDOUT: %long.ref.loc35: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  848. // CHECK:STDOUT: }
  849. // CHECK:STDOUT: %.loc35_21.1: %Cpp.long = value_of_initializer %Cpp.long.as.Negate.impl.Op.call
  850. // CHECK:STDOUT: %.loc35_21.2: %Cpp.long = converted %Cpp.long.as.Negate.impl.Op.call, %.loc35_21.1
  851. // CHECK:STDOUT: %a: %Cpp.long = value_binding a, %.loc35_21.2
  852. // CHECK:STDOUT: name_binding_decl {
  853. // CHECK:STDOUT: %b.patt: %pattern_type.68c = value_binding_pattern b [concrete]
  854. // CHECK:STDOUT: }
  855. // CHECK:STDOUT: %x.ref.loc36: %Cpp.long = name_ref x, %x
  856. // CHECK:STDOUT: %y.ref.loc36: %Cpp.long = name_ref y, %y
  857. // CHECK:STDOUT: %impl.elem1.loc36: %.a81 = impl_witness_access constants.%AddWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.AddWith.impl.Op]
  858. // CHECK:STDOUT: %bound_method.loc36: <bound method> = bound_method %x.ref.loc36, %impl.elem1.loc36
  859. // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.call: init %Cpp.long = call %bound_method.loc36(%x.ref.loc36, %y.ref.loc36)
  860. // CHECK:STDOUT: %.loc36_13: type = splice_block %long.ref.loc36 [concrete = constants.%Cpp.long] {
  861. // CHECK:STDOUT: %Cpp.ref.loc36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  862. // CHECK:STDOUT: %long.ref.loc36: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  863. // CHECK:STDOUT: }
  864. // CHECK:STDOUT: %.loc36_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.AddWith.impl.Op.call
  865. // CHECK:STDOUT: %.loc36_23.2: %Cpp.long = converted %Cpp.long.as.AddWith.impl.Op.call, %.loc36_23.1
  866. // CHECK:STDOUT: %b: %Cpp.long = value_binding b, %.loc36_23.2
  867. // CHECK:STDOUT: name_binding_decl {
  868. // CHECK:STDOUT: %c.patt: %pattern_type.68c = value_binding_pattern c [concrete]
  869. // CHECK:STDOUT: }
  870. // CHECK:STDOUT: %x.ref.loc37: %Cpp.long = name_ref x, %x
  871. // CHECK:STDOUT: %y.ref.loc37: %Cpp.long = name_ref y, %y
  872. // CHECK:STDOUT: %impl.elem1.loc37: %.70d = impl_witness_access constants.%SubWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.SubWith.impl.Op]
  873. // CHECK:STDOUT: %bound_method.loc37: <bound method> = bound_method %x.ref.loc37, %impl.elem1.loc37
  874. // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.call: init %Cpp.long = call %bound_method.loc37(%x.ref.loc37, %y.ref.loc37)
  875. // CHECK:STDOUT: %.loc37_13: type = splice_block %long.ref.loc37 [concrete = constants.%Cpp.long] {
  876. // CHECK:STDOUT: %Cpp.ref.loc37: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  877. // CHECK:STDOUT: %long.ref.loc37: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  878. // CHECK:STDOUT: }
  879. // CHECK:STDOUT: %.loc37_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.SubWith.impl.Op.call
  880. // CHECK:STDOUT: %.loc37_23.2: %Cpp.long = converted %Cpp.long.as.SubWith.impl.Op.call, %.loc37_23.1
  881. // CHECK:STDOUT: %c: %Cpp.long = value_binding c, %.loc37_23.2
  882. // CHECK:STDOUT: name_binding_decl {
  883. // CHECK:STDOUT: %d.patt: %pattern_type.68c = value_binding_pattern d [concrete]
  884. // CHECK:STDOUT: }
  885. // CHECK:STDOUT: %x.ref.loc38: %Cpp.long = name_ref x, %x
  886. // CHECK:STDOUT: %y.ref.loc38: %Cpp.long = name_ref y, %y
  887. // CHECK:STDOUT: %impl.elem1.loc38: %.0a7 = impl_witness_access constants.%MulWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.MulWith.impl.Op]
  888. // CHECK:STDOUT: %bound_method.loc38: <bound method> = bound_method %x.ref.loc38, %impl.elem1.loc38
  889. // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.call: init %Cpp.long = call %bound_method.loc38(%x.ref.loc38, %y.ref.loc38)
  890. // CHECK:STDOUT: %.loc38_13: type = splice_block %long.ref.loc38 [concrete = constants.%Cpp.long] {
  891. // CHECK:STDOUT: %Cpp.ref.loc38: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  892. // CHECK:STDOUT: %long.ref.loc38: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  893. // CHECK:STDOUT: }
  894. // CHECK:STDOUT: %.loc38_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.MulWith.impl.Op.call
  895. // CHECK:STDOUT: %.loc38_23.2: %Cpp.long = converted %Cpp.long.as.MulWith.impl.Op.call, %.loc38_23.1
  896. // CHECK:STDOUT: %d: %Cpp.long = value_binding d, %.loc38_23.2
  897. // CHECK:STDOUT: name_binding_decl {
  898. // CHECK:STDOUT: %e.patt: %pattern_type.68c = value_binding_pattern e [concrete]
  899. // CHECK:STDOUT: }
  900. // CHECK:STDOUT: %x.ref.loc39: %Cpp.long = name_ref x, %x
  901. // CHECK:STDOUT: %y.ref.loc39: %Cpp.long = name_ref y, %y
  902. // CHECK:STDOUT: %impl.elem1.loc39: %.22b = impl_witness_access constants.%DivWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.DivWith.impl.Op]
  903. // CHECK:STDOUT: %bound_method.loc39: <bound method> = bound_method %x.ref.loc39, %impl.elem1.loc39
  904. // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.call: init %Cpp.long = call %bound_method.loc39(%x.ref.loc39, %y.ref.loc39)
  905. // CHECK:STDOUT: %.loc39_13: type = splice_block %long.ref.loc39 [concrete = constants.%Cpp.long] {
  906. // CHECK:STDOUT: %Cpp.ref.loc39: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  907. // CHECK:STDOUT: %long.ref.loc39: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  908. // CHECK:STDOUT: }
  909. // CHECK:STDOUT: %.loc39_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.DivWith.impl.Op.call
  910. // CHECK:STDOUT: %.loc39_23.2: %Cpp.long = converted %Cpp.long.as.DivWith.impl.Op.call, %.loc39_23.1
  911. // CHECK:STDOUT: %e: %Cpp.long = value_binding e, %.loc39_23.2
  912. // CHECK:STDOUT: name_binding_decl {
  913. // CHECK:STDOUT: %f.patt: %pattern_type.68c = value_binding_pattern f [concrete]
  914. // CHECK:STDOUT: }
  915. // CHECK:STDOUT: %x.ref.loc40: %Cpp.long = name_ref x, %x
  916. // CHECK:STDOUT: %y.ref.loc40: %Cpp.long = name_ref y, %y
  917. // CHECK:STDOUT: %impl.elem1.loc40: %.300 = impl_witness_access constants.%ModWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.ModWith.impl.Op]
  918. // CHECK:STDOUT: %bound_method.loc40: <bound method> = bound_method %x.ref.loc40, %impl.elem1.loc40
  919. // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.call: init %Cpp.long = call %bound_method.loc40(%x.ref.loc40, %y.ref.loc40)
  920. // CHECK:STDOUT: %.loc40_13: type = splice_block %long.ref.loc40 [concrete = constants.%Cpp.long] {
  921. // CHECK:STDOUT: %Cpp.ref.loc40: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  922. // CHECK:STDOUT: %long.ref.loc40: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  923. // CHECK:STDOUT: }
  924. // CHECK:STDOUT: %.loc40_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.ModWith.impl.Op.call
  925. // CHECK:STDOUT: %.loc40_23.2: %Cpp.long = converted %Cpp.long.as.ModWith.impl.Op.call, %.loc40_23.1
  926. // CHECK:STDOUT: %f: %Cpp.long = value_binding f, %.loc40_23.2
  927. // CHECK:STDOUT: <elided>
  928. // CHECK:STDOUT: }
  929. // CHECK:STDOUT:
  930. // CHECK:STDOUT: --- fail_todo_bitwise_long.carbon
  931. // CHECK:STDOUT:
  932. // CHECK:STDOUT: constants {
  933. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  934. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  935. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  936. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  937. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  938. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  939. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  940. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete]
  941. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  942. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  943. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  944. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  945. // CHECK:STDOUT: }
  946. // CHECK:STDOUT:
  947. // CHECK:STDOUT: imports {
  948. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  949. // CHECK:STDOUT: .long = constants.%Cpp.long
  950. // CHECK:STDOUT: import Cpp//...
  951. // CHECK:STDOUT: }
  952. // CHECK:STDOUT: %Core.import_ref.b8a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  953. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  954. // CHECK:STDOUT: }
  955. // CHECK:STDOUT:
  956. // CHECK:STDOUT: fn @BitWiseOperatorsLong() {
  957. // CHECK:STDOUT: !entry:
  958. // CHECK:STDOUT: name_binding_decl {
  959. // CHECK:STDOUT: %a.patt: %pattern_type.68c = value_binding_pattern a [concrete]
  960. // CHECK:STDOUT: }
  961. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  962. // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref.loc8 [concrete = constants.%Cpp.long] {
  963. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  964. // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  965. // CHECK:STDOUT: }
  966. // CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  967. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  968. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %Cpp.long = call %bound_method.loc8(%int_1.loc8) [concrete = constants.%int_1.5a4]
  969. // CHECK:STDOUT: %.loc8_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.5a4]
  970. // CHECK:STDOUT: %.loc8_21.2: %Cpp.long = converted %int_1.loc8, %.loc8_21.1 [concrete = constants.%int_1.5a4]
  971. // CHECK:STDOUT: %a: %Cpp.long = value_binding a, %.loc8_21.2
  972. // CHECK:STDOUT: name_binding_decl {
  973. // CHECK:STDOUT: %b.patt: %pattern_type.68c = value_binding_pattern b [concrete]
  974. // CHECK:STDOUT: }
  975. // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  976. // CHECK:STDOUT: %.loc9_13: type = splice_block %long.ref.loc9 [concrete = constants.%Cpp.long] {
  977. // CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  978. // CHECK:STDOUT: %long.ref.loc9: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  979. // CHECK:STDOUT: }
  980. // CHECK:STDOUT: %impl.elem0.loc9: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  981. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  982. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %Cpp.long = call %bound_method.loc9(%int_1.loc9) [concrete = constants.%int_1.5a4]
  983. // CHECK:STDOUT: %.loc9_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.5a4]
  984. // CHECK:STDOUT: %.loc9_21.2: %Cpp.long = converted %int_1.loc9, %.loc9_21.1 [concrete = constants.%int_1.5a4]
  985. // CHECK:STDOUT: %b: %Cpp.long = value_binding b, %.loc9_21.2
  986. // CHECK:STDOUT: name_binding_decl {
  987. // CHECK:STDOUT: %c.patt: %pattern_type.68c = value_binding_pattern c [concrete]
  988. // CHECK:STDOUT: }
  989. // CHECK:STDOUT: %a.ref: %Cpp.long = name_ref a, %a
  990. // CHECK:STDOUT: %b.ref: %Cpp.long = name_ref b, %b
  991. // CHECK:STDOUT: %.loc15: type = splice_block %long.ref.loc15 [concrete = constants.%Cpp.long] {
  992. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  993. // CHECK:STDOUT: %long.ref.loc15: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  994. // CHECK:STDOUT: }
  995. // CHECK:STDOUT: %c: %Cpp.long = value_binding c, <error> [concrete = <error>]
  996. // CHECK:STDOUT: <elided>
  997. // CHECK:STDOUT: }
  998. // CHECK:STDOUT:
  999. // CHECK:STDOUT: --- unsigned_long.carbon
  1000. // CHECK:STDOUT:
  1001. // CHECK:STDOUT: constants {
  1002. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1003. // CHECK:STDOUT: %Cpp.unsigned_long: type = class_type @ULong32 [concrete]
  1004. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  1005. // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete]
  1006. // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete]
  1007. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  1008. // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete]
  1009. // CHECK:STDOUT: %pattern_type.5b7: type = pattern_type %Cpp.unsigned_long [concrete]
  1010. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  1011. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  1012. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  1013. // CHECK:STDOUT: %ImplicitAs.type.3c3: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.unsigned_long)> [concrete]
  1014. // CHECK:STDOUT: %ImplicitAs.Convert.type.691: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.unsigned_long) [concrete]
  1015. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  1016. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  1017. // CHECK:STDOUT: %ImplicitAs.type.146: type = facet_type <@ImplicitAs, @ImplicitAs(%u32)> [concrete]
  1018. // CHECK:STDOUT: %ImplicitAs.Convert.type.92a: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u32) [concrete]
  1019. // CHECK:STDOUT: %ImplicitAs.impl_witness.a19: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.5b5 [concrete]
  1020. // CHECK:STDOUT: %ImplicitAs.facet.66c: %ImplicitAs.type.3c3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.a19) [concrete]
  1021. // CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %ImplicitAs.Convert.type.691, %ImplicitAs.facet.66c [concrete]
  1022. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.71f: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete]
  1023. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.14b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.71f = struct_value () [concrete]
  1024. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.14b [concrete]
  1025. // CHECK:STDOUT: %int_1.0ab: %Cpp.unsigned_long = int_value 1 [concrete]
  1026. // CHECK:STDOUT: %ULongResult: type = class_type @ULongResult [concrete]
  1027. // CHECK:STDOUT: %pattern_type.6f2: type = pattern_type %ULongResult [concrete]
  1028. // CHECK:STDOUT: %PassULong.cpp_overload_set.type: type = cpp_overload_set_type @PassULong.cpp_overload_set [concrete]
  1029. // CHECK:STDOUT: %PassULong.cpp_overload_set.value: %PassULong.cpp_overload_set.type = cpp_overload_set_value @PassULong.cpp_overload_set [concrete]
  1030. // CHECK:STDOUT: %ptr.f5e: type = ptr_type %ULongResult [concrete]
  1031. // CHECK:STDOUT: %PassULong__carbon_thunk.type.3fc2d8.1: type = fn_type @PassULong__carbon_thunk.1 [concrete]
  1032. // CHECK:STDOUT: %PassULong__carbon_thunk.ff747d.1: %PassULong__carbon_thunk.type.3fc2d8.1 = struct_value () [concrete]
  1033. // CHECK:STDOUT: %pattern_type.4a9: type = pattern_type %u32 [concrete]
  1034. // CHECK:STDOUT: %ImplicitAs.impl_witness.e61: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.af7 [concrete]
  1035. // CHECK:STDOUT: %ImplicitAs.facet.3c4: %ImplicitAs.type.146 = facet_value %Cpp.unsigned_long, (%ImplicitAs.impl_witness.e61) [concrete]
  1036. // CHECK:STDOUT: %.da1: type = fn_type_with_self_type %ImplicitAs.Convert.type.92a, %ImplicitAs.facet.3c4 [concrete]
  1037. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.bef: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert.1 [concrete]
  1038. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.19d: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.bef = struct_value () [concrete]
  1039. // CHECK:STDOUT: %UIntResult: type = class_type @UIntResult [concrete]
  1040. // CHECK:STDOUT: %pattern_type.dc7: type = pattern_type %UIntResult [concrete]
  1041. // CHECK:STDOUT: %ptr.059: type = ptr_type %UIntResult [concrete]
  1042. // CHECK:STDOUT: %PassULong__carbon_thunk.type.3fc2d8.2: type = fn_type @PassULong__carbon_thunk.2 [concrete]
  1043. // CHECK:STDOUT: %PassULong__carbon_thunk.ff747d.2: %PassULong__carbon_thunk.type.3fc2d8.2 = struct_value () [concrete]
  1044. // CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
  1045. // CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
  1046. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  1047. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  1048. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  1049. // CHECK:STDOUT: %As.type.950: type = facet_type <@As, @As(%Cpp.unsigned_long)> [concrete]
  1050. // CHECK:STDOUT: %As.Convert.type.3ff: type = fn_type @As.Convert, @As(%Cpp.unsigned_long) [concrete]
  1051. // CHECK:STDOUT: %As.impl_witness.d5f: <witness> = impl_witness imports.%As.impl_witness_table.f58 [concrete]
  1052. // CHECK:STDOUT: %As.facet: %As.type.950 = facet_value Core.IntLiteral, (%As.impl_witness.d5f) [concrete]
  1053. // CHECK:STDOUT: %.80d: type = fn_type_with_self_type %As.Convert.type.3ff, %As.facet [concrete]
  1054. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
  1055. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
  1056. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete]
  1057. // CHECK:STDOUT: %ImplicitAs.impl_witness.a13: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.50d [concrete]
  1058. // CHECK:STDOUT: %ImplicitAs.facet.2f7: %ImplicitAs.type.139 = facet_value %Cpp.unsigned_long, (%ImplicitAs.impl_witness.a13) [concrete]
  1059. // CHECK:STDOUT: %.4f2: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.2f7 [concrete]
  1060. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.a9d: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert.2 [concrete]
  1061. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.a9d = struct_value () [concrete]
  1062. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.0ab, %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53 [concrete]
  1063. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  1064. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  1065. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  1066. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  1067. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  1068. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  1069. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  1070. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  1071. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%N) [symbolic]
  1072. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  1073. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  1074. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461: type = fn_type @Core.FloatLiteral.as.ImplicitAs.impl.Convert, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  1075. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  1076. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  1077. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  1078. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  1079. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
  1080. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  1081. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  1082. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  1083. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  1084. // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc24 [concrete]
  1085. // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete]
  1086. // CHECK:STDOUT: %UIntResult.cpp_destructor.type: type = fn_type @UIntResult.cpp_destructor [concrete]
  1087. // CHECK:STDOUT: %UIntResult.cpp_destructor: %UIntResult.cpp_destructor.type = struct_value () [concrete]
  1088. // CHECK:STDOUT: %ULongResult.cpp_destructor.type: type = fn_type @ULongResult.cpp_destructor [concrete]
  1089. // CHECK:STDOUT: %ULongResult.cpp_destructor: %ULongResult.cpp_destructor.type = struct_value () [concrete]
  1090. // CHECK:STDOUT: }
  1091. // CHECK:STDOUT:
  1092. // CHECK:STDOUT: imports {
  1093. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1094. // CHECK:STDOUT: .CppCompat = %CppCompat.4b4
  1095. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  1096. // CHECK:STDOUT: .UInt = %Core.UInt
  1097. // CHECK:STDOUT: .Float = %Core.Float
  1098. // CHECK:STDOUT: .As = %Core.As
  1099. // CHECK:STDOUT: .Destroy = %Core.Destroy
  1100. // CHECK:STDOUT: import Core//prelude
  1101. // CHECK:STDOUT: import Core//prelude/...
  1102. // CHECK:STDOUT: }
  1103. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1104. // CHECK:STDOUT: .unsigned_long = constants.%Cpp.unsigned_long
  1105. // CHECK:STDOUT: .ULongResult = %ULongResult.decl
  1106. // CHECK:STDOUT: .PassULong = %PassULong.cpp_overload_set.value
  1107. // CHECK:STDOUT: .UIntResult = %UIntResult.decl
  1108. // CHECK:STDOUT: import Cpp//...
  1109. // CHECK:STDOUT: }
  1110. // CHECK:STDOUT: %Core.CppCompat: <namespace> = import_ref Core//prelude, CppCompat, loaded
  1111. // CHECK:STDOUT: %CppCompat.4b4: <namespace> = namespace %Core.CppCompat, [concrete] {
  1112. // CHECK:STDOUT: .ULong32 = %Core.ULong32
  1113. // CHECK:STDOUT: import Core//prelude
  1114. // CHECK:STDOUT: import Core//prelude/...
  1115. // CHECK:STDOUT: }
  1116. // CHECK:STDOUT: %Core.ULong32: type = import_ref Core//prelude/types/cpp/int, ULong32, loaded [concrete = constants.%Cpp.unsigned_long]
  1117. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  1118. // CHECK:STDOUT: %Core.import_ref.702: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.71f = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.14b]
  1119. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.5b5 = impl_witness_table (%Core.import_ref.702), @Core.IntLiteral.as.ImplicitAs.impl.541 [concrete]
  1120. // CHECK:STDOUT: %ULongResult.decl: type = class_decl @ULongResult [concrete = constants.%ULongResult] {} {}
  1121. // CHECK:STDOUT: %PassULong.cpp_overload_set.value: %PassULong.cpp_overload_set.type = cpp_overload_set_value @PassULong.cpp_overload_set [concrete = constants.%PassULong.cpp_overload_set.value]
  1122. // CHECK:STDOUT: %PassULong__carbon_thunk.decl.108234.1: %PassULong__carbon_thunk.type.3fc2d8.1 = fn_decl @PassULong__carbon_thunk.1 [concrete = constants.%PassULong__carbon_thunk.ff747d.1] {
  1123. // CHECK:STDOUT: <elided>
  1124. // CHECK:STDOUT: } {
  1125. // CHECK:STDOUT: <elided>
  1126. // CHECK:STDOUT: }
  1127. // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/types/uint, UInt, loaded [concrete = constants.%UInt.generic]
  1128. // CHECK:STDOUT: %Core.import_ref.d88: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.bef = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.19d]
  1129. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.af7 = impl_witness_table (%Core.import_ref.d88), @Cpp.unsigned_long.as.ImplicitAs.impl.66a [concrete]
  1130. // CHECK:STDOUT: %UIntResult.decl: type = class_decl @UIntResult [concrete = constants.%UIntResult] {} {}
  1131. // CHECK:STDOUT: %PassULong__carbon_thunk.decl.108234.2: %PassULong__carbon_thunk.type.3fc2d8.2 = fn_decl @PassULong__carbon_thunk.2 [concrete = constants.%PassULong__carbon_thunk.ff747d.2] {
  1132. // CHECK:STDOUT: <elided>
  1133. // CHECK:STDOUT: } {
  1134. // CHECK:STDOUT: <elided>
  1135. // CHECK:STDOUT: }
  1136. // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types/float, Float, loaded [concrete = constants.%Float.generic]
  1137. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
  1138. // CHECK:STDOUT: %Core.import_ref.190: %Core.IntLiteral.as.As.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  1139. // CHECK:STDOUT: %As.impl_witness_table.f58 = impl_witness_table (%Core.import_ref.190), @Core.IntLiteral.as.As.impl.8c9 [concrete]
  1140. // CHECK:STDOUT: %Core.import_ref.f5e: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.a9d = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53]
  1141. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.50d = impl_witness_table (%Core.import_ref.f5e), @Cpp.unsigned_long.as.ImplicitAs.impl.78e [concrete]
  1142. // CHECK:STDOUT: %Core.import_ref.38a: @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type (%Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f) = import_ref Core//prelude/types/float, loc{{\d+_\d+}}, loaded [symbolic = @Core.FloatLiteral.as.ImplicitAs.impl.%Core.FloatLiteral.as.ImplicitAs.impl.Convert (constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0)]
  1143. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  1144. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  1145. // CHECK:STDOUT: }
  1146. // CHECK:STDOUT:
  1147. // CHECK:STDOUT: fn @F() {
  1148. // CHECK:STDOUT: !entry:
  1149. // CHECK:STDOUT: name_binding_decl {
  1150. // CHECK:STDOUT: %cpp_unsigned_long.patt: %pattern_type.5b7 = value_binding_pattern cpp_unsigned_long [concrete]
  1151. // CHECK:STDOUT: }
  1152. // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1153. // CHECK:STDOUT: %.loc15_29: type = splice_block %unsigned_long.ref.loc15 [concrete = constants.%Cpp.unsigned_long] {
  1154. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1155. // CHECK:STDOUT: %unsigned_long.ref.loc15: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long]
  1156. // CHECK:STDOUT: }
  1157. // CHECK:STDOUT: %impl.elem0.loc15: %.6bf = impl_witness_access constants.%ImplicitAs.impl_witness.a19, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.14b]
  1158. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  1159. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.unsigned_long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.0ab]
  1160. // CHECK:STDOUT: %.loc15_46.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.0ab]
  1161. // CHECK:STDOUT: %.loc15_46.2: %Cpp.unsigned_long = converted %int_1.loc15, %.loc15_46.1 [concrete = constants.%int_1.0ab]
  1162. // CHECK:STDOUT: %cpp_unsigned_long: %Cpp.unsigned_long = value_binding cpp_unsigned_long, %.loc15_46.2
  1163. // CHECK:STDOUT: name_binding_decl {
  1164. // CHECK:STDOUT: %cpp_unsigned_long_result.patt: %pattern_type.6f2 = value_binding_pattern cpp_unsigned_long_result [concrete]
  1165. // CHECK:STDOUT: }
  1166. // CHECK:STDOUT: %Cpp.ref.loc16_51: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1167. // CHECK:STDOUT: %PassULong.ref.loc16: %PassULong.cpp_overload_set.type = name_ref PassULong, imports.%PassULong.cpp_overload_set.value [concrete = constants.%PassULong.cpp_overload_set.value]
  1168. // CHECK:STDOUT: %cpp_unsigned_long.ref.loc16: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
  1169. // CHECK:STDOUT: %.loc16_82.1: ref %ULongResult = temporary_storage
  1170. // CHECK:STDOUT: %addr.loc16: %ptr.f5e = addr_of %.loc16_82.1
  1171. // CHECK:STDOUT: %PassULong__carbon_thunk.call.loc16: init %empty_tuple.type = call imports.%PassULong__carbon_thunk.decl.108234.1(%cpp_unsigned_long.ref.loc16, %addr.loc16)
  1172. // CHECK:STDOUT: %.loc16_82.2: init %ULongResult = in_place_init %PassULong__carbon_thunk.call.loc16, %.loc16_82.1
  1173. // CHECK:STDOUT: %.loc16_36: type = splice_block %ULongResult.ref.loc16 [concrete = constants.%ULongResult] {
  1174. // CHECK:STDOUT: %Cpp.ref.loc16_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1175. // CHECK:STDOUT: %ULongResult.ref.loc16: type = name_ref ULongResult, imports.%ULongResult.decl [concrete = constants.%ULongResult]
  1176. // CHECK:STDOUT: }
  1177. // CHECK:STDOUT: %.loc16_82.3: ref %ULongResult = temporary %.loc16_82.1, %.loc16_82.2
  1178. // CHECK:STDOUT: %.loc16_82.4: %ULongResult = acquire_value %.loc16_82.3
  1179. // CHECK:STDOUT: %cpp_unsigned_long_result: %ULongResult = value_binding cpp_unsigned_long_result, %.loc16_82.4
  1180. // CHECK:STDOUT: name_binding_decl {
  1181. // CHECK:STDOUT: %cpp_compat_ulong.patt: %pattern_type.5b7 = value_binding_pattern cpp_compat_ulong [concrete]
  1182. // CHECK:STDOUT: }
  1183. // CHECK:STDOUT: %cpp_unsigned_long.ref.loc18: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
  1184. // CHECK:STDOUT: %.loc18: type = splice_block %ULong32.ref [concrete = constants.%Cpp.unsigned_long] {
  1185. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  1186. // CHECK:STDOUT: %CppCompat.ref: <namespace> = name_ref CppCompat, imports.%CppCompat.4b4 [concrete = imports.%CppCompat.4b4]
  1187. // CHECK:STDOUT: %ULong32.ref: type = name_ref ULong32, imports.%Core.ULong32 [concrete = constants.%Cpp.unsigned_long]
  1188. // CHECK:STDOUT: }
  1189. // CHECK:STDOUT: %cpp_compat_ulong: %Cpp.unsigned_long = value_binding cpp_compat_ulong, %cpp_unsigned_long.ref.loc18
  1190. // CHECK:STDOUT: name_binding_decl {
  1191. // CHECK:STDOUT: %cpp_compat_ulong_result.patt: %pattern_type.6f2 = value_binding_pattern cpp_compat_ulong_result [concrete]
  1192. // CHECK:STDOUT: }
  1193. // CHECK:STDOUT: %Cpp.ref.loc19_50: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1194. // CHECK:STDOUT: %PassULong.ref.loc19: %PassULong.cpp_overload_set.type = name_ref PassULong, imports.%PassULong.cpp_overload_set.value [concrete = constants.%PassULong.cpp_overload_set.value]
  1195. // CHECK:STDOUT: %cpp_compat_ulong.ref: %Cpp.unsigned_long = name_ref cpp_compat_ulong, %cpp_compat_ulong
  1196. // CHECK:STDOUT: %.loc19_80.1: ref %ULongResult = temporary_storage
  1197. // CHECK:STDOUT: %addr.loc19: %ptr.f5e = addr_of %.loc19_80.1
  1198. // CHECK:STDOUT: %PassULong__carbon_thunk.call.loc19: init %empty_tuple.type = call imports.%PassULong__carbon_thunk.decl.108234.1(%cpp_compat_ulong.ref, %addr.loc19)
  1199. // CHECK:STDOUT: %.loc19_80.2: init %ULongResult = in_place_init %PassULong__carbon_thunk.call.loc19, %.loc19_80.1
  1200. // CHECK:STDOUT: %.loc19_35: type = splice_block %ULongResult.ref.loc19 [concrete = constants.%ULongResult] {
  1201. // CHECK:STDOUT: %Cpp.ref.loc19_32: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1202. // CHECK:STDOUT: %ULongResult.ref.loc19: type = name_ref ULongResult, imports.%ULongResult.decl [concrete = constants.%ULongResult]
  1203. // CHECK:STDOUT: }
  1204. // CHECK:STDOUT: %.loc19_80.3: ref %ULongResult = temporary %.loc19_80.1, %.loc19_80.2
  1205. // CHECK:STDOUT: %.loc19_80.4: %ULongResult = acquire_value %.loc19_80.3
  1206. // CHECK:STDOUT: %cpp_compat_ulong_result: %ULongResult = value_binding cpp_compat_ulong_result, %.loc19_80.4
  1207. // CHECK:STDOUT: name_binding_decl {
  1208. // CHECK:STDOUT: %carbon_u32.patt: %pattern_type.4a9 = value_binding_pattern carbon_u32 [concrete]
  1209. // CHECK:STDOUT: }
  1210. // CHECK:STDOUT: %cpp_unsigned_long.ref.loc21: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
  1211. // CHECK:STDOUT: %.loc21_19: type = splice_block %u32 [concrete = constants.%u32] {
  1212. // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1213. // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [concrete = constants.%u32]
  1214. // CHECK:STDOUT: }
  1215. // CHECK:STDOUT: %impl.elem0.loc21: %.da1 = impl_witness_access constants.%ImplicitAs.impl_witness.e61, element0 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.19d]
  1216. // CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %cpp_unsigned_long.ref.loc21, %impl.elem0.loc21
  1217. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc21: init %u32 = call %bound_method.loc21(%cpp_unsigned_long.ref.loc21)
  1218. // CHECK:STDOUT: %.loc21_25.1: %u32 = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc21
  1219. // CHECK:STDOUT: %.loc21_25.2: %u32 = converted %cpp_unsigned_long.ref.loc21, %.loc21_25.1
  1220. // CHECK:STDOUT: %carbon_u32: %u32 = value_binding carbon_u32, %.loc21_25.2
  1221. // CHECK:STDOUT: name_binding_decl {
  1222. // CHECK:STDOUT: %carbon_u32_result.patt: %pattern_type.dc7 = value_binding_pattern carbon_u32_result [concrete]
  1223. // CHECK:STDOUT: }
  1224. // CHECK:STDOUT: %Cpp.ref.loc22_43: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1225. // CHECK:STDOUT: %PassULong.ref.loc22: %PassULong.cpp_overload_set.type = name_ref PassULong, imports.%PassULong.cpp_overload_set.value [concrete = constants.%PassULong.cpp_overload_set.value]
  1226. // CHECK:STDOUT: %carbon_u32.ref: %u32 = name_ref carbon_u32, %carbon_u32
  1227. // CHECK:STDOUT: %.loc22_67.1: ref %UIntResult = temporary_storage
  1228. // CHECK:STDOUT: %addr.loc22: %ptr.059 = addr_of %.loc22_67.1
  1229. // CHECK:STDOUT: %PassULong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassULong__carbon_thunk.decl.108234.2(%carbon_u32.ref, %addr.loc22)
  1230. // CHECK:STDOUT: %.loc22_67.2: init %UIntResult = in_place_init %PassULong__carbon_thunk.call.loc22, %.loc22_67.1
  1231. // CHECK:STDOUT: %.loc22_29: type = splice_block %UIntResult.ref [concrete = constants.%UIntResult] {
  1232. // CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1233. // CHECK:STDOUT: %UIntResult.ref: type = name_ref UIntResult, imports.%UIntResult.decl [concrete = constants.%UIntResult]
  1234. // CHECK:STDOUT: }
  1235. // CHECK:STDOUT: %.loc22_67.3: ref %UIntResult = temporary %.loc22_67.1, %.loc22_67.2
  1236. // CHECK:STDOUT: %.loc22_67.4: %UIntResult = acquire_value %.loc22_67.3
  1237. // CHECK:STDOUT: %carbon_u32_result: %UIntResult = value_binding carbon_u32_result, %.loc22_67.4
  1238. // CHECK:STDOUT: name_binding_decl {
  1239. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  1240. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  1241. // CHECK:STDOUT: }
  1242. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  1243. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  1244. // CHECK:STDOUT: %.loc24_52.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  1245. // CHECK:STDOUT: %impl.elem0.loc24_52: %.a6f = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
  1246. // CHECK:STDOUT: %bound_method.loc24_52.1: <bound method> = bound_method %float, %impl.elem0.loc24_52 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
  1247. // CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_52, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1248. // CHECK:STDOUT: %bound_method.loc24_52.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
  1249. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_52.2(%float) [concrete = constants.%float.e3b]
  1250. // CHECK:STDOUT: %.loc24_52.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  1251. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  1252. // CHECK:STDOUT: %.loc24_52.3: ref %f32.97e = array_index %a.var, %int_0
  1253. // CHECK:STDOUT: %.loc24_52.4: init %f32.97e = initialize_from %.loc24_52.2 to %.loc24_52.3 [concrete = constants.%float.e3b]
  1254. // CHECK:STDOUT: %.loc24_52.5: init %array_type = array_init (%.loc24_52.4) to %a.var [concrete = constants.%array]
  1255. // CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_52.1, %.loc24_52.5 [concrete = constants.%array]
  1256. // CHECK:STDOUT: assign %a.var, %.loc24_3
  1257. // CHECK:STDOUT: %.loc24_43: type = splice_block %array_type [concrete = constants.%array_type] {
  1258. // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1259. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  1260. // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1261. // CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1262. // CHECK:STDOUT: %unsigned_long.ref.loc24: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long]
  1263. // CHECK:STDOUT: %impl.elem0.loc24_23.1: %.80d = impl_witness_access constants.%As.impl_witness.d5f, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  1264. // CHECK:STDOUT: %bound_method.loc24_23.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
  1265. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.unsigned_long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.0ab]
  1266. // CHECK:STDOUT: %.loc24_23.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.0ab]
  1267. // CHECK:STDOUT: %.loc24_23.2: %Cpp.unsigned_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.0ab]
  1268. // CHECK:STDOUT: %impl.elem0.loc24_23.2: %.4f2 = impl_witness_access constants.%ImplicitAs.impl_witness.a13, element0 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53]
  1269. // CHECK:STDOUT: %bound_method.loc24_23.2: <bound method> = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.bound]
  1270. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8]
  1271. // CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
  1272. // CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
  1273. // CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
  1274. // CHECK:STDOUT: }
  1275. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  1276. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp.b0ebf8.1
  1277. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  1278. // CHECK:STDOUT: %UIntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_67.3, constants.%UIntResult.cpp_destructor
  1279. // CHECK:STDOUT: %UIntResult.cpp_destructor.call: init %empty_tuple.type = call %UIntResult.cpp_destructor.bound(%.loc22_67.3)
  1280. // CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_80.3, constants.%ULongResult.cpp_destructor
  1281. // CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc19(%.loc19_80.3)
  1282. // CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_82.3, constants.%ULongResult.cpp_destructor
  1283. // CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc16(%.loc16_82.3)
  1284. // CHECK:STDOUT: <elided>
  1285. // CHECK:STDOUT: }
  1286. // CHECK:STDOUT:
  1287. // CHECK:STDOUT: fn @DestroyOp.loc24(%self.param: %array_type) = "no_op";
  1288. // CHECK:STDOUT:
  1289. // CHECK:STDOUT: fn @DestroyOp.loc22(%self.param: %UIntResult) = "no_op";
  1290. // CHECK:STDOUT:
  1291. // CHECK:STDOUT: fn @DestroyOp.loc19(%self.param: %ULongResult) = "no_op";
  1292. // CHECK:STDOUT: