builtins.llp64.carbon 211 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248
  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. // --- copy_long.carbon
  54. library "[[@TEST_NAME]]";
  55. import Cpp;
  56. fn CopyLong() {
  57. //@dump-sem-ir-begin
  58. var a: Cpp.long = 1;
  59. var b: Cpp.long = a;
  60. //@dump-sem-ir-end
  61. }
  62. // operators
  63. // --- arithmetic_homogeneous_long.carbon
  64. library "[[@TEST_NAME]]";
  65. import Cpp;
  66. fn ArithmeticHomogeneousLong() {
  67. //@dump-sem-ir-begin
  68. let x: Cpp.long = 1;
  69. let y: Cpp.long = 1;
  70. let a: Cpp.long = -x;
  71. let b: Cpp.long = x + y;
  72. let c: Cpp.long = x - y;
  73. let d: Cpp.long = x * y;
  74. let e: Cpp.long = x / y;
  75. let f: Cpp.long = x % y;
  76. //@dump-sem-ir-end
  77. }
  78. // --- fail_todo_arithmetic_heterogeneous_long.carbon
  79. library "[[@TEST_NAME]]";
  80. import Cpp;
  81. fn AssertSameType[T:! type](a: T, b: T) {}
  82. fn ArithmeticHeterogeneousLong() {
  83. let x: Cpp.long = 1;
  84. // CHECK:STDERR: fail_todo_arithmetic_heterogeneous_long.carbon:[[@LINE+7]]:3: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent]
  85. // CHECK:STDERR: AssertSameType(x + (1 as i32), x);
  86. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  87. // CHECK:STDERR: fail_todo_arithmetic_heterogeneous_long.carbon:[[@LINE-8]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
  88. // CHECK:STDERR: fn AssertSameType[T:! type](a: T, b: T) {}
  89. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  90. // CHECK:STDERR:
  91. AssertSameType(x + (1 as i32), x);
  92. // CHECK:STDERR: fail_todo_arithmetic_heterogeneous_long.carbon:[[@LINE+7]]:3: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent]
  93. // CHECK:STDERR: AssertSameType((1 as i32) + x, x);
  94. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  95. // CHECK:STDERR: fail_todo_arithmetic_heterogeneous_long.carbon:[[@LINE-17]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
  96. // CHECK:STDERR: fn AssertSameType[T:! type](a: T, b: T) {}
  97. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  98. // CHECK:STDERR:
  99. AssertSameType((1 as i32) + x, x);
  100. let y: i64 = 1;
  101. // CHECK:STDERR: fail_todo_arithmetic_heterogeneous_long.carbon:[[@LINE+4]]:18: error: cannot access member of interface `Core.AddWith(i64)` in type `Cpp.long` that does not implement that interface [MissingImplInMemberAccess]
  102. // CHECK:STDERR: AssertSameType(x + y, y);
  103. // CHECK:STDERR: ^~~~~
  104. // CHECK:STDERR:
  105. AssertSameType(x + y, y);
  106. // CHECK:STDERR: fail_todo_arithmetic_heterogeneous_long.carbon:[[@LINE+4]]:18: error: cannot access member of interface `Core.AddWith(Cpp.long)` in type `i64` that does not implement that interface [MissingImplInMemberAccess]
  107. // CHECK:STDERR: AssertSameType(y + x, y);
  108. // CHECK:STDERR: ^~~~~
  109. // CHECK:STDERR:
  110. AssertSameType(y + x, y);
  111. }
  112. // --- bitwise_homogeneous_long.carbon
  113. library "[[@TEST_NAME]]";
  114. import Cpp;
  115. fn AssertSameType[T:! type](a: T, b: T) {}
  116. fn BitWiseHomogeneousLong() {
  117. //@dump-sem-ir-begin
  118. let a: Cpp.long = 1;
  119. let b: Cpp.long = 1;
  120. let c: Cpp.long = 1;
  121. AssertSameType(^a, c);
  122. AssertSameType(a & b, c);
  123. AssertSameType(a | b, c);
  124. AssertSameType(a ^ b, c);
  125. AssertSameType(a << b, c);
  126. AssertSameType(a >> b, c);
  127. //@dump-sem-ir-end
  128. }
  129. // --- fail_todo_bitwise_heterogeneous_long.carbon
  130. library "[[@TEST_NAME]]";
  131. import Cpp;
  132. fn AssertSameType[T:! type](a: T, b: T) {}
  133. fn BitWiseHeterogeneousLong() {
  134. //@dump-sem-ir-begin
  135. let a: Cpp.long = 1;
  136. // CHECK:STDERR: fail_todo_bitwise_heterogeneous_long.carbon:[[@LINE+7]]:3: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent]
  137. // CHECK:STDERR: AssertSameType(a & (1 as i32), a);
  138. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  139. // CHECK:STDERR: fail_todo_bitwise_heterogeneous_long.carbon:[[@LINE-9]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
  140. // CHECK:STDERR: fn AssertSameType[T:! type](a: T, b: T) {}
  141. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  142. // CHECK:STDERR:
  143. AssertSameType(a & (1 as i32), a);
  144. // CHECK:STDERR: fail_todo_bitwise_heterogeneous_long.carbon:[[@LINE+7]]:3: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent]
  145. // CHECK:STDERR: AssertSameType((1 as i32) & a, a);
  146. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  147. // CHECK:STDERR: fail_todo_bitwise_heterogeneous_long.carbon:[[@LINE-18]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
  148. // CHECK:STDERR: fn AssertSameType[T:! type](a: T, b: T) {}
  149. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  150. // CHECK:STDERR:
  151. AssertSameType((1 as i32) & a, a);
  152. let b: i64 = 1;
  153. // CHECK:STDERR: fail_todo_bitwise_heterogeneous_long.carbon:[[@LINE+4]]:18: error: cannot access member of interface `Core.BitAndWith(i64)` in type `Cpp.long` that does not implement that interface [MissingImplInMemberAccess]
  154. // CHECK:STDERR: AssertSameType(a & b, b);
  155. // CHECK:STDERR: ^~~~~
  156. // CHECK:STDERR:
  157. AssertSameType(a & b, b);
  158. // CHECK:STDERR: fail_todo_bitwise_heterogeneous_long.carbon:[[@LINE+4]]:18: error: cannot access member of interface `Core.BitAndWith(Cpp.long)` in type `i64` that does not implement that interface [MissingImplInMemberAccess]
  159. // CHECK:STDERR: AssertSameType(b & a, b);
  160. // CHECK:STDERR: ^~~~~
  161. // CHECK:STDERR:
  162. AssertSameType(b & a, b);
  163. //@dump-sem-ir-end
  164. }
  165. // --- compound_assignment_homogeneous_long.carbon
  166. library "[[@TEST_NAME]]";
  167. import Cpp;
  168. fn CompoundAssignmentHomogeneousLong() {
  169. //@dump-sem-ir-begin
  170. var a: Cpp.long = 1;
  171. var b: Cpp.long = 1;
  172. a += b;
  173. a -= b;
  174. a *= b;
  175. a /= b;
  176. a %= b;
  177. a &= b;
  178. a |= b;
  179. a ^= b;
  180. a <<= b;
  181. a >>= b;
  182. //@dump-sem-ir-end
  183. }
  184. // --- fail_todo_compound_assignment_heterogeneous_long_and_i32.carbon
  185. library "[[@TEST_NAME]]";
  186. import Cpp;
  187. fn CompoundAssignmentHeterogeneousI32Long() {
  188. var a: Cpp.long = 1;
  189. // CHECK:STDERR: fail_todo_compound_assignment_heterogeneous_long_and_i32.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.AddAssignWith(i32)` in type `Cpp.long` that does not implement that interface [MissingImplInMemberAccess]
  190. // CHECK:STDERR: a += (1 as i32);
  191. // CHECK:STDERR: ^~~~~~~~~~~~~~~
  192. // CHECK:STDERR:
  193. a += (1 as i32);
  194. }
  195. // --- fail_compound_assignment_heterogeneous_long_and_i64.carbon
  196. library "[[@TEST_NAME]]";
  197. import Cpp;
  198. fn CompoundAssignmentHeterogeneousI64Long() {
  199. var a: Cpp.long = 1;
  200. // CHECK:STDERR: fail_compound_assignment_heterogeneous_long_and_i64.carbon:[[@LINE+4]]:3: error: cannot access member of interface `Core.AddAssignWith(i64)` in type `Cpp.long` that does not implement that interface [MissingImplInMemberAccess]
  201. // CHECK:STDERR: a += (1 as i64);
  202. // CHECK:STDERR: ^~~~~~~~~~~~~~~
  203. // CHECK:STDERR:
  204. a += (1 as i64);
  205. }
  206. // --- increment_decrement_long.carbon
  207. library "[[@TEST_NAME]]";
  208. import Cpp;
  209. fn IncrementDecrementLong() {
  210. //@dump-sem-ir-begin
  211. var a: Cpp.long = 1;
  212. ++a;
  213. --a;
  214. //@dump-sem-ir-end
  215. }
  216. // --- unsigned_long.carbon
  217. library "[[@TEST_NAME]]";
  218. import Cpp inline
  219. '''
  220. class ULongResult {};
  221. auto PassULong(unsigned long x) -> ULongResult;
  222. class UIntResult {};
  223. auto PassULong(unsigned int x) -> UIntResult;
  224. ''';
  225. fn F() {
  226. //@dump-sem-ir-begin
  227. let cpp_unsigned_long: Cpp.unsigned_long = 1;
  228. let cpp_unsigned_long_result: Cpp.ULongResult = Cpp.PassULong(cpp_unsigned_long);
  229. let cpp_compat_ulong: Core.CppCompat.ULong32 = cpp_unsigned_long;
  230. let cpp_compat_ulong_result: Cpp.ULongResult = Cpp.PassULong(cpp_compat_ulong);
  231. let carbon_u32: u32 = cpp_unsigned_long;
  232. let carbon_u32_result: Cpp.UIntResult = Cpp.PassULong(carbon_u32);
  233. var a: array(f32, 1 as Cpp.unsigned_long) = (1.0,);
  234. //@dump-sem-ir-end
  235. }
  236. // CHECK:STDOUT: --- long_long.carbon
  237. // CHECK:STDOUT:
  238. // CHECK:STDOUT: constants {
  239. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  240. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
  241. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  242. // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
  243. // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete]
  244. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  245. // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete]
  246. // CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete]
  247. // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  248. // 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]
  249. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
  250. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  251. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  252. // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
  253. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic]
  254. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic]
  255. // CHECK:STDOUT: %ImplicitAs.impl_witness.556: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
  256. // 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]
  257. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete]
  258. // CHECK:STDOUT: %ImplicitAs.facet.d48: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete]
  259. // CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.d48 [concrete]
  260. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete]
  261. // 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]
  262. // CHECK:STDOUT: %bound_method.288: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  263. // CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
  264. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  265. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  266. // CHECK:STDOUT: %As.type.229: type = facet_type <@As, @As(%i64)> [concrete]
  267. // CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete]
  268. // 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]
  269. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
  270. // CHECK:STDOUT: %As.impl_witness.c71: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  271. // 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]
  272. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a54: %Core.IntLiteral.as.As.impl.Convert.type.cee = struct_value () [concrete]
  273. // CHECK:STDOUT: %As.facet: %As.type.229 = facet_value Core.IntLiteral, (%As.impl_witness.c71) [concrete]
  274. // CHECK:STDOUT: %.aba: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete]
  275. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a54 [concrete]
  276. // 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]
  277. // CHECK:STDOUT: %bound_method.41b: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  278. // CHECK:STDOUT: %ImplicitAs.impl_witness.e86: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.ea2, @Int.as.ImplicitAs.impl(%int_64) [concrete]
  279. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.ccf: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_64) [concrete]
  280. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.535: %Int.as.ImplicitAs.impl.Convert.type.ccf = struct_value () [concrete]
  281. // CHECK:STDOUT: %ImplicitAs.facet.234: %ImplicitAs.type.139 = facet_value %i64, (%ImplicitAs.impl_witness.e86) [concrete]
  282. // CHECK:STDOUT: %.3aa: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.234 [concrete]
  283. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.535 [concrete]
  284. // 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]
  285. // CHECK:STDOUT: %bound_method.d1e: <bound method> = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  286. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  287. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  288. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  289. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  290. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  291. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  292. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  293. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  294. // 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]
  295. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  296. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  297. // 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]
  298. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  299. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  300. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  301. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  302. // 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]
  303. // CHECK:STDOUT: %bound_method.1e4: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  304. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  305. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  306. // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
  307. // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
  308. // CHECK:STDOUT: }
  309. // CHECK:STDOUT:
  310. // CHECK:STDOUT: imports {
  311. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  312. // CHECK:STDOUT: .long_long = @F.%i64.1
  313. // CHECK:STDOUT: import Cpp//...
  314. // CHECK:STDOUT: }
  315. // 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)]
  316. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.74f = impl_witness_table (%Core.import_ref.42d), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  317. // 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)]
  318. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.ea2 = impl_witness_table (%Core.import_ref.0bc), @Int.as.ImplicitAs.impl [concrete]
  319. // 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)]
  320. // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
  321. // 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)]
  322. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  323. // CHECK:STDOUT: }
  324. // CHECK:STDOUT:
  325. // CHECK:STDOUT: fn @F() {
  326. // CHECK:STDOUT: !entry:
  327. // CHECK:STDOUT: name_binding_decl {
  328. // CHECK:STDOUT: %cpp_long_long.patt: %pattern_type.95b = value_binding_pattern cpp_long_long [concrete]
  329. // CHECK:STDOUT: }
  330. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  331. // CHECK:STDOUT: %.loc8_25: type = splice_block %long_long.ref.loc8 [concrete = constants.%i64] {
  332. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  333. // CHECK:STDOUT: <elided>
  334. // CHECK:STDOUT: %long_long.ref.loc8: type = name_ref long_long, %i64.1 [concrete = constants.%i64]
  335. // CHECK:STDOUT: }
  336. // CHECK:STDOUT: %impl.elem0.loc8: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
  337. // 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]
  338. // 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]
  339. // CHECK:STDOUT: %bound_method.loc8_38.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.288]
  340. // 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]
  341. // CHECK:STDOUT: %.loc8_38.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.41a]
  342. // CHECK:STDOUT: %.loc8_38.2: %i64 = converted %int_1.loc8, %.loc8_38.1 [concrete = constants.%int_1.41a]
  343. // CHECK:STDOUT: %cpp_long_long: %i64 = value_binding cpp_long_long, %.loc8_38.2
  344. // CHECK:STDOUT: name_binding_decl {
  345. // CHECK:STDOUT: %carbon_long_long.patt: %pattern_type.95b = value_binding_pattern carbon_long_long [concrete]
  346. // CHECK:STDOUT: }
  347. // CHECK:STDOUT: %cpp_long_long.ref: %i64 = name_ref cpp_long_long, %cpp_long_long
  348. // CHECK:STDOUT: %.loc9: type = splice_block %i64.loc9 [concrete = constants.%i64] {
  349. // CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  350. // CHECK:STDOUT: %i64.loc9: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
  351. // CHECK:STDOUT: }
  352. // CHECK:STDOUT: %carbon_long_long: %i64 = value_binding carbon_long_long, %cpp_long_long.ref
  353. // CHECK:STDOUT: name_binding_decl {
  354. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  355. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  356. // CHECK:STDOUT: }
  357. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  358. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  359. // CHECK:STDOUT: %.loc11_48.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  360. // 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]
  361. // 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]
  362. // 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]
  363. // CHECK:STDOUT: %bound_method.loc11_48.2: <bound method> = bound_method %float, %specific_fn.loc11_48 [concrete = constants.%bound_method.1e4]
  364. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_48.2(%float) [concrete = constants.%float.e3b]
  365. // CHECK:STDOUT: %.loc11_48.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  366. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  367. // CHECK:STDOUT: %.loc11_48.3: ref %f32.97e = array_index %a.var, %int_0
  368. // CHECK:STDOUT: %.loc11_48.4: init %f32.97e to %.loc11_48.3 = initialize_from %.loc11_48.2 [concrete = constants.%float.e3b]
  369. // CHECK:STDOUT: %.loc11_48.5: init %array_type to %a.var = array_init (%.loc11_48.4) [concrete = constants.%array]
  370. // CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_48.1, %.loc11_48.5 [concrete = constants.%array]
  371. // CHECK:STDOUT: assign %a.var, %.loc11_3
  372. // CHECK:STDOUT: %.loc11_39: type = splice_block %array_type [concrete = constants.%array_type] {
  373. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  374. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  375. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  376. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  377. // CHECK:STDOUT: %long_long.ref.loc11: type = name_ref long_long, %i64.1 [concrete = constants.%i64]
  378. // 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]
  379. // 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]
  380. // 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]
  381. // CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.41b]
  382. // 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]
  383. // CHECK:STDOUT: %.loc11_23.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
  384. // CHECK:STDOUT: %.loc11_23.2: %i64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.41a]
  385. // 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]
  386. // 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]
  387. // 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]
  388. // CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.d1e]
  389. // 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]
  390. // CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
  391. // CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
  392. // CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
  393. // CHECK:STDOUT: }
  394. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  395. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
  396. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  397. // CHECK:STDOUT: <elided>
  398. // CHECK:STDOUT: }
  399. // CHECK:STDOUT:
  400. // CHECK:STDOUT: fn @DestroyOp(%self.param: %array_type) = "no_op";
  401. // CHECK:STDOUT:
  402. // CHECK:STDOUT: --- unsigned_long_long.carbon
  403. // CHECK:STDOUT:
  404. // CHECK:STDOUT: constants {
  405. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  406. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
  407. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  408. // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete]
  409. // CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete]
  410. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  411. // CHECK:STDOUT: %ImplicitAs.type.584: type = facet_type <@ImplicitAs, @ImplicitAs(%u64)> [concrete]
  412. // CHECK:STDOUT: %ImplicitAs.Convert.type.c65: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u64) [concrete]
  413. // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  414. // 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]
  415. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic]
  416. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  417. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  418. // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
  419. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.7f8: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%From) [symbolic]
  420. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.0ea: %UInt.as.ImplicitAs.impl.Convert.type.7f8 = struct_value () [symbolic]
  421. // CHECK:STDOUT: %ImplicitAs.impl_witness.bb3: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.899, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
  422. // 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]
  423. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.042: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fb8 = struct_value () [concrete]
  424. // CHECK:STDOUT: %ImplicitAs.facet.dfe: %ImplicitAs.type.584 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bb3) [concrete]
  425. // CHECK:STDOUT: %.da7: type = fn_type_with_self_type %ImplicitAs.Convert.type.c65, %ImplicitAs.facet.dfe [concrete]
  426. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.042 [concrete]
  427. // 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]
  428. // CHECK:STDOUT: %bound_method.fec: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  429. // CHECK:STDOUT: %int_1.f23: %u64 = int_value 1 [concrete]
  430. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  431. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  432. // CHECK:STDOUT: %As.type.f20: type = facet_type <@As, @As(%u64)> [concrete]
  433. // CHECK:STDOUT: %As.Convert.type.7eb: type = fn_type @As.Convert, @As(%u64) [concrete]
  434. // 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]
  435. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.979: %Core.IntLiteral.as.As.impl.Convert.type.2b1 = struct_value () [symbolic]
  436. // CHECK:STDOUT: %As.impl_witness.f54: <witness> = impl_witness imports.%As.impl_witness_table.7eb, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  437. // 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]
  438. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.715: %Core.IntLiteral.as.As.impl.Convert.type.0f2 = struct_value () [concrete]
  439. // CHECK:STDOUT: %As.facet: %As.type.f20 = facet_value Core.IntLiteral, (%As.impl_witness.f54) [concrete]
  440. // CHECK:STDOUT: %.11a: type = fn_type_with_self_type %As.Convert.type.7eb, %As.facet [concrete]
  441. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.715 [concrete]
  442. // 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]
  443. // CHECK:STDOUT: %bound_method.9cf: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  444. // CHECK:STDOUT: %ImplicitAs.impl_witness.2cc: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.493, @UInt.as.ImplicitAs.impl(%int_64) [concrete]
  445. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.812: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%int_64) [concrete]
  446. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.309: %UInt.as.ImplicitAs.impl.Convert.type.812 = struct_value () [concrete]
  447. // CHECK:STDOUT: %ImplicitAs.facet.02d: %ImplicitAs.type.139 = facet_value %u64, (%ImplicitAs.impl_witness.2cc) [concrete]
  448. // CHECK:STDOUT: %.a1c: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.02d [concrete]
  449. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.309 [concrete]
  450. // 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]
  451. // CHECK:STDOUT: %bound_method.f18: <bound method> = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  452. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  453. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  454. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  455. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  456. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  457. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  458. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  459. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  460. // 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]
  461. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  462. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  463. // 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]
  464. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  465. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  466. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  467. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  468. // 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]
  469. // CHECK:STDOUT: %bound_method.1e4: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  470. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  471. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  472. // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
  473. // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
  474. // CHECK:STDOUT: }
  475. // CHECK:STDOUT:
  476. // CHECK:STDOUT: imports {
  477. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  478. // CHECK:STDOUT: .unsigned_long_long = @F.%u64.1
  479. // CHECK:STDOUT: import Cpp//...
  480. // CHECK:STDOUT: }
  481. // 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)]
  482. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.899 = impl_witness_table (%Core.import_ref.741), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  483. // 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)]
  484. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.493 = impl_witness_table (%Core.import_ref.483), @UInt.as.ImplicitAs.impl [concrete]
  485. // 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)]
  486. // CHECK:STDOUT: %As.impl_witness_table.7eb = impl_witness_table (%Core.import_ref.600), @Core.IntLiteral.as.As.impl [concrete]
  487. // 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)]
  488. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  489. // CHECK:STDOUT: }
  490. // CHECK:STDOUT:
  491. // CHECK:STDOUT: fn @F() {
  492. // CHECK:STDOUT: !entry:
  493. // CHECK:STDOUT: name_binding_decl {
  494. // CHECK:STDOUT: %cpp_unsigned_long_long.patt: %pattern_type.157 = value_binding_pattern cpp_unsigned_long_long [concrete]
  495. // CHECK:STDOUT: }
  496. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  497. // CHECK:STDOUT: %.loc8_34: type = splice_block %unsigned_long_long.ref.loc8 [concrete = constants.%u64] {
  498. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  499. // CHECK:STDOUT: <elided>
  500. // CHECK:STDOUT: %unsigned_long_long.ref.loc8: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64]
  501. // CHECK:STDOUT: }
  502. // CHECK:STDOUT: %impl.elem0.loc8: %.da7 = impl_witness_access constants.%ImplicitAs.impl_witness.bb3, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.042]
  503. // 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]
  504. // 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]
  505. // CHECK:STDOUT: %bound_method.loc8_56.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.fec]
  506. // 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]
  507. // CHECK:STDOUT: %.loc8_56.1: %u64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.f23]
  508. // CHECK:STDOUT: %.loc8_56.2: %u64 = converted %int_1.loc8, %.loc8_56.1 [concrete = constants.%int_1.f23]
  509. // CHECK:STDOUT: %cpp_unsigned_long_long: %u64 = value_binding cpp_unsigned_long_long, %.loc8_56.2
  510. // CHECK:STDOUT: name_binding_decl {
  511. // CHECK:STDOUT: %carbon_unsigned_long_long.patt: %pattern_type.157 = value_binding_pattern carbon_unsigned_long_long [concrete]
  512. // CHECK:STDOUT: }
  513. // CHECK:STDOUT: %cpp_unsigned_long_long.ref: %u64 = name_ref cpp_unsigned_long_long, %cpp_unsigned_long_long
  514. // CHECK:STDOUT: %.loc9: type = splice_block %u64.loc9 [concrete = constants.%u64] {
  515. // CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  516. // CHECK:STDOUT: %u64.loc9: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
  517. // CHECK:STDOUT: }
  518. // CHECK:STDOUT: %carbon_unsigned_long_long: %u64 = value_binding carbon_unsigned_long_long, %cpp_unsigned_long_long.ref
  519. // CHECK:STDOUT: name_binding_decl {
  520. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  521. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  522. // CHECK:STDOUT: }
  523. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  524. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  525. // CHECK:STDOUT: %.loc11_57.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  526. // 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]
  527. // 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]
  528. // 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]
  529. // CHECK:STDOUT: %bound_method.loc11_57.2: <bound method> = bound_method %float, %specific_fn.loc11_57 [concrete = constants.%bound_method.1e4]
  530. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_57.2(%float) [concrete = constants.%float.e3b]
  531. // CHECK:STDOUT: %.loc11_57.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  532. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  533. // CHECK:STDOUT: %.loc11_57.3: ref %f32.97e = array_index %a.var, %int_0
  534. // CHECK:STDOUT: %.loc11_57.4: init %f32.97e to %.loc11_57.3 = initialize_from %.loc11_57.2 [concrete = constants.%float.e3b]
  535. // CHECK:STDOUT: %.loc11_57.5: init %array_type to %a.var = array_init (%.loc11_57.4) [concrete = constants.%array]
  536. // CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_57.1, %.loc11_57.5 [concrete = constants.%array]
  537. // CHECK:STDOUT: assign %a.var, %.loc11_3
  538. // CHECK:STDOUT: %.loc11_48: type = splice_block %array_type [concrete = constants.%array_type] {
  539. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  540. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  541. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  542. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  543. // CHECK:STDOUT: %unsigned_long_long.ref.loc11: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64]
  544. // 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]
  545. // 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]
  546. // 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]
  547. // CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.9cf]
  548. // 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]
  549. // CHECK:STDOUT: %.loc11_23.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
  550. // CHECK:STDOUT: %.loc11_23.2: %u64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.f23]
  551. // 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]
  552. // 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]
  553. // 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]
  554. // CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.f18]
  555. // 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]
  556. // CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
  557. // CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
  558. // CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
  559. // CHECK:STDOUT: }
  560. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  561. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
  562. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  563. // CHECK:STDOUT: <elided>
  564. // CHECK:STDOUT: }
  565. // CHECK:STDOUT:
  566. // CHECK:STDOUT: fn @DestroyOp(%self.param: %array_type) = "no_op";
  567. // CHECK:STDOUT:
  568. // CHECK:STDOUT: --- long.carbon
  569. // CHECK:STDOUT:
  570. // CHECK:STDOUT: constants {
  571. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  572. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  573. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  574. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  575. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  576. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  577. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  578. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  579. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  580. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  581. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  582. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  583. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  584. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  585. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  586. // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  587. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  588. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  589. // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  590. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete]
  591. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete]
  592. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = struct_value () [concrete]
  593. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a [concrete]
  594. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  595. // CHECK:STDOUT: %LongResult: type = class_type @LongResult [concrete]
  596. // CHECK:STDOUT: %pattern_type.cd9: type = pattern_type %LongResult [concrete]
  597. // CHECK:STDOUT: %PassLong.cpp_overload_set.type: type = cpp_overload_set_type @PassLong.cpp_overload_set [concrete]
  598. // CHECK:STDOUT: %PassLong.cpp_overload_set.value: %PassLong.cpp_overload_set.type = cpp_overload_set_value @PassLong.cpp_overload_set [concrete]
  599. // CHECK:STDOUT: %ptr.305: type = ptr_type %LongResult [concrete]
  600. // CHECK:STDOUT: %PassLong__carbon_thunk.type.9d9430.1: type = fn_type @PassLong__carbon_thunk.1 [concrete]
  601. // CHECK:STDOUT: %PassLong__carbon_thunk.58a8f3.1: %PassLong__carbon_thunk.type.9d9430.1 = struct_value () [concrete]
  602. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  603. // CHECK:STDOUT: %ImplicitAs.impl_witness.925: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.c80 [concrete]
  604. // CHECK:STDOUT: %ImplicitAs.facet.96f: %ImplicitAs.type.e8c = facet_value %Cpp.long, (%ImplicitAs.impl_witness.925) [concrete]
  605. // CHECK:STDOUT: %.79c: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.96f [concrete]
  606. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.796: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.1 [concrete]
  607. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.3eb: %Cpp.long.as.ImplicitAs.impl.Convert.type.796 = struct_value () [concrete]
  608. // CHECK:STDOUT: %IntResult: type = class_type @IntResult [concrete]
  609. // CHECK:STDOUT: %pattern_type.454: type = pattern_type %IntResult [concrete]
  610. // CHECK:STDOUT: %ptr.3cb: type = ptr_type %IntResult [concrete]
  611. // CHECK:STDOUT: %PassLong__carbon_thunk.type.9d9430.2: type = fn_type @PassLong__carbon_thunk.2 [concrete]
  612. // CHECK:STDOUT: %PassLong__carbon_thunk.58a8f3.2: %PassLong__carbon_thunk.type.9d9430.2 = struct_value () [concrete]
  613. // CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
  614. // CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
  615. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  616. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  617. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  618. // CHECK:STDOUT: %As.type.508: type = facet_type <@As, @As(%Cpp.long)> [concrete]
  619. // CHECK:STDOUT: %As.Convert.type.229: type = fn_type @As.Convert, @As(%Cpp.long) [concrete]
  620. // CHECK:STDOUT: %As.impl_witness.60c: <witness> = impl_witness imports.%As.impl_witness_table.797 [concrete]
  621. // CHECK:STDOUT: %As.facet: %As.type.508 = facet_value Core.IntLiteral, (%As.impl_witness.60c) [concrete]
  622. // CHECK:STDOUT: %.040: type = fn_type_with_self_type %As.Convert.type.229, %As.facet [concrete]
  623. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
  624. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
  625. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete]
  626. // CHECK:STDOUT: %ImplicitAs.impl_witness.e4d: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a09 [concrete]
  627. // CHECK:STDOUT: %ImplicitAs.facet.772: %ImplicitAs.type.139 = facet_value %Cpp.long, (%ImplicitAs.impl_witness.e4d) [concrete]
  628. // CHECK:STDOUT: %.8e3: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.772 [concrete]
  629. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.9ed: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.2 [concrete]
  630. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.d49: %Cpp.long.as.ImplicitAs.impl.Convert.type.9ed = struct_value () [concrete]
  631. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5a4, %Cpp.long.as.ImplicitAs.impl.Convert.d49 [concrete]
  632. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  633. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  634. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  635. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  636. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  637. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  638. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  639. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  640. // 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]
  641. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  642. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  643. // 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]
  644. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  645. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  646. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  647. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  648. // 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]
  649. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  650. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  651. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  652. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  653. // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc24 [concrete]
  654. // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete]
  655. // CHECK:STDOUT: %IntResult.cpp_destructor.type: type = fn_type @IntResult.cpp_destructor [concrete]
  656. // CHECK:STDOUT: %IntResult.cpp_destructor: %IntResult.cpp_destructor.type = struct_value () [concrete]
  657. // CHECK:STDOUT: %LongResult.cpp_destructor.type: type = fn_type @LongResult.cpp_destructor [concrete]
  658. // CHECK:STDOUT: %LongResult.cpp_destructor: %LongResult.cpp_destructor.type = struct_value () [concrete]
  659. // CHECK:STDOUT: }
  660. // CHECK:STDOUT:
  661. // CHECK:STDOUT: imports {
  662. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  663. // CHECK:STDOUT: .CppCompat = %CppCompat.4b4
  664. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  665. // CHECK:STDOUT: .Int = %Core.Int
  666. // CHECK:STDOUT: .Float = %Core.Float
  667. // CHECK:STDOUT: .As = %Core.As
  668. // CHECK:STDOUT: .Destroy = %Core.Destroy
  669. // CHECK:STDOUT: import Core//prelude
  670. // CHECK:STDOUT: import Core//prelude/...
  671. // CHECK:STDOUT: }
  672. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  673. // CHECK:STDOUT: .long = constants.%Cpp.long
  674. // CHECK:STDOUT: .LongResult = %LongResult.decl
  675. // CHECK:STDOUT: .PassLong = %PassLong.cpp_overload_set.value
  676. // CHECK:STDOUT: .IntResult = %IntResult.decl
  677. // CHECK:STDOUT: import Cpp//...
  678. // CHECK:STDOUT: }
  679. // CHECK:STDOUT: %Core.CppCompat: <namespace> = import_ref Core//prelude, CppCompat, loaded
  680. // CHECK:STDOUT: %CppCompat.4b4: <namespace> = namespace %Core.CppCompat, [concrete] {
  681. // CHECK:STDOUT: .Long32 = %Core.Long32
  682. // CHECK:STDOUT: import Core//prelude
  683. // CHECK:STDOUT: import Core//prelude/...
  684. // CHECK:STDOUT: }
  685. // CHECK:STDOUT: %Core.Long32: type = import_ref Core//prelude/types/cpp/int, Long32, loaded [concrete = constants.%Cpp.long]
  686. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  687. // 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]
  688. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  689. // CHECK:STDOUT: %LongResult.decl: type = class_decl @LongResult [concrete = constants.%LongResult] {} {}
  690. // 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]
  691. // 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] {
  692. // CHECK:STDOUT: <elided>
  693. // CHECK:STDOUT: } {
  694. // CHECK:STDOUT: <elided>
  695. // CHECK:STDOUT: }
  696. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  697. // 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]
  698. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.c80 = impl_witness_table (%Core.import_ref.946), @Cpp.long.as.ImplicitAs.impl.9f8 [concrete]
  699. // CHECK:STDOUT: %IntResult.decl: type = class_decl @IntResult [concrete = constants.%IntResult] {} {}
  700. // 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] {
  701. // CHECK:STDOUT: <elided>
  702. // CHECK:STDOUT: } {
  703. // CHECK:STDOUT: <elided>
  704. // CHECK:STDOUT: }
  705. // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types/float, Float, loaded [concrete = constants.%Float.generic]
  706. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
  707. // 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]
  708. // CHECK:STDOUT: %As.impl_witness_table.797 = impl_witness_table (%Core.import_ref.686), @Core.IntLiteral.as.As.impl.a00 [concrete]
  709. // 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]
  710. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a09 = impl_witness_table (%Core.import_ref.168), @Cpp.long.as.ImplicitAs.impl.e94 [concrete]
  711. // 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)]
  712. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  713. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  714. // CHECK:STDOUT: }
  715. // CHECK:STDOUT:
  716. // CHECK:STDOUT: fn @F() {
  717. // CHECK:STDOUT: !entry:
  718. // CHECK:STDOUT: name_binding_decl {
  719. // CHECK:STDOUT: %cpp_long.patt: %pattern_type.68c = value_binding_pattern cpp_long [concrete]
  720. // CHECK:STDOUT: }
  721. // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  722. // CHECK:STDOUT: %.loc15_20: type = splice_block %long.ref.loc15 [concrete = constants.%Cpp.long] {
  723. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  724. // CHECK:STDOUT: %long.ref.loc15: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  725. // CHECK:STDOUT: }
  726. // CHECK:STDOUT: %impl.elem0.loc15: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a]
  727. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  728. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.5a4]
  729. // CHECK:STDOUT: %.loc15_28.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5a4]
  730. // CHECK:STDOUT: %.loc15_28.2: %Cpp.long = converted %int_1.loc15, %.loc15_28.1 [concrete = constants.%int_1.5a4]
  731. // CHECK:STDOUT: %cpp_long: %Cpp.long = value_binding cpp_long, %.loc15_28.2
  732. // CHECK:STDOUT: name_binding_decl {
  733. // CHECK:STDOUT: %cpp_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_long_result [concrete]
  734. // CHECK:STDOUT: }
  735. // CHECK:STDOUT: %Cpp.ref.loc16_41: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  736. // 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]
  737. // CHECK:STDOUT: %cpp_long.ref.loc16: %Cpp.long = name_ref cpp_long, %cpp_long
  738. // CHECK:STDOUT: %.loc16_62.1: ref %LongResult = temporary_storage
  739. // CHECK:STDOUT: %addr.loc16: %ptr.305 = addr_of %.loc16_62.1
  740. // 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)
  741. // CHECK:STDOUT: %.loc16_62.2: init %LongResult to %.loc16_62.1 = in_place_init %PassLong__carbon_thunk.call.loc16
  742. // CHECK:STDOUT: %.loc16_27: type = splice_block %LongResult.ref.loc16 [concrete = constants.%LongResult] {
  743. // CHECK:STDOUT: %Cpp.ref.loc16_24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  744. // CHECK:STDOUT: %LongResult.ref.loc16: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
  745. // CHECK:STDOUT: }
  746. // CHECK:STDOUT: %.loc16_62.3: ref %LongResult = temporary %.loc16_62.1, %.loc16_62.2
  747. // CHECK:STDOUT: %.loc16_62.4: %LongResult = acquire_value %.loc16_62.3
  748. // CHECK:STDOUT: %cpp_long_result: %LongResult = value_binding cpp_long_result, %.loc16_62.4
  749. // CHECK:STDOUT: name_binding_decl {
  750. // CHECK:STDOUT: %cpp_compat_long.patt: %pattern_type.68c = value_binding_pattern cpp_compat_long [concrete]
  751. // CHECK:STDOUT: }
  752. // CHECK:STDOUT: %cpp_long.ref.loc18: %Cpp.long = name_ref cpp_long, %cpp_long
  753. // CHECK:STDOUT: %.loc18: type = splice_block %Long32.ref [concrete = constants.%Cpp.long] {
  754. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  755. // CHECK:STDOUT: %CppCompat.ref: <namespace> = name_ref CppCompat, imports.%CppCompat.4b4 [concrete = imports.%CppCompat.4b4]
  756. // CHECK:STDOUT: %Long32.ref: type = name_ref Long32, imports.%Core.Long32 [concrete = constants.%Cpp.long]
  757. // CHECK:STDOUT: }
  758. // CHECK:STDOUT: %cpp_compat_long: %Cpp.long = value_binding cpp_compat_long, %cpp_long.ref.loc18
  759. // CHECK:STDOUT: name_binding_decl {
  760. // CHECK:STDOUT: %cpp_compat_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_compat_long_result [concrete]
  761. // CHECK:STDOUT: }
  762. // CHECK:STDOUT: %Cpp.ref.loc19_48: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  763. // 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]
  764. // CHECK:STDOUT: %cpp_compat_long.ref: %Cpp.long = name_ref cpp_compat_long, %cpp_compat_long
  765. // CHECK:STDOUT: %.loc19_76.1: ref %LongResult = temporary_storage
  766. // CHECK:STDOUT: %addr.loc19: %ptr.305 = addr_of %.loc19_76.1
  767. // 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)
  768. // CHECK:STDOUT: %.loc19_76.2: init %LongResult to %.loc19_76.1 = in_place_init %PassLong__carbon_thunk.call.loc19
  769. // CHECK:STDOUT: %.loc19_34: type = splice_block %LongResult.ref.loc19 [concrete = constants.%LongResult] {
  770. // CHECK:STDOUT: %Cpp.ref.loc19_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  771. // CHECK:STDOUT: %LongResult.ref.loc19: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
  772. // CHECK:STDOUT: }
  773. // CHECK:STDOUT: %.loc19_76.3: ref %LongResult = temporary %.loc19_76.1, %.loc19_76.2
  774. // CHECK:STDOUT: %.loc19_76.4: %LongResult = acquire_value %.loc19_76.3
  775. // CHECK:STDOUT: %cpp_compat_long_result: %LongResult = value_binding cpp_compat_long_result, %.loc19_76.4
  776. // CHECK:STDOUT: name_binding_decl {
  777. // CHECK:STDOUT: %carbon_i32.patt: %pattern_type.7ce = value_binding_pattern carbon_i32 [concrete]
  778. // CHECK:STDOUT: }
  779. // CHECK:STDOUT: %cpp_long.ref.loc21: %Cpp.long = name_ref cpp_long, %cpp_long
  780. // CHECK:STDOUT: %.loc21_19: type = splice_block %i32 [concrete = constants.%i32] {
  781. // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  782. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  783. // CHECK:STDOUT: }
  784. // CHECK:STDOUT: %impl.elem0.loc21: %.79c = impl_witness_access constants.%ImplicitAs.impl_witness.925, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.3eb]
  785. // CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %cpp_long.ref.loc21, %impl.elem0.loc21
  786. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc21: init %i32 = call %bound_method.loc21(%cpp_long.ref.loc21)
  787. // CHECK:STDOUT: %.loc21_25.1: %i32 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc21
  788. // CHECK:STDOUT: %.loc21_25.2: %i32 = converted %cpp_long.ref.loc21, %.loc21_25.1
  789. // CHECK:STDOUT: %carbon_i32: %i32 = value_binding carbon_i32, %.loc21_25.2
  790. // CHECK:STDOUT: name_binding_decl {
  791. // CHECK:STDOUT: %carbon_i32_result.patt: %pattern_type.454 = value_binding_pattern carbon_i32_result [concrete]
  792. // CHECK:STDOUT: }
  793. // CHECK:STDOUT: %Cpp.ref.loc22_42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  794. // 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]
  795. // CHECK:STDOUT: %carbon_i32.ref: %i32 = name_ref carbon_i32, %carbon_i32
  796. // CHECK:STDOUT: %.loc22_65.1: ref %IntResult = temporary_storage
  797. // CHECK:STDOUT: %addr.loc22: %ptr.3cb = addr_of %.loc22_65.1
  798. // CHECK:STDOUT: %PassLong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.2(%carbon_i32.ref, %addr.loc22)
  799. // CHECK:STDOUT: %.loc22_65.2: init %IntResult to %.loc22_65.1 = in_place_init %PassLong__carbon_thunk.call.loc22
  800. // CHECK:STDOUT: %.loc22_29: type = splice_block %IntResult.ref [concrete = constants.%IntResult] {
  801. // CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  802. // CHECK:STDOUT: %IntResult.ref: type = name_ref IntResult, imports.%IntResult.decl [concrete = constants.%IntResult]
  803. // CHECK:STDOUT: }
  804. // CHECK:STDOUT: %.loc22_65.3: ref %IntResult = temporary %.loc22_65.1, %.loc22_65.2
  805. // CHECK:STDOUT: %.loc22_65.4: %IntResult = acquire_value %.loc22_65.3
  806. // CHECK:STDOUT: %carbon_i32_result: %IntResult = value_binding carbon_i32_result, %.loc22_65.4
  807. // CHECK:STDOUT: name_binding_decl {
  808. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  809. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  810. // CHECK:STDOUT: }
  811. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  812. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  813. // CHECK:STDOUT: %.loc24_43.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  814. // 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]
  815. // 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]
  816. // 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]
  817. // CHECK:STDOUT: %bound_method.loc24_43.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
  818. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_43.2(%float) [concrete = constants.%float.e3b]
  819. // CHECK:STDOUT: %.loc24_43.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  820. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  821. // CHECK:STDOUT: %.loc24_43.3: ref %f32.97e = array_index %a.var, %int_0
  822. // CHECK:STDOUT: %.loc24_43.4: init %f32.97e to %.loc24_43.3 = initialize_from %.loc24_43.2 [concrete = constants.%float.e3b]
  823. // CHECK:STDOUT: %.loc24_43.5: init %array_type to %a.var = array_init (%.loc24_43.4) [concrete = constants.%array]
  824. // CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_43.1, %.loc24_43.5 [concrete = constants.%array]
  825. // CHECK:STDOUT: assign %a.var, %.loc24_3
  826. // CHECK:STDOUT: %.loc24_34: type = splice_block %array_type [concrete = constants.%array_type] {
  827. // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  828. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  829. // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  830. // CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  831. // CHECK:STDOUT: %long.ref.loc24: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  832. // 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]
  833. // 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]
  834. // 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]
  835. // CHECK:STDOUT: %.loc24_23.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5a4]
  836. // CHECK:STDOUT: %.loc24_23.2: %Cpp.long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.5a4]
  837. // 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]
  838. // 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]
  839. // 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]
  840. // CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
  841. // CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
  842. // CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
  843. // CHECK:STDOUT: }
  844. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  845. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp.b0ebf8.1
  846. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  847. // CHECK:STDOUT: %IntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_65.3, constants.%IntResult.cpp_destructor
  848. // CHECK:STDOUT: %IntResult.cpp_destructor.call: init %empty_tuple.type = call %IntResult.cpp_destructor.bound(%.loc22_65.3)
  849. // CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_76.3, constants.%LongResult.cpp_destructor
  850. // CHECK:STDOUT: %LongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc19(%.loc19_76.3)
  851. // CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_62.3, constants.%LongResult.cpp_destructor
  852. // CHECK:STDOUT: %LongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc16(%.loc16_62.3)
  853. // CHECK:STDOUT: <elided>
  854. // CHECK:STDOUT: }
  855. // CHECK:STDOUT:
  856. // CHECK:STDOUT: fn @DestroyOp.loc24(%self.param: %array_type) = "no_op";
  857. // CHECK:STDOUT:
  858. // CHECK:STDOUT: fn @DestroyOp.loc22(%self.param: %IntResult) = "no_op";
  859. // CHECK:STDOUT:
  860. // CHECK:STDOUT: fn @DestroyOp.loc19(%self.param: %LongResult) = "no_op";
  861. // CHECK:STDOUT:
  862. // CHECK:STDOUT: --- copy_long.carbon
  863. // CHECK:STDOUT:
  864. // CHECK:STDOUT: constants {
  865. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  866. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  867. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  868. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  869. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  870. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  871. // CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
  872. // CHECK:STDOUT: %Copy.Op.type: type = fn_type @Copy.Op [concrete]
  873. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  874. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  875. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete]
  876. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  877. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  878. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  879. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  880. // CHECK:STDOUT: %Copy.impl_witness.e75: <witness> = impl_witness imports.%Copy.impl_witness_table.572 [concrete]
  881. // CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %Cpp.long, (%Copy.impl_witness.e75) [concrete]
  882. // CHECK:STDOUT: %.03e: type = fn_type_with_self_type %Copy.Op.type, %Copy.facet [concrete]
  883. // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.type: type = fn_type @Cpp.long.as.Copy.impl.Op [concrete]
  884. // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op: %Cpp.long.as.Copy.impl.Op.type = struct_value () [concrete]
  885. // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
  886. // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
  887. // CHECK:STDOUT: }
  888. // CHECK:STDOUT:
  889. // CHECK:STDOUT: imports {
  890. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  891. // CHECK:STDOUT: .long = constants.%Cpp.long
  892. // CHECK:STDOUT: import Cpp//...
  893. // CHECK:STDOUT: }
  894. // 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]
  895. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  896. // CHECK:STDOUT: %Core.import_ref.915: %Cpp.long.as.Copy.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.Copy.impl.Op]
  897. // CHECK:STDOUT: %Copy.impl_witness_table.572 = impl_witness_table (%Core.import_ref.915), @Cpp.long.as.Copy.impl [concrete]
  898. // CHECK:STDOUT: }
  899. // CHECK:STDOUT:
  900. // CHECK:STDOUT: fn @CopyLong() {
  901. // CHECK:STDOUT: !entry:
  902. // CHECK:STDOUT: name_binding_decl {
  903. // CHECK:STDOUT: %a.patt: %pattern_type.68c = ref_binding_pattern a [concrete]
  904. // CHECK:STDOUT: %a.var_patt: %pattern_type.68c = var_pattern %a.patt [concrete]
  905. // CHECK:STDOUT: }
  906. // CHECK:STDOUT: %a.var: ref %Cpp.long = var %a.var_patt
  907. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  908. // CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  909. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  910. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.5a4]
  911. // CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5a4]
  912. // CHECK:STDOUT: assign %a.var, %.loc8_3
  913. // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref.loc8 [concrete = constants.%Cpp.long] {
  914. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  915. // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  916. // CHECK:STDOUT: }
  917. // CHECK:STDOUT: %a: ref %Cpp.long = ref_binding a, %a.var
  918. // CHECK:STDOUT: name_binding_decl {
  919. // CHECK:STDOUT: %b.patt: %pattern_type.68c = ref_binding_pattern b [concrete]
  920. // CHECK:STDOUT: %b.var_patt: %pattern_type.68c = var_pattern %b.patt [concrete]
  921. // CHECK:STDOUT: }
  922. // CHECK:STDOUT: %b.var: ref %Cpp.long = var %b.var_patt
  923. // CHECK:STDOUT: %a.ref: ref %Cpp.long = name_ref a, %a
  924. // CHECK:STDOUT: %.loc9_21: %Cpp.long = acquire_value %a.ref
  925. // CHECK:STDOUT: %impl.elem0.loc9: %.03e = impl_witness_access constants.%Copy.impl_witness.e75, element0 [concrete = constants.%Cpp.long.as.Copy.impl.Op]
  926. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_21, %impl.elem0.loc9
  927. // CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.call: init %Cpp.long = call %bound_method.loc9(%.loc9_21)
  928. // CHECK:STDOUT: assign %b.var, %Cpp.long.as.Copy.impl.Op.call
  929. // CHECK:STDOUT: %.loc9_13: type = splice_block %long.ref.loc9 [concrete = constants.%Cpp.long] {
  930. // CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  931. // CHECK:STDOUT: %long.ref.loc9: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  932. // CHECK:STDOUT: }
  933. // CHECK:STDOUT: %b: ref %Cpp.long = ref_binding b, %b.var
  934. // CHECK:STDOUT: %DestroyOp.bound.loc9: <bound method> = bound_method %b.var, constants.%DestroyOp
  935. // CHECK:STDOUT: %DestroyOp.call.loc9: init %empty_tuple.type = call %DestroyOp.bound.loc9(%b.var)
  936. // CHECK:STDOUT: %DestroyOp.bound.loc8: <bound method> = bound_method %a.var, constants.%DestroyOp
  937. // CHECK:STDOUT: %DestroyOp.call.loc8: init %empty_tuple.type = call %DestroyOp.bound.loc8(%a.var)
  938. // CHECK:STDOUT: <elided>
  939. // CHECK:STDOUT: }
  940. // CHECK:STDOUT:
  941. // CHECK:STDOUT: fn @DestroyOp(%self.param: %Cpp.long) = "no_op";
  942. // CHECK:STDOUT:
  943. // CHECK:STDOUT: --- arithmetic_homogeneous_long.carbon
  944. // CHECK:STDOUT:
  945. // CHECK:STDOUT: constants {
  946. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  947. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  948. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  949. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  950. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  951. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  952. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  953. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete]
  954. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  955. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  956. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  957. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  958. // CHECK:STDOUT: %Negate.type: type = facet_type <@Negate> [concrete]
  959. // CHECK:STDOUT: %Negate.Op.type: type = fn_type @Negate.Op [concrete]
  960. // CHECK:STDOUT: %Negate.impl_witness: <witness> = impl_witness imports.%Negate.impl_witness_table [concrete]
  961. // CHECK:STDOUT: %Negate.facet: %Negate.type = facet_value %Cpp.long, (%Negate.impl_witness) [concrete]
  962. // CHECK:STDOUT: %.494: type = fn_type_with_self_type %Negate.Op.type, %Negate.facet [concrete]
  963. // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op.type: type = fn_type @Cpp.long.as.Negate.impl.Op [concrete]
  964. // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op: %Cpp.long.as.Negate.impl.Op.type = struct_value () [concrete]
  965. // CHECK:STDOUT: %AddWith.type.9c2: type = facet_type <@AddWith, @AddWith(%Cpp.long)> [concrete]
  966. // CHECK:STDOUT: %AddWith.Op.type.9a6: type = fn_type @AddWith.Op, @AddWith(%Cpp.long) [concrete]
  967. // CHECK:STDOUT: %AddWith.impl_witness: <witness> = impl_witness imports.%AddWith.impl_witness_table [concrete]
  968. // CHECK:STDOUT: %AddWith.facet: %AddWith.type.9c2 = facet_value %Cpp.long, (%AddWith.impl_witness) [concrete]
  969. // CHECK:STDOUT: %.a81: type = fn_type_with_self_type %AddWith.Op.type.9a6, %AddWith.facet [concrete]
  970. // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.type: type = fn_type @Cpp.long.as.AddWith.impl.Op [concrete]
  971. // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op: %Cpp.long.as.AddWith.impl.Op.type = struct_value () [concrete]
  972. // CHECK:STDOUT: %SubWith.type.e8e: type = facet_type <@SubWith, @SubWith(%Cpp.long)> [concrete]
  973. // CHECK:STDOUT: %SubWith.Op.type.533: type = fn_type @SubWith.Op, @SubWith(%Cpp.long) [concrete]
  974. // CHECK:STDOUT: %SubWith.impl_witness: <witness> = impl_witness imports.%SubWith.impl_witness_table [concrete]
  975. // CHECK:STDOUT: %SubWith.facet: %SubWith.type.e8e = facet_value %Cpp.long, (%SubWith.impl_witness) [concrete]
  976. // CHECK:STDOUT: %.70d: type = fn_type_with_self_type %SubWith.Op.type.533, %SubWith.facet [concrete]
  977. // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.type: type = fn_type @Cpp.long.as.SubWith.impl.Op [concrete]
  978. // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op: %Cpp.long.as.SubWith.impl.Op.type = struct_value () [concrete]
  979. // CHECK:STDOUT: %MulWith.type.a32: type = facet_type <@MulWith, @MulWith(%Cpp.long)> [concrete]
  980. // CHECK:STDOUT: %MulWith.Op.type.44b: type = fn_type @MulWith.Op, @MulWith(%Cpp.long) [concrete]
  981. // CHECK:STDOUT: %MulWith.impl_witness: <witness> = impl_witness imports.%MulWith.impl_witness_table [concrete]
  982. // CHECK:STDOUT: %MulWith.facet: %MulWith.type.a32 = facet_value %Cpp.long, (%MulWith.impl_witness) [concrete]
  983. // CHECK:STDOUT: %.0a7: type = fn_type_with_self_type %MulWith.Op.type.44b, %MulWith.facet [concrete]
  984. // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.type: type = fn_type @Cpp.long.as.MulWith.impl.Op [concrete]
  985. // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op: %Cpp.long.as.MulWith.impl.Op.type = struct_value () [concrete]
  986. // CHECK:STDOUT: %DivWith.type.0c0: type = facet_type <@DivWith, @DivWith(%Cpp.long)> [concrete]
  987. // CHECK:STDOUT: %DivWith.Op.type.494: type = fn_type @DivWith.Op, @DivWith(%Cpp.long) [concrete]
  988. // CHECK:STDOUT: %DivWith.impl_witness: <witness> = impl_witness imports.%DivWith.impl_witness_table [concrete]
  989. // CHECK:STDOUT: %DivWith.facet: %DivWith.type.0c0 = facet_value %Cpp.long, (%DivWith.impl_witness) [concrete]
  990. // CHECK:STDOUT: %.22b: type = fn_type_with_self_type %DivWith.Op.type.494, %DivWith.facet [concrete]
  991. // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.type: type = fn_type @Cpp.long.as.DivWith.impl.Op [concrete]
  992. // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op: %Cpp.long.as.DivWith.impl.Op.type = struct_value () [concrete]
  993. // CHECK:STDOUT: %ModWith.type.2fc: type = facet_type <@ModWith, @ModWith(%Cpp.long)> [concrete]
  994. // CHECK:STDOUT: %ModWith.Op.type.c13: type = fn_type @ModWith.Op, @ModWith(%Cpp.long) [concrete]
  995. // CHECK:STDOUT: %ModWith.impl_witness: <witness> = impl_witness imports.%ModWith.impl_witness_table [concrete]
  996. // CHECK:STDOUT: %ModWith.facet: %ModWith.type.2fc = facet_value %Cpp.long, (%ModWith.impl_witness) [concrete]
  997. // CHECK:STDOUT: %.300: type = fn_type_with_self_type %ModWith.Op.type.c13, %ModWith.facet [concrete]
  998. // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.type: type = fn_type @Cpp.long.as.ModWith.impl.Op [concrete]
  999. // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op: %Cpp.long.as.ModWith.impl.Op.type = struct_value () [concrete]
  1000. // CHECK:STDOUT: }
  1001. // CHECK:STDOUT:
  1002. // CHECK:STDOUT: imports {
  1003. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1004. // CHECK:STDOUT: .long = constants.%Cpp.long
  1005. // CHECK:STDOUT: import Cpp//...
  1006. // CHECK:STDOUT: }
  1007. // 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]
  1008. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  1009. // CHECK:STDOUT: %Core.import_ref.cb912f.1 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1010. // 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]
  1011. // CHECK:STDOUT: %Negate.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.1, %Core.import_ref.412), @Cpp.long.as.Negate.impl [concrete]
  1012. // CHECK:STDOUT: %Core.import_ref.cb912f.2 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1013. // 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]
  1014. // CHECK:STDOUT: %AddWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.2, %Core.import_ref.437), @Cpp.long.as.AddWith.impl [concrete]
  1015. // CHECK:STDOUT: %Core.import_ref.cb912f.3 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1016. // 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]
  1017. // CHECK:STDOUT: %SubWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.3, %Core.import_ref.51f), @Cpp.long.as.SubWith.impl [concrete]
  1018. // CHECK:STDOUT: %Core.import_ref.cb912f.4 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1019. // 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]
  1020. // CHECK:STDOUT: %MulWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.4, %Core.import_ref.ec4), @Cpp.long.as.MulWith.impl [concrete]
  1021. // CHECK:STDOUT: %Core.import_ref.cb912f.5 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1022. // 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]
  1023. // CHECK:STDOUT: %DivWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.5, %Core.import_ref.d85), @Cpp.long.as.DivWith.impl [concrete]
  1024. // CHECK:STDOUT: %Core.import_ref.cb912f.6 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1025. // 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]
  1026. // CHECK:STDOUT: %ModWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.6, %Core.import_ref.394), @Cpp.long.as.ModWith.impl [concrete]
  1027. // CHECK:STDOUT: }
  1028. // CHECK:STDOUT:
  1029. // CHECK:STDOUT: fn @ArithmeticHomogeneousLong() {
  1030. // CHECK:STDOUT: !entry:
  1031. // CHECK:STDOUT: name_binding_decl {
  1032. // CHECK:STDOUT: %x.patt: %pattern_type.68c = value_binding_pattern x [concrete]
  1033. // CHECK:STDOUT: }
  1034. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1035. // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref.loc8 [concrete = constants.%Cpp.long] {
  1036. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1037. // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1038. // CHECK:STDOUT: }
  1039. // CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1040. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  1041. // 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]
  1042. // CHECK:STDOUT: %.loc8_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.5a4]
  1043. // CHECK:STDOUT: %.loc8_21.2: %Cpp.long = converted %int_1.loc8, %.loc8_21.1 [concrete = constants.%int_1.5a4]
  1044. // CHECK:STDOUT: %x: %Cpp.long = value_binding x, %.loc8_21.2
  1045. // CHECK:STDOUT: name_binding_decl {
  1046. // CHECK:STDOUT: %y.patt: %pattern_type.68c = value_binding_pattern y [concrete]
  1047. // CHECK:STDOUT: }
  1048. // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1049. // CHECK:STDOUT: %.loc9_13: type = splice_block %long.ref.loc9 [concrete = constants.%Cpp.long] {
  1050. // CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1051. // CHECK:STDOUT: %long.ref.loc9: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1052. // CHECK:STDOUT: }
  1053. // CHECK:STDOUT: %impl.elem0.loc9: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1054. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  1055. // 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]
  1056. // CHECK:STDOUT: %.loc9_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.5a4]
  1057. // CHECK:STDOUT: %.loc9_21.2: %Cpp.long = converted %int_1.loc9, %.loc9_21.1 [concrete = constants.%int_1.5a4]
  1058. // CHECK:STDOUT: %y: %Cpp.long = value_binding y, %.loc9_21.2
  1059. // CHECK:STDOUT: name_binding_decl {
  1060. // CHECK:STDOUT: %a.patt: %pattern_type.68c = value_binding_pattern a [concrete]
  1061. // CHECK:STDOUT: }
  1062. // CHECK:STDOUT: %x.ref.loc11: %Cpp.long = name_ref x, %x
  1063. // CHECK:STDOUT: %impl.elem1.loc11: %.494 = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Cpp.long.as.Negate.impl.Op]
  1064. // CHECK:STDOUT: %bound_method.loc11: <bound method> = bound_method %x.ref.loc11, %impl.elem1.loc11
  1065. // CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op.call: init %Cpp.long = call %bound_method.loc11(%x.ref.loc11)
  1066. // CHECK:STDOUT: %.loc11_13: type = splice_block %long.ref.loc11 [concrete = constants.%Cpp.long] {
  1067. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1068. // CHECK:STDOUT: %long.ref.loc11: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1069. // CHECK:STDOUT: }
  1070. // CHECK:STDOUT: %.loc11_21.1: %Cpp.long = value_of_initializer %Cpp.long.as.Negate.impl.Op.call
  1071. // CHECK:STDOUT: %.loc11_21.2: %Cpp.long = converted %Cpp.long.as.Negate.impl.Op.call, %.loc11_21.1
  1072. // CHECK:STDOUT: %a: %Cpp.long = value_binding a, %.loc11_21.2
  1073. // CHECK:STDOUT: name_binding_decl {
  1074. // CHECK:STDOUT: %b.patt: %pattern_type.68c = value_binding_pattern b [concrete]
  1075. // CHECK:STDOUT: }
  1076. // CHECK:STDOUT: %x.ref.loc12: %Cpp.long = name_ref x, %x
  1077. // CHECK:STDOUT: %y.ref.loc12: %Cpp.long = name_ref y, %y
  1078. // CHECK:STDOUT: %impl.elem1.loc12: %.a81 = impl_witness_access constants.%AddWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.AddWith.impl.Op]
  1079. // CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %x.ref.loc12, %impl.elem1.loc12
  1080. // CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.call: init %Cpp.long = call %bound_method.loc12(%x.ref.loc12, %y.ref.loc12)
  1081. // CHECK:STDOUT: %.loc12_13: type = splice_block %long.ref.loc12 [concrete = constants.%Cpp.long] {
  1082. // CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1083. // CHECK:STDOUT: %long.ref.loc12: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1084. // CHECK:STDOUT: }
  1085. // CHECK:STDOUT: %.loc12_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.AddWith.impl.Op.call
  1086. // CHECK:STDOUT: %.loc12_23.2: %Cpp.long = converted %Cpp.long.as.AddWith.impl.Op.call, %.loc12_23.1
  1087. // CHECK:STDOUT: %b: %Cpp.long = value_binding b, %.loc12_23.2
  1088. // CHECK:STDOUT: name_binding_decl {
  1089. // CHECK:STDOUT: %c.patt: %pattern_type.68c = value_binding_pattern c [concrete]
  1090. // CHECK:STDOUT: }
  1091. // CHECK:STDOUT: %x.ref.loc13: %Cpp.long = name_ref x, %x
  1092. // CHECK:STDOUT: %y.ref.loc13: %Cpp.long = name_ref y, %y
  1093. // CHECK:STDOUT: %impl.elem1.loc13: %.70d = impl_witness_access constants.%SubWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.SubWith.impl.Op]
  1094. // CHECK:STDOUT: %bound_method.loc13: <bound method> = bound_method %x.ref.loc13, %impl.elem1.loc13
  1095. // CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.call: init %Cpp.long = call %bound_method.loc13(%x.ref.loc13, %y.ref.loc13)
  1096. // CHECK:STDOUT: %.loc13_13: type = splice_block %long.ref.loc13 [concrete = constants.%Cpp.long] {
  1097. // CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1098. // CHECK:STDOUT: %long.ref.loc13: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1099. // CHECK:STDOUT: }
  1100. // CHECK:STDOUT: %.loc13_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.SubWith.impl.Op.call
  1101. // CHECK:STDOUT: %.loc13_23.2: %Cpp.long = converted %Cpp.long.as.SubWith.impl.Op.call, %.loc13_23.1
  1102. // CHECK:STDOUT: %c: %Cpp.long = value_binding c, %.loc13_23.2
  1103. // CHECK:STDOUT: name_binding_decl {
  1104. // CHECK:STDOUT: %d.patt: %pattern_type.68c = value_binding_pattern d [concrete]
  1105. // CHECK:STDOUT: }
  1106. // CHECK:STDOUT: %x.ref.loc14: %Cpp.long = name_ref x, %x
  1107. // CHECK:STDOUT: %y.ref.loc14: %Cpp.long = name_ref y, %y
  1108. // CHECK:STDOUT: %impl.elem1.loc14: %.0a7 = impl_witness_access constants.%MulWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.MulWith.impl.Op]
  1109. // CHECK:STDOUT: %bound_method.loc14: <bound method> = bound_method %x.ref.loc14, %impl.elem1.loc14
  1110. // CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.call: init %Cpp.long = call %bound_method.loc14(%x.ref.loc14, %y.ref.loc14)
  1111. // CHECK:STDOUT: %.loc14_13: type = splice_block %long.ref.loc14 [concrete = constants.%Cpp.long] {
  1112. // CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1113. // CHECK:STDOUT: %long.ref.loc14: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1114. // CHECK:STDOUT: }
  1115. // CHECK:STDOUT: %.loc14_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.MulWith.impl.Op.call
  1116. // CHECK:STDOUT: %.loc14_23.2: %Cpp.long = converted %Cpp.long.as.MulWith.impl.Op.call, %.loc14_23.1
  1117. // CHECK:STDOUT: %d: %Cpp.long = value_binding d, %.loc14_23.2
  1118. // CHECK:STDOUT: name_binding_decl {
  1119. // CHECK:STDOUT: %e.patt: %pattern_type.68c = value_binding_pattern e [concrete]
  1120. // CHECK:STDOUT: }
  1121. // CHECK:STDOUT: %x.ref.loc15: %Cpp.long = name_ref x, %x
  1122. // CHECK:STDOUT: %y.ref.loc15: %Cpp.long = name_ref y, %y
  1123. // CHECK:STDOUT: %impl.elem1.loc15: %.22b = impl_witness_access constants.%DivWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.DivWith.impl.Op]
  1124. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %x.ref.loc15, %impl.elem1.loc15
  1125. // CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.call: init %Cpp.long = call %bound_method.loc15(%x.ref.loc15, %y.ref.loc15)
  1126. // CHECK:STDOUT: %.loc15_13: type = splice_block %long.ref.loc15 [concrete = constants.%Cpp.long] {
  1127. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1128. // CHECK:STDOUT: %long.ref.loc15: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1129. // CHECK:STDOUT: }
  1130. // CHECK:STDOUT: %.loc15_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.DivWith.impl.Op.call
  1131. // CHECK:STDOUT: %.loc15_23.2: %Cpp.long = converted %Cpp.long.as.DivWith.impl.Op.call, %.loc15_23.1
  1132. // CHECK:STDOUT: %e: %Cpp.long = value_binding e, %.loc15_23.2
  1133. // CHECK:STDOUT: name_binding_decl {
  1134. // CHECK:STDOUT: %f.patt: %pattern_type.68c = value_binding_pattern f [concrete]
  1135. // CHECK:STDOUT: }
  1136. // CHECK:STDOUT: %x.ref.loc16: %Cpp.long = name_ref x, %x
  1137. // CHECK:STDOUT: %y.ref.loc16: %Cpp.long = name_ref y, %y
  1138. // CHECK:STDOUT: %impl.elem1.loc16: %.300 = impl_witness_access constants.%ModWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.ModWith.impl.Op]
  1139. // CHECK:STDOUT: %bound_method.loc16: <bound method> = bound_method %x.ref.loc16, %impl.elem1.loc16
  1140. // CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.call: init %Cpp.long = call %bound_method.loc16(%x.ref.loc16, %y.ref.loc16)
  1141. // CHECK:STDOUT: %.loc16_13: type = splice_block %long.ref.loc16 [concrete = constants.%Cpp.long] {
  1142. // CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1143. // CHECK:STDOUT: %long.ref.loc16: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1144. // CHECK:STDOUT: }
  1145. // CHECK:STDOUT: %.loc16_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.ModWith.impl.Op.call
  1146. // CHECK:STDOUT: %.loc16_23.2: %Cpp.long = converted %Cpp.long.as.ModWith.impl.Op.call, %.loc16_23.1
  1147. // CHECK:STDOUT: %f: %Cpp.long = value_binding f, %.loc16_23.2
  1148. // CHECK:STDOUT: <elided>
  1149. // CHECK:STDOUT: }
  1150. // CHECK:STDOUT:
  1151. // CHECK:STDOUT: --- bitwise_homogeneous_long.carbon
  1152. // CHECK:STDOUT:
  1153. // CHECK:STDOUT: constants {
  1154. // CHECK:STDOUT: %AssertSameType.type: type = fn_type @AssertSameType [concrete]
  1155. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1156. // CHECK:STDOUT: %AssertSameType: %AssertSameType.type = struct_value () [concrete]
  1157. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  1158. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  1159. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  1160. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  1161. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  1162. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  1163. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  1164. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete]
  1165. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  1166. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  1167. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  1168. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  1169. // CHECK:STDOUT: %BitComplement.type: type = facet_type <@BitComplement> [concrete]
  1170. // CHECK:STDOUT: %BitComplement.Op.type: type = fn_type @BitComplement.Op [concrete]
  1171. // CHECK:STDOUT: %BitComplement.impl_witness: <witness> = impl_witness imports.%BitComplement.impl_witness_table [concrete]
  1172. // CHECK:STDOUT: %BitComplement.facet: %BitComplement.type = facet_value %Cpp.long, (%BitComplement.impl_witness) [concrete]
  1173. // CHECK:STDOUT: %.788: type = fn_type_with_self_type %BitComplement.Op.type, %BitComplement.facet [concrete]
  1174. // CHECK:STDOUT: %Cpp.long.as.BitComplement.impl.Op.type: type = fn_type @Cpp.long.as.BitComplement.impl.Op [concrete]
  1175. // CHECK:STDOUT: %Cpp.long.as.BitComplement.impl.Op: %Cpp.long.as.BitComplement.impl.Op.type = struct_value () [concrete]
  1176. // CHECK:STDOUT: %AssertSameType.specific_fn: <specific function> = specific_function %AssertSameType, @AssertSameType(%Cpp.long) [concrete]
  1177. // CHECK:STDOUT: %BitAndWith.type.0b5: type = facet_type <@BitAndWith, @BitAndWith(%Cpp.long)> [concrete]
  1178. // CHECK:STDOUT: %BitAndWith.Op.type.e13: type = fn_type @BitAndWith.Op, @BitAndWith(%Cpp.long) [concrete]
  1179. // CHECK:STDOUT: %BitAndWith.impl_witness: <witness> = impl_witness imports.%BitAndWith.impl_witness_table [concrete]
  1180. // CHECK:STDOUT: %BitAndWith.facet: %BitAndWith.type.0b5 = facet_value %Cpp.long, (%BitAndWith.impl_witness) [concrete]
  1181. // CHECK:STDOUT: %.78c: type = fn_type_with_self_type %BitAndWith.Op.type.e13, %BitAndWith.facet [concrete]
  1182. // CHECK:STDOUT: %Cpp.long.as.BitAndWith.impl.Op.type: type = fn_type @Cpp.long.as.BitAndWith.impl.Op [concrete]
  1183. // CHECK:STDOUT: %Cpp.long.as.BitAndWith.impl.Op: %Cpp.long.as.BitAndWith.impl.Op.type = struct_value () [concrete]
  1184. // CHECK:STDOUT: %BitOrWith.type.b22: type = facet_type <@BitOrWith, @BitOrWith(%Cpp.long)> [concrete]
  1185. // CHECK:STDOUT: %BitOrWith.Op.type.a1b: type = fn_type @BitOrWith.Op, @BitOrWith(%Cpp.long) [concrete]
  1186. // CHECK:STDOUT: %BitOrWith.impl_witness: <witness> = impl_witness imports.%BitOrWith.impl_witness_table [concrete]
  1187. // CHECK:STDOUT: %BitOrWith.facet: %BitOrWith.type.b22 = facet_value %Cpp.long, (%BitOrWith.impl_witness) [concrete]
  1188. // CHECK:STDOUT: %.ee7: type = fn_type_with_self_type %BitOrWith.Op.type.a1b, %BitOrWith.facet [concrete]
  1189. // CHECK:STDOUT: %Cpp.long.as.BitOrWith.impl.Op.type: type = fn_type @Cpp.long.as.BitOrWith.impl.Op [concrete]
  1190. // CHECK:STDOUT: %Cpp.long.as.BitOrWith.impl.Op: %Cpp.long.as.BitOrWith.impl.Op.type = struct_value () [concrete]
  1191. // CHECK:STDOUT: %BitXorWith.type.87f: type = facet_type <@BitXorWith, @BitXorWith(%Cpp.long)> [concrete]
  1192. // CHECK:STDOUT: %BitXorWith.Op.type.5cf: type = fn_type @BitXorWith.Op, @BitXorWith(%Cpp.long) [concrete]
  1193. // CHECK:STDOUT: %BitXorWith.impl_witness: <witness> = impl_witness imports.%BitXorWith.impl_witness_table [concrete]
  1194. // CHECK:STDOUT: %BitXorWith.facet: %BitXorWith.type.87f = facet_value %Cpp.long, (%BitXorWith.impl_witness) [concrete]
  1195. // CHECK:STDOUT: %.e9a: type = fn_type_with_self_type %BitXorWith.Op.type.5cf, %BitXorWith.facet [concrete]
  1196. // CHECK:STDOUT: %Cpp.long.as.BitXorWith.impl.Op.type: type = fn_type @Cpp.long.as.BitXorWith.impl.Op [concrete]
  1197. // CHECK:STDOUT: %Cpp.long.as.BitXorWith.impl.Op: %Cpp.long.as.BitXorWith.impl.Op.type = struct_value () [concrete]
  1198. // CHECK:STDOUT: %LeftShiftWith.type.3f9: type = facet_type <@LeftShiftWith, @LeftShiftWith(%Cpp.long)> [concrete]
  1199. // CHECK:STDOUT: %LeftShiftWith.Op.type.224: type = fn_type @LeftShiftWith.Op, @LeftShiftWith(%Cpp.long) [concrete]
  1200. // CHECK:STDOUT: %LeftShiftWith.impl_witness: <witness> = impl_witness imports.%LeftShiftWith.impl_witness_table [concrete]
  1201. // CHECK:STDOUT: %LeftShiftWith.facet: %LeftShiftWith.type.3f9 = facet_value %Cpp.long, (%LeftShiftWith.impl_witness) [concrete]
  1202. // CHECK:STDOUT: %.864: type = fn_type_with_self_type %LeftShiftWith.Op.type.224, %LeftShiftWith.facet [concrete]
  1203. // CHECK:STDOUT: %Cpp.long.as.LeftShiftWith.impl.Op.type: type = fn_type @Cpp.long.as.LeftShiftWith.impl.Op [concrete]
  1204. // CHECK:STDOUT: %Cpp.long.as.LeftShiftWith.impl.Op: %Cpp.long.as.LeftShiftWith.impl.Op.type = struct_value () [concrete]
  1205. // CHECK:STDOUT: %RightShiftWith.type.995: type = facet_type <@RightShiftWith, @RightShiftWith(%Cpp.long)> [concrete]
  1206. // CHECK:STDOUT: %RightShiftWith.Op.type.fd9: type = fn_type @RightShiftWith.Op, @RightShiftWith(%Cpp.long) [concrete]
  1207. // CHECK:STDOUT: %RightShiftWith.impl_witness: <witness> = impl_witness imports.%RightShiftWith.impl_witness_table [concrete]
  1208. // CHECK:STDOUT: %RightShiftWith.facet: %RightShiftWith.type.995 = facet_value %Cpp.long, (%RightShiftWith.impl_witness) [concrete]
  1209. // CHECK:STDOUT: %.398: type = fn_type_with_self_type %RightShiftWith.Op.type.fd9, %RightShiftWith.facet [concrete]
  1210. // CHECK:STDOUT: %Cpp.long.as.RightShiftWith.impl.Op.type: type = fn_type @Cpp.long.as.RightShiftWith.impl.Op [concrete]
  1211. // CHECK:STDOUT: %Cpp.long.as.RightShiftWith.impl.Op: %Cpp.long.as.RightShiftWith.impl.Op.type = struct_value () [concrete]
  1212. // CHECK:STDOUT: }
  1213. // CHECK:STDOUT:
  1214. // CHECK:STDOUT: imports {
  1215. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1216. // CHECK:STDOUT: .long = constants.%Cpp.long
  1217. // CHECK:STDOUT: import Cpp//...
  1218. // CHECK:STDOUT: }
  1219. // 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]
  1220. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  1221. // CHECK:STDOUT: %Core.import_ref.cb912f.1 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1222. // CHECK:STDOUT: %Core.import_ref.454: %Cpp.long.as.BitComplement.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.BitComplement.impl.Op]
  1223. // CHECK:STDOUT: %BitComplement.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.1, %Core.import_ref.454), @Cpp.long.as.BitComplement.impl [concrete]
  1224. // CHECK:STDOUT: %Core.import_ref.cb912f.2 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1225. // CHECK:STDOUT: %Core.import_ref.f38: %Cpp.long.as.BitAndWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.BitAndWith.impl.Op]
  1226. // CHECK:STDOUT: %BitAndWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.2, %Core.import_ref.f38), @Cpp.long.as.BitAndWith.impl [concrete]
  1227. // CHECK:STDOUT: %Core.import_ref.cb912f.3 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1228. // CHECK:STDOUT: %Core.import_ref.a17: %Cpp.long.as.BitOrWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.BitOrWith.impl.Op]
  1229. // CHECK:STDOUT: %BitOrWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.3, %Core.import_ref.a17), @Cpp.long.as.BitOrWith.impl [concrete]
  1230. // CHECK:STDOUT: %Core.import_ref.cb912f.4 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1231. // CHECK:STDOUT: %Core.import_ref.4fd: %Cpp.long.as.BitXorWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.BitXorWith.impl.Op]
  1232. // CHECK:STDOUT: %BitXorWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.4, %Core.import_ref.4fd), @Cpp.long.as.BitXorWith.impl [concrete]
  1233. // CHECK:STDOUT: %Core.import_ref.cb912f.5 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1234. // CHECK:STDOUT: %Core.import_ref.c09: %Cpp.long.as.LeftShiftWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.LeftShiftWith.impl.Op]
  1235. // CHECK:STDOUT: %LeftShiftWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.5, %Core.import_ref.c09), @Cpp.long.as.LeftShiftWith.impl [concrete]
  1236. // CHECK:STDOUT: %Core.import_ref.cb912f.6 = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, unloaded
  1237. // CHECK:STDOUT: %Core.import_ref.6c0: %Cpp.long.as.RightShiftWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.RightShiftWith.impl.Op]
  1238. // CHECK:STDOUT: %RightShiftWith.impl_witness_table = impl_witness_table (%Core.import_ref.cb912f.6, %Core.import_ref.6c0), @Cpp.long.as.RightShiftWith.impl [concrete]
  1239. // CHECK:STDOUT: }
  1240. // CHECK:STDOUT:
  1241. // CHECK:STDOUT: fn @BitWiseHomogeneousLong() {
  1242. // CHECK:STDOUT: !entry:
  1243. // CHECK:STDOUT: name_binding_decl {
  1244. // CHECK:STDOUT: %a.patt: %pattern_type.68c = value_binding_pattern a [concrete]
  1245. // CHECK:STDOUT: }
  1246. // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1247. // CHECK:STDOUT: %.loc10_13: type = splice_block %long.ref.loc10 [concrete = constants.%Cpp.long] {
  1248. // CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1249. // CHECK:STDOUT: %long.ref.loc10: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1250. // CHECK:STDOUT: }
  1251. // CHECK:STDOUT: %impl.elem0.loc10: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1252. // CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %int_1.loc10, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  1253. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10: init %Cpp.long = call %bound_method.loc10(%int_1.loc10) [concrete = constants.%int_1.5a4]
  1254. // CHECK:STDOUT: %.loc10_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10 [concrete = constants.%int_1.5a4]
  1255. // CHECK:STDOUT: %.loc10_21.2: %Cpp.long = converted %int_1.loc10, %.loc10_21.1 [concrete = constants.%int_1.5a4]
  1256. // CHECK:STDOUT: %a: %Cpp.long = value_binding a, %.loc10_21.2
  1257. // CHECK:STDOUT: name_binding_decl {
  1258. // CHECK:STDOUT: %b.patt: %pattern_type.68c = value_binding_pattern b [concrete]
  1259. // CHECK:STDOUT: }
  1260. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1261. // CHECK:STDOUT: %.loc11_13: type = splice_block %long.ref.loc11 [concrete = constants.%Cpp.long] {
  1262. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1263. // CHECK:STDOUT: %long.ref.loc11: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1264. // CHECK:STDOUT: }
  1265. // CHECK:STDOUT: %impl.elem0.loc11: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1266. // CHECK:STDOUT: %bound_method.loc11: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  1267. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11: init %Cpp.long = call %bound_method.loc11(%int_1.loc11) [concrete = constants.%int_1.5a4]
  1268. // CHECK:STDOUT: %.loc11_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11 [concrete = constants.%int_1.5a4]
  1269. // CHECK:STDOUT: %.loc11_21.2: %Cpp.long = converted %int_1.loc11, %.loc11_21.1 [concrete = constants.%int_1.5a4]
  1270. // CHECK:STDOUT: %b: %Cpp.long = value_binding b, %.loc11_21.2
  1271. // CHECK:STDOUT: name_binding_decl {
  1272. // CHECK:STDOUT: %c.patt: %pattern_type.68c = value_binding_pattern c [concrete]
  1273. // CHECK:STDOUT: }
  1274. // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1275. // CHECK:STDOUT: %.loc12_13: type = splice_block %long.ref.loc12 [concrete = constants.%Cpp.long] {
  1276. // CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1277. // CHECK:STDOUT: %long.ref.loc12: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1278. // CHECK:STDOUT: }
  1279. // CHECK:STDOUT: %impl.elem0.loc12: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1280. // CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %int_1.loc12, %impl.elem0.loc12 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  1281. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12: init %Cpp.long = call %bound_method.loc12(%int_1.loc12) [concrete = constants.%int_1.5a4]
  1282. // CHECK:STDOUT: %.loc12_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc12 [concrete = constants.%int_1.5a4]
  1283. // CHECK:STDOUT: %.loc12_21.2: %Cpp.long = converted %int_1.loc12, %.loc12_21.1 [concrete = constants.%int_1.5a4]
  1284. // CHECK:STDOUT: %c: %Cpp.long = value_binding c, %.loc12_21.2
  1285. // CHECK:STDOUT: %AssertSameType.ref.loc14: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1286. // CHECK:STDOUT: %a.ref.loc14: %Cpp.long = name_ref a, %a
  1287. // CHECK:STDOUT: %impl.elem1.loc14: %.788 = impl_witness_access constants.%BitComplement.impl_witness, element1 [concrete = constants.%Cpp.long.as.BitComplement.impl.Op]
  1288. // CHECK:STDOUT: %bound_method.loc14: <bound method> = bound_method %a.ref.loc14, %impl.elem1.loc14
  1289. // CHECK:STDOUT: %Cpp.long.as.BitComplement.impl.Op.call: init %Cpp.long = call %bound_method.loc14(%a.ref.loc14)
  1290. // CHECK:STDOUT: %c.ref.loc14: %Cpp.long = name_ref c, %c
  1291. // CHECK:STDOUT: %AssertSameType.specific_fn.loc14: <specific function> = specific_function %AssertSameType.ref.loc14, @AssertSameType(constants.%Cpp.long) [concrete = constants.%AssertSameType.specific_fn]
  1292. // CHECK:STDOUT: %.loc14_18.1: %Cpp.long = value_of_initializer %Cpp.long.as.BitComplement.impl.Op.call
  1293. // CHECK:STDOUT: %.loc14_18.2: %Cpp.long = converted %Cpp.long.as.BitComplement.impl.Op.call, %.loc14_18.1
  1294. // CHECK:STDOUT: %AssertSameType.call.loc14: init %empty_tuple.type = call %AssertSameType.specific_fn.loc14(%.loc14_18.2, %c.ref.loc14)
  1295. // CHECK:STDOUT: %AssertSameType.ref.loc15: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1296. // CHECK:STDOUT: %a.ref.loc15: %Cpp.long = name_ref a, %a
  1297. // CHECK:STDOUT: %b.ref.loc15: %Cpp.long = name_ref b, %b
  1298. // CHECK:STDOUT: %impl.elem1.loc15: %.78c = impl_witness_access constants.%BitAndWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.BitAndWith.impl.Op]
  1299. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %a.ref.loc15, %impl.elem1.loc15
  1300. // CHECK:STDOUT: %Cpp.long.as.BitAndWith.impl.Op.call: init %Cpp.long = call %bound_method.loc15(%a.ref.loc15, %b.ref.loc15)
  1301. // CHECK:STDOUT: %c.ref.loc15: %Cpp.long = name_ref c, %c
  1302. // CHECK:STDOUT: %AssertSameType.specific_fn.loc15: <specific function> = specific_function %AssertSameType.ref.loc15, @AssertSameType(constants.%Cpp.long) [concrete = constants.%AssertSameType.specific_fn]
  1303. // CHECK:STDOUT: %.loc15_20.1: %Cpp.long = value_of_initializer %Cpp.long.as.BitAndWith.impl.Op.call
  1304. // CHECK:STDOUT: %.loc15_20.2: %Cpp.long = converted %Cpp.long.as.BitAndWith.impl.Op.call, %.loc15_20.1
  1305. // CHECK:STDOUT: %AssertSameType.call.loc15: init %empty_tuple.type = call %AssertSameType.specific_fn.loc15(%.loc15_20.2, %c.ref.loc15)
  1306. // CHECK:STDOUT: %AssertSameType.ref.loc16: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1307. // CHECK:STDOUT: %a.ref.loc16: %Cpp.long = name_ref a, %a
  1308. // CHECK:STDOUT: %b.ref.loc16: %Cpp.long = name_ref b, %b
  1309. // CHECK:STDOUT: %impl.elem1.loc16: %.ee7 = impl_witness_access constants.%BitOrWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.BitOrWith.impl.Op]
  1310. // CHECK:STDOUT: %bound_method.loc16: <bound method> = bound_method %a.ref.loc16, %impl.elem1.loc16
  1311. // CHECK:STDOUT: %Cpp.long.as.BitOrWith.impl.Op.call: init %Cpp.long = call %bound_method.loc16(%a.ref.loc16, %b.ref.loc16)
  1312. // CHECK:STDOUT: %c.ref.loc16: %Cpp.long = name_ref c, %c
  1313. // CHECK:STDOUT: %AssertSameType.specific_fn.loc16: <specific function> = specific_function %AssertSameType.ref.loc16, @AssertSameType(constants.%Cpp.long) [concrete = constants.%AssertSameType.specific_fn]
  1314. // CHECK:STDOUT: %.loc16_20.1: %Cpp.long = value_of_initializer %Cpp.long.as.BitOrWith.impl.Op.call
  1315. // CHECK:STDOUT: %.loc16_20.2: %Cpp.long = converted %Cpp.long.as.BitOrWith.impl.Op.call, %.loc16_20.1
  1316. // CHECK:STDOUT: %AssertSameType.call.loc16: init %empty_tuple.type = call %AssertSameType.specific_fn.loc16(%.loc16_20.2, %c.ref.loc16)
  1317. // CHECK:STDOUT: %AssertSameType.ref.loc17: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1318. // CHECK:STDOUT: %a.ref.loc17: %Cpp.long = name_ref a, %a
  1319. // CHECK:STDOUT: %b.ref.loc17: %Cpp.long = name_ref b, %b
  1320. // CHECK:STDOUT: %impl.elem1.loc17: %.e9a = impl_witness_access constants.%BitXorWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.BitXorWith.impl.Op]
  1321. // CHECK:STDOUT: %bound_method.loc17: <bound method> = bound_method %a.ref.loc17, %impl.elem1.loc17
  1322. // CHECK:STDOUT: %Cpp.long.as.BitXorWith.impl.Op.call: init %Cpp.long = call %bound_method.loc17(%a.ref.loc17, %b.ref.loc17)
  1323. // CHECK:STDOUT: %c.ref.loc17: %Cpp.long = name_ref c, %c
  1324. // CHECK:STDOUT: %AssertSameType.specific_fn.loc17: <specific function> = specific_function %AssertSameType.ref.loc17, @AssertSameType(constants.%Cpp.long) [concrete = constants.%AssertSameType.specific_fn]
  1325. // CHECK:STDOUT: %.loc17_20.1: %Cpp.long = value_of_initializer %Cpp.long.as.BitXorWith.impl.Op.call
  1326. // CHECK:STDOUT: %.loc17_20.2: %Cpp.long = converted %Cpp.long.as.BitXorWith.impl.Op.call, %.loc17_20.1
  1327. // CHECK:STDOUT: %AssertSameType.call.loc17: init %empty_tuple.type = call %AssertSameType.specific_fn.loc17(%.loc17_20.2, %c.ref.loc17)
  1328. // CHECK:STDOUT: %AssertSameType.ref.loc18: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1329. // CHECK:STDOUT: %a.ref.loc18: %Cpp.long = name_ref a, %a
  1330. // CHECK:STDOUT: %b.ref.loc18: %Cpp.long = name_ref b, %b
  1331. // CHECK:STDOUT: %impl.elem1.loc18: %.864 = impl_witness_access constants.%LeftShiftWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.LeftShiftWith.impl.Op]
  1332. // CHECK:STDOUT: %bound_method.loc18: <bound method> = bound_method %a.ref.loc18, %impl.elem1.loc18
  1333. // CHECK:STDOUT: %Cpp.long.as.LeftShiftWith.impl.Op.call: init %Cpp.long = call %bound_method.loc18(%a.ref.loc18, %b.ref.loc18)
  1334. // CHECK:STDOUT: %c.ref.loc18: %Cpp.long = name_ref c, %c
  1335. // CHECK:STDOUT: %AssertSameType.specific_fn.loc18: <specific function> = specific_function %AssertSameType.ref.loc18, @AssertSameType(constants.%Cpp.long) [concrete = constants.%AssertSameType.specific_fn]
  1336. // CHECK:STDOUT: %.loc18_20.1: %Cpp.long = value_of_initializer %Cpp.long.as.LeftShiftWith.impl.Op.call
  1337. // CHECK:STDOUT: %.loc18_20.2: %Cpp.long = converted %Cpp.long.as.LeftShiftWith.impl.Op.call, %.loc18_20.1
  1338. // CHECK:STDOUT: %AssertSameType.call.loc18: init %empty_tuple.type = call %AssertSameType.specific_fn.loc18(%.loc18_20.2, %c.ref.loc18)
  1339. // CHECK:STDOUT: %AssertSameType.ref.loc19: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1340. // CHECK:STDOUT: %a.ref.loc19: %Cpp.long = name_ref a, %a
  1341. // CHECK:STDOUT: %b.ref.loc19: %Cpp.long = name_ref b, %b
  1342. // CHECK:STDOUT: %impl.elem1.loc19: %.398 = impl_witness_access constants.%RightShiftWith.impl_witness, element1 [concrete = constants.%Cpp.long.as.RightShiftWith.impl.Op]
  1343. // CHECK:STDOUT: %bound_method.loc19: <bound method> = bound_method %a.ref.loc19, %impl.elem1.loc19
  1344. // CHECK:STDOUT: %Cpp.long.as.RightShiftWith.impl.Op.call: init %Cpp.long = call %bound_method.loc19(%a.ref.loc19, %b.ref.loc19)
  1345. // CHECK:STDOUT: %c.ref.loc19: %Cpp.long = name_ref c, %c
  1346. // CHECK:STDOUT: %AssertSameType.specific_fn.loc19: <specific function> = specific_function %AssertSameType.ref.loc19, @AssertSameType(constants.%Cpp.long) [concrete = constants.%AssertSameType.specific_fn]
  1347. // CHECK:STDOUT: %.loc19_20.1: %Cpp.long = value_of_initializer %Cpp.long.as.RightShiftWith.impl.Op.call
  1348. // CHECK:STDOUT: %.loc19_20.2: %Cpp.long = converted %Cpp.long.as.RightShiftWith.impl.Op.call, %.loc19_20.1
  1349. // CHECK:STDOUT: %AssertSameType.call.loc19: init %empty_tuple.type = call %AssertSameType.specific_fn.loc19(%.loc19_20.2, %c.ref.loc19)
  1350. // CHECK:STDOUT: <elided>
  1351. // CHECK:STDOUT: }
  1352. // CHECK:STDOUT:
  1353. // CHECK:STDOUT: --- fail_todo_bitwise_heterogeneous_long.carbon
  1354. // CHECK:STDOUT:
  1355. // CHECK:STDOUT: constants {
  1356. // CHECK:STDOUT: %AssertSameType.type: type = fn_type @AssertSameType [concrete]
  1357. // CHECK:STDOUT: %AssertSameType: %AssertSameType.type = struct_value () [concrete]
  1358. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  1359. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  1360. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  1361. // CHECK:STDOUT: %Int.fc6021.1: type = class_type @Int, @Int(%N) [symbolic]
  1362. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  1363. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  1364. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  1365. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  1366. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  1367. // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  1368. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  1369. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
  1370. // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
  1371. // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete]
  1372. // CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete]
  1373. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  1374. // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  1375. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete]
  1376. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete]
  1377. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = struct_value () [concrete]
  1378. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a [concrete]
  1379. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  1380. // CHECK:STDOUT: %As.type.047: type = facet_type <@As, @As(%i32)> [concrete]
  1381. // CHECK:STDOUT: %As.Convert.type.99b: type = fn_type @As.Convert, @As(%i32) [concrete]
  1382. // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  1383. // 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]
  1384. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
  1385. // CHECK:STDOUT: %As.impl_witness.ab6: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
  1386. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type.8ec: type = fn_type @Core.IntLiteral.as.As.impl.Convert, @Core.IntLiteral.as.As.impl(%int_32) [concrete]
  1387. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.29b: %Core.IntLiteral.as.As.impl.Convert.type.8ec = struct_value () [concrete]
  1388. // CHECK:STDOUT: %As.facet: %As.type.047 = facet_value Core.IntLiteral, (%As.impl_witness.ab6) [concrete]
  1389. // CHECK:STDOUT: %.97a: type = fn_type_with_self_type %As.Convert.type.99b, %As.facet [concrete]
  1390. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.29b [concrete]
  1391. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.As.impl.Convert.29b, @Core.IntLiteral.as.As.impl.Convert(%int_32) [concrete]
  1392. // CHECK:STDOUT: %bound_method.290: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  1393. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  1394. // CHECK:STDOUT: %BitAndWith.type.0fb: type = facet_type <@BitAndWith, @BitAndWith(%i32)> [concrete]
  1395. // CHECK:STDOUT: %BitAndWith.Op.type.e35: type = fn_type @BitAndWith.Op, @BitAndWith(%i32) [concrete]
  1396. // CHECK:STDOUT: %BitAndWith.type.0b5: type = facet_type <@BitAndWith, @BitAndWith(%Cpp.long)> [concrete]
  1397. // CHECK:STDOUT: %BitAndWith.Op.type.e13: type = fn_type @BitAndWith.Op, @BitAndWith(%Cpp.long) [concrete]
  1398. // CHECK:STDOUT: %ImplicitAs.type.39a54f.1: type = facet_type <@ImplicitAs, @ImplicitAs(%Int.fc6021.1)> [symbolic]
  1399. // CHECK:STDOUT: %U.354: %ImplicitAs.type.39a54f.1 = symbolic_binding U, 1 [symbolic]
  1400. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.type.1b6537.1: type = fn_type @Int.as.BitAndWith.impl.Op.2, @Int.as.BitAndWith.impl.4ac(%N, %U.354) [symbolic]
  1401. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.b9569a.1: %Int.as.BitAndWith.impl.Op.type.1b6537.1 = struct_value () [symbolic]
  1402. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.type.1b6537.2: type = fn_type @Int.as.BitAndWith.impl.Op.3, @Int.as.BitAndWith.impl.4ac(%N, %U.354) [symbolic]
  1403. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.b9569a.2: %Int.as.BitAndWith.impl.Op.type.1b6537.2 = struct_value () [symbolic]
  1404. // CHECK:STDOUT: %T.354: %ImplicitAs.type.39a54f.1 = symbolic_binding T, 1 [symbolic]
  1405. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.type.e95062.1: type = fn_type @T.binding.as_type.as.BitAndWith.impl.Op.1, @T.binding.as_type.as.BitAndWith.impl(%N, %T.354) [symbolic]
  1406. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.892c6d.1: %T.binding.as_type.as.BitAndWith.impl.Op.type.e95062.1 = struct_value () [symbolic]
  1407. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.type.e95062.2: type = fn_type @T.binding.as_type.as.BitAndWith.impl.Op.2, @T.binding.as_type.as.BitAndWith.impl(%N, %T.354) [symbolic]
  1408. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.892c6d.2: %T.binding.as_type.as.BitAndWith.impl.Op.type.e95062.2 = struct_value () [symbolic]
  1409. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2, @Core.IntLiteral.as.ImplicitAs.impl.b2d(%To.fe9) [symbolic]
  1410. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
  1411. // CHECK:STDOUT: %ImplicitAs.impl_witness.925: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.c80 [concrete]
  1412. // CHECK:STDOUT: %ImplicitAs.facet.96f: %ImplicitAs.type.e8c = facet_value %Cpp.long, (%ImplicitAs.impl_witness.925) [concrete]
  1413. // CHECK:STDOUT: %BitAndWith.impl_witness.e95: <witness> = impl_witness imports.%BitAndWith.impl_witness_table.5e7, @T.binding.as_type.as.BitAndWith.impl(%int_32, %ImplicitAs.facet.96f) [concrete]
  1414. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.type.126f9c.1: type = fn_type @T.binding.as_type.as.BitAndWith.impl.Op.2, @T.binding.as_type.as.BitAndWith.impl(%int_32, %ImplicitAs.facet.96f) [concrete]
  1415. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.9361e8.1: %T.binding.as_type.as.BitAndWith.impl.Op.type.126f9c.1 = struct_value () [concrete]
  1416. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.type.126f9c.2: type = fn_type @T.binding.as_type.as.BitAndWith.impl.Op.1, @T.binding.as_type.as.BitAndWith.impl(%int_32, %ImplicitAs.facet.96f) [concrete]
  1417. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.9361e8.2: %T.binding.as_type.as.BitAndWith.impl.Op.type.126f9c.2 = struct_value () [concrete]
  1418. // CHECK:STDOUT: %BitAndWith.facet.817: %BitAndWith.type.0fb = facet_value %Cpp.long, (%BitAndWith.impl_witness.e95) [concrete]
  1419. // CHECK:STDOUT: %.62a: type = fn_type_with_self_type %BitAndWith.Op.type.e35, %BitAndWith.facet.817 [concrete]
  1420. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.specific_fn.96bc97.1: <specific function> = specific_function %T.binding.as_type.as.BitAndWith.impl.Op.9361e8.2, @T.binding.as_type.as.BitAndWith.impl.Op.1(%int_32, %ImplicitAs.facet.96f) [concrete]
  1421. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.specific_fn.96bc97.2: <specific function> = specific_function %T.binding.as_type.as.BitAndWith.impl.Op.9361e8.1, @T.binding.as_type.as.BitAndWith.impl.Op.2(%int_32, %ImplicitAs.facet.96f) [concrete]
  1422. // CHECK:STDOUT: %.79c: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.96f [concrete]
  1423. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert [concrete]
  1424. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert: %Cpp.long.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  1425. // CHECK:STDOUT: %BitAndWith.impl_witness.8f0: <witness> = impl_witness imports.%BitAndWith.impl_witness_table.ebf, @Int.as.BitAndWith.impl.4ac(%int_32, %ImplicitAs.facet.96f) [concrete]
  1426. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.type.ed3819.1: type = fn_type @Int.as.BitAndWith.impl.Op.3, @Int.as.BitAndWith.impl.4ac(%int_32, %ImplicitAs.facet.96f) [concrete]
  1427. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.9e5f79.1: %Int.as.BitAndWith.impl.Op.type.ed3819.1 = struct_value () [concrete]
  1428. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.type.ed3819.2: type = fn_type @Int.as.BitAndWith.impl.Op.2, @Int.as.BitAndWith.impl.4ac(%int_32, %ImplicitAs.facet.96f) [concrete]
  1429. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.9e5f79.2: %Int.as.BitAndWith.impl.Op.type.ed3819.2 = struct_value () [concrete]
  1430. // CHECK:STDOUT: %BitAndWith.facet.fcf: %BitAndWith.type.0b5 = facet_value %i32, (%BitAndWith.impl_witness.8f0) [concrete]
  1431. // CHECK:STDOUT: %.775: type = fn_type_with_self_type %BitAndWith.Op.type.e13, %BitAndWith.facet.fcf [concrete]
  1432. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.bound.621b36.1: <bound method> = bound_method %int_1.5d2, %Int.as.BitAndWith.impl.Op.9e5f79.2 [concrete]
  1433. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.specific_fn.0f118d.1: <specific function> = specific_function %Int.as.BitAndWith.impl.Op.9e5f79.2, @Int.as.BitAndWith.impl.Op.2(%int_32, %ImplicitAs.facet.96f) [concrete]
  1434. // CHECK:STDOUT: %bound_method.2c0104.1: <bound method> = bound_method %int_1.5d2, %Int.as.BitAndWith.impl.Op.specific_fn.0f118d.1 [concrete]
  1435. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.bound.621b36.2: <bound method> = bound_method %int_1.5d2, %Int.as.BitAndWith.impl.Op.9e5f79.1 [concrete]
  1436. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.specific_fn.0f118d.2: <specific function> = specific_function %Int.as.BitAndWith.impl.Op.9e5f79.1, @Int.as.BitAndWith.impl.Op.3(%int_32, %ImplicitAs.facet.96f) [concrete]
  1437. // CHECK:STDOUT: %bound_method.2c0104.2: <bound method> = bound_method %int_1.5d2, %Int.as.BitAndWith.impl.Op.specific_fn.0f118d.2 [concrete]
  1438. // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete]
  1439. // CHECK:STDOUT: %ImplicitAs.impl_witness.556: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl.b2d(%int_64) [concrete]
  1440. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.2, @Core.IntLiteral.as.ImplicitAs.impl.b2d(%int_64) [concrete]
  1441. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete]
  1442. // CHECK:STDOUT: %ImplicitAs.facet.d48: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete]
  1443. // CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.d48 [concrete]
  1444. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.102: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete]
  1445. // 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.2(%int_64) [concrete]
  1446. // CHECK:STDOUT: %bound_method.288: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  1447. // CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
  1448. // CHECK:STDOUT: }
  1449. // CHECK:STDOUT:
  1450. // CHECK:STDOUT: imports {
  1451. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1452. // CHECK:STDOUT: .long = constants.%Cpp.long
  1453. // CHECK:STDOUT: import Cpp//...
  1454. // CHECK:STDOUT: }
  1455. // 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]
  1456. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  1457. // 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)]
  1458. // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
  1459. // CHECK:STDOUT: %Core.import_ref.475cb3.2 = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, unloaded
  1460. // CHECK:STDOUT: %Core.import_ref.611: @Int.as.BitAndWith.impl.4ac.%Int.as.BitAndWith.impl.Op.type.2 (%Int.as.BitAndWith.impl.Op.type.1b6537.1) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.BitAndWith.impl.4ac.%Int.as.BitAndWith.impl.Op.2 (constants.%Int.as.BitAndWith.impl.Op.b9569a.1)]
  1461. // CHECK:STDOUT: %BitAndWith.impl_witness_table.ebf = impl_witness_table (%Core.import_ref.475cb3.2, %Core.import_ref.611), @Int.as.BitAndWith.impl.4ac [concrete]
  1462. // CHECK:STDOUT: %Core.Op.36f: @Int.as.BitAndWith.impl.4ac.%Int.as.BitAndWith.impl.Op.type.1 (%Int.as.BitAndWith.impl.Op.type.1b6537.2) = import_ref Core//prelude/types/int, Op, loaded [symbolic = @Int.as.BitAndWith.impl.4ac.%Int.as.BitAndWith.impl.Op.1 (constants.%Int.as.BitAndWith.impl.Op.b9569a.2)]
  1463. // CHECK:STDOUT: %Core.import_ref.475cb3.3 = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, unloaded
  1464. // CHECK:STDOUT: %Core.import_ref.29d: @T.binding.as_type.as.BitAndWith.impl.%T.binding.as_type.as.BitAndWith.impl.Op.type.2 (%T.binding.as_type.as.BitAndWith.impl.Op.type.e95062.1) = import_ref Core//prelude/types/int, loc{{\d+_\d+}}, loaded [symbolic = @T.binding.as_type.as.BitAndWith.impl.%T.binding.as_type.as.BitAndWith.impl.Op.2 (constants.%T.binding.as_type.as.BitAndWith.impl.Op.892c6d.1)]
  1465. // CHECK:STDOUT: %BitAndWith.impl_witness_table.5e7 = impl_witness_table (%Core.import_ref.475cb3.3, %Core.import_ref.29d), @T.binding.as_type.as.BitAndWith.impl [concrete]
  1466. // CHECK:STDOUT: %Core.Op.944: @T.binding.as_type.as.BitAndWith.impl.%T.binding.as_type.as.BitAndWith.impl.Op.type.1 (%T.binding.as_type.as.BitAndWith.impl.Op.type.e95062.2) = import_ref Core//prelude/types/int, Op, loaded [symbolic = @T.binding.as_type.as.BitAndWith.impl.%T.binding.as_type.as.BitAndWith.impl.Op.1 (constants.%T.binding.as_type.as.BitAndWith.impl.Op.892c6d.2)]
  1467. // CHECK:STDOUT: %Core.import_ref.42d: @Core.IntLiteral.as.ImplicitAs.impl.b2d.%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.b2d.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2)]
  1468. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.74f = impl_witness_table (%Core.import_ref.42d), @Core.IntLiteral.as.ImplicitAs.impl.b2d [concrete]
  1469. // CHECK:STDOUT: %Core.import_ref.946: %Cpp.long.as.ImplicitAs.impl.Convert.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert]
  1470. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.c80 = impl_witness_table (%Core.import_ref.946), @Cpp.long.as.ImplicitAs.impl.9f8 [concrete]
  1471. // CHECK:STDOUT: }
  1472. // CHECK:STDOUT:
  1473. // CHECK:STDOUT: fn @BitWiseHeterogeneousLong() {
  1474. // CHECK:STDOUT: !entry:
  1475. // CHECK:STDOUT: name_binding_decl {
  1476. // CHECK:STDOUT: %a.patt: %pattern_type.68c = value_binding_pattern a [concrete]
  1477. // CHECK:STDOUT: }
  1478. // CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1479. // CHECK:STDOUT: %.loc10_13: type = splice_block %long.ref [concrete = constants.%Cpp.long] {
  1480. // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1481. // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1482. // CHECK:STDOUT: }
  1483. // CHECK:STDOUT: %impl.elem0.loc10: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a]
  1484. // CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %int_1.loc10, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.cc8]
  1485. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10: init %Cpp.long = call %bound_method.loc10(%int_1.loc10) [concrete = constants.%int_1.5a4]
  1486. // CHECK:STDOUT: %.loc10_21.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc10 [concrete = constants.%int_1.5a4]
  1487. // CHECK:STDOUT: %.loc10_21.2: %Cpp.long = converted %int_1.loc10, %.loc10_21.1 [concrete = constants.%int_1.5a4]
  1488. // CHECK:STDOUT: %a: %Cpp.long = value_binding a, %.loc10_21.2
  1489. // CHECK:STDOUT: %AssertSameType.ref.loc19: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1490. // CHECK:STDOUT: %a.ref.loc19_18: %Cpp.long = name_ref a, %a
  1491. // CHECK:STDOUT: %int_1.loc19: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1492. // CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1493. // CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1494. // CHECK:STDOUT: %impl.elem0.loc19_25: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
  1495. // CHECK:STDOUT: %bound_method.loc19_25.1: <bound method> = bound_method %int_1.loc19, %impl.elem0.loc19_25 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
  1496. // CHECK:STDOUT: %specific_fn.loc19_25: <specific function> = specific_function %impl.elem0.loc19_25, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
  1497. // CHECK:STDOUT: %bound_method.loc19_25.2: <bound method> = bound_method %int_1.loc19, %specific_fn.loc19_25 [concrete = constants.%bound_method.290]
  1498. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc19: init %i32 = call %bound_method.loc19_25.2(%int_1.loc19) [concrete = constants.%int_1.5d2]
  1499. // CHECK:STDOUT: %.loc19_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc19 [concrete = constants.%int_1.5d2]
  1500. // CHECK:STDOUT: %.loc19_25.2: %i32 = converted %int_1.loc19, %.loc19_25.1 [concrete = constants.%int_1.5d2]
  1501. // CHECK:STDOUT: %impl.elem1.loc19: %.62a = impl_witness_access constants.%BitAndWith.impl_witness.e95, element1 [concrete = constants.%T.binding.as_type.as.BitAndWith.impl.Op.9361e8.2]
  1502. // CHECK:STDOUT: %bound_method.loc19_20.1: <bound method> = bound_method %a.ref.loc19_18, %impl.elem1.loc19
  1503. // CHECK:STDOUT: %specific_fn.loc19_20: <specific function> = specific_function %impl.elem1.loc19, @T.binding.as_type.as.BitAndWith.impl.Op.1(constants.%int_32, constants.%ImplicitAs.facet.96f) [concrete = constants.%T.binding.as_type.as.BitAndWith.impl.Op.specific_fn.96bc97.1]
  1504. // CHECK:STDOUT: %bound_method.loc19_20.2: <bound method> = bound_method %a.ref.loc19_18, %specific_fn.loc19_20
  1505. // CHECK:STDOUT: %.loc19_20: %T.binding.as_type.as.BitAndWith.impl.Op.type.126f9c.1 = specific_constant imports.%Core.Op.944, @T.binding.as_type.as.BitAndWith.impl(constants.%int_32, constants.%ImplicitAs.facet.96f) [concrete = constants.%T.binding.as_type.as.BitAndWith.impl.Op.9361e8.1]
  1506. // CHECK:STDOUT: %Op.ref.loc19: %T.binding.as_type.as.BitAndWith.impl.Op.type.126f9c.1 = name_ref Op, %.loc19_20 [concrete = constants.%T.binding.as_type.as.BitAndWith.impl.Op.9361e8.1]
  1507. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %a.ref.loc19_18, %Op.ref.loc19
  1508. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.specific_fn: <specific function> = specific_function %Op.ref.loc19, @T.binding.as_type.as.BitAndWith.impl.Op.2(constants.%int_32, constants.%ImplicitAs.facet.96f) [concrete = constants.%T.binding.as_type.as.BitAndWith.impl.Op.specific_fn.96bc97.2]
  1509. // CHECK:STDOUT: %bound_method.loc19_20.3: <bound method> = bound_method %a.ref.loc19_18, %T.binding.as_type.as.BitAndWith.impl.Op.specific_fn
  1510. // CHECK:STDOUT: %impl.elem0.loc19_18: %.79c = impl_witness_access constants.%ImplicitAs.impl_witness.925, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert]
  1511. // CHECK:STDOUT: %bound_method.loc19_18: <bound method> = bound_method %a.ref.loc19_18, %impl.elem0.loc19_18
  1512. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc19: init %i32 = call %bound_method.loc19_18(%a.ref.loc19_18)
  1513. // CHECK:STDOUT: %.loc19_18.1: %i32 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc19
  1514. // CHECK:STDOUT: %.loc19_18.2: %i32 = converted %a.ref.loc19_18, %.loc19_18.1
  1515. // CHECK:STDOUT: %T.binding.as_type.as.BitAndWith.impl.Op.call: init %i32 = call %bound_method.loc19_20.3(%.loc19_18.2, %.loc19_25.2)
  1516. // CHECK:STDOUT: %a.ref.loc19_34: %Cpp.long = name_ref a, %a
  1517. // CHECK:STDOUT: %AssertSameType.ref.loc28: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1518. // CHECK:STDOUT: %int_1.loc28: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1519. // CHECK:STDOUT: %int_32.loc28: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  1520. // CHECK:STDOUT: %i32.loc28: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  1521. // CHECK:STDOUT: %impl.elem0.loc28_21: %.97a = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
  1522. // CHECK:STDOUT: %bound_method.loc28_21.1: <bound method> = bound_method %int_1.loc28, %impl.elem0.loc28_21 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
  1523. // CHECK:STDOUT: %specific_fn.loc28_21: <specific function> = specific_function %impl.elem0.loc28_21, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
  1524. // CHECK:STDOUT: %bound_method.loc28_21.2: <bound method> = bound_method %int_1.loc28, %specific_fn.loc28_21 [concrete = constants.%bound_method.290]
  1525. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call.loc28: init %i32 = call %bound_method.loc28_21.2(%int_1.loc28) [concrete = constants.%int_1.5d2]
  1526. // CHECK:STDOUT: %.loc28_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call.loc28 [concrete = constants.%int_1.5d2]
  1527. // CHECK:STDOUT: %.loc28_21.2: %i32 = converted %int_1.loc28, %.loc28_21.1 [concrete = constants.%int_1.5d2]
  1528. // CHECK:STDOUT: %a.ref.loc28_31: %Cpp.long = name_ref a, %a
  1529. // CHECK:STDOUT: %impl.elem1.loc28: %.775 = impl_witness_access constants.%BitAndWith.impl_witness.8f0, element1 [concrete = constants.%Int.as.BitAndWith.impl.Op.9e5f79.2]
  1530. // CHECK:STDOUT: %bound_method.loc28_29.1: <bound method> = bound_method %.loc28_21.2, %impl.elem1.loc28 [concrete = constants.%Int.as.BitAndWith.impl.Op.bound.621b36.1]
  1531. // CHECK:STDOUT: %specific_fn.loc28_29: <specific function> = specific_function %impl.elem1.loc28, @Int.as.BitAndWith.impl.Op.2(constants.%int_32, constants.%ImplicitAs.facet.96f) [concrete = constants.%Int.as.BitAndWith.impl.Op.specific_fn.0f118d.1]
  1532. // CHECK:STDOUT: %bound_method.loc28_29.2: <bound method> = bound_method %.loc28_21.2, %specific_fn.loc28_29 [concrete = constants.%bound_method.2c0104.1]
  1533. // CHECK:STDOUT: %.loc28_29: %Int.as.BitAndWith.impl.Op.type.ed3819.1 = specific_constant imports.%Core.Op.36f, @Int.as.BitAndWith.impl.4ac(constants.%int_32, constants.%ImplicitAs.facet.96f) [concrete = constants.%Int.as.BitAndWith.impl.Op.9e5f79.1]
  1534. // CHECK:STDOUT: %Op.ref.loc28: %Int.as.BitAndWith.impl.Op.type.ed3819.1 = name_ref Op, %.loc28_29 [concrete = constants.%Int.as.BitAndWith.impl.Op.9e5f79.1]
  1535. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.bound: <bound method> = bound_method %.loc28_21.2, %Op.ref.loc28 [concrete = constants.%Int.as.BitAndWith.impl.Op.bound.621b36.2]
  1536. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.specific_fn: <specific function> = specific_function %Op.ref.loc28, @Int.as.BitAndWith.impl.Op.3(constants.%int_32, constants.%ImplicitAs.facet.96f) [concrete = constants.%Int.as.BitAndWith.impl.Op.specific_fn.0f118d.2]
  1537. // CHECK:STDOUT: %bound_method.loc28_29.3: <bound method> = bound_method %.loc28_21.2, %Int.as.BitAndWith.impl.Op.specific_fn [concrete = constants.%bound_method.2c0104.2]
  1538. // CHECK:STDOUT: %impl.elem0.loc28_31: %.79c = impl_witness_access constants.%ImplicitAs.impl_witness.925, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert]
  1539. // CHECK:STDOUT: %bound_method.loc28_31: <bound method> = bound_method %a.ref.loc28_31, %impl.elem0.loc28_31
  1540. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc28: init %i32 = call %bound_method.loc28_31(%a.ref.loc28_31)
  1541. // CHECK:STDOUT: %.loc28_31.1: %i32 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc28
  1542. // CHECK:STDOUT: %.loc28_31.2: %i32 = converted %a.ref.loc28_31, %.loc28_31.1
  1543. // CHECK:STDOUT: %Int.as.BitAndWith.impl.Op.call: init %i32 = call %bound_method.loc28_29.3(%.loc28_21.2, %.loc28_31.2)
  1544. // CHECK:STDOUT: %a.ref.loc28_34: %Cpp.long = name_ref a, %a
  1545. // CHECK:STDOUT: name_binding_decl {
  1546. // CHECK:STDOUT: %b.patt: %pattern_type.95b = value_binding_pattern b [concrete]
  1547. // CHECK:STDOUT: }
  1548. // CHECK:STDOUT: %int_1.loc30: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1549. // CHECK:STDOUT: %.loc30_10: type = splice_block %i64 [concrete = constants.%i64] {
  1550. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  1551. // CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
  1552. // CHECK:STDOUT: }
  1553. // CHECK:STDOUT: %impl.elem0.loc30: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
  1554. // CHECK:STDOUT: %bound_method.loc30_16.1: <bound method> = bound_method %int_1.loc30, %impl.elem0.loc30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.102]
  1555. // CHECK:STDOUT: %specific_fn.loc30: <specific function> = specific_function %impl.elem0.loc30, @Core.IntLiteral.as.ImplicitAs.impl.Convert.2(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
  1556. // CHECK:STDOUT: %bound_method.loc30_16.2: <bound method> = bound_method %int_1.loc30, %specific_fn.loc30 [concrete = constants.%bound_method.288]
  1557. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30: init %i64 = call %bound_method.loc30_16.2(%int_1.loc30) [concrete = constants.%int_1.41a]
  1558. // CHECK:STDOUT: %.loc30_16.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc30 [concrete = constants.%int_1.41a]
  1559. // CHECK:STDOUT: %.loc30_16.2: %i64 = converted %int_1.loc30, %.loc30_16.1 [concrete = constants.%int_1.41a]
  1560. // CHECK:STDOUT: %b: %i64 = value_binding b, %.loc30_16.2
  1561. // CHECK:STDOUT: %AssertSameType.ref.loc35: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1562. // CHECK:STDOUT: %a.ref.loc35: %Cpp.long = name_ref a, %a
  1563. // CHECK:STDOUT: %b.ref.loc35_22: %i64 = name_ref b, %b
  1564. // CHECK:STDOUT: %b.ref.loc35_25: %i64 = name_ref b, %b
  1565. // CHECK:STDOUT: %AssertSameType.ref.loc41: %AssertSameType.type = name_ref AssertSameType, file.%AssertSameType.decl [concrete = constants.%AssertSameType]
  1566. // CHECK:STDOUT: %b.ref.loc41_18: %i64 = name_ref b, %b
  1567. // CHECK:STDOUT: %a.ref.loc41: %Cpp.long = name_ref a, %a
  1568. // CHECK:STDOUT: %b.ref.loc41_25: %i64 = name_ref b, %b
  1569. // CHECK:STDOUT: <elided>
  1570. // CHECK:STDOUT: }
  1571. // CHECK:STDOUT:
  1572. // CHECK:STDOUT: --- compound_assignment_homogeneous_long.carbon
  1573. // CHECK:STDOUT:
  1574. // CHECK:STDOUT: constants {
  1575. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1576. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  1577. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  1578. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  1579. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  1580. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  1581. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  1582. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  1583. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete]
  1584. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  1585. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  1586. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  1587. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  1588. // CHECK:STDOUT: %AddAssignWith.type.bef: type = facet_type <@AddAssignWith, @AddAssignWith(%Cpp.long)> [concrete]
  1589. // CHECK:STDOUT: %AddAssignWith.Op.type.6a2: type = fn_type @AddAssignWith.Op, @AddAssignWith(%Cpp.long) [concrete]
  1590. // CHECK:STDOUT: %AddAssignWith.impl_witness: <witness> = impl_witness imports.%AddAssignWith.impl_witness_table [concrete]
  1591. // CHECK:STDOUT: %AddAssignWith.facet: %AddAssignWith.type.bef = facet_value %Cpp.long, (%AddAssignWith.impl_witness) [concrete]
  1592. // CHECK:STDOUT: %.2a7: type = fn_type_with_self_type %AddAssignWith.Op.type.6a2, %AddAssignWith.facet [concrete]
  1593. // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.AddAssignWith.impl.Op [concrete]
  1594. // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op: %Cpp.long.as.AddAssignWith.impl.Op.type = struct_value () [concrete]
  1595. // CHECK:STDOUT: %SubAssignWith.type.b12: type = facet_type <@SubAssignWith, @SubAssignWith(%Cpp.long)> [concrete]
  1596. // CHECK:STDOUT: %SubAssignWith.Op.type.628: type = fn_type @SubAssignWith.Op, @SubAssignWith(%Cpp.long) [concrete]
  1597. // CHECK:STDOUT: %SubAssignWith.impl_witness: <witness> = impl_witness imports.%SubAssignWith.impl_witness_table [concrete]
  1598. // CHECK:STDOUT: %SubAssignWith.facet: %SubAssignWith.type.b12 = facet_value %Cpp.long, (%SubAssignWith.impl_witness) [concrete]
  1599. // CHECK:STDOUT: %.c07: type = fn_type_with_self_type %SubAssignWith.Op.type.628, %SubAssignWith.facet [concrete]
  1600. // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.SubAssignWith.impl.Op [concrete]
  1601. // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op: %Cpp.long.as.SubAssignWith.impl.Op.type = struct_value () [concrete]
  1602. // CHECK:STDOUT: %MulAssignWith.type.59a: type = facet_type <@MulAssignWith, @MulAssignWith(%Cpp.long)> [concrete]
  1603. // CHECK:STDOUT: %MulAssignWith.Op.type.2a9: type = fn_type @MulAssignWith.Op, @MulAssignWith(%Cpp.long) [concrete]
  1604. // CHECK:STDOUT: %MulAssignWith.impl_witness: <witness> = impl_witness imports.%MulAssignWith.impl_witness_table [concrete]
  1605. // CHECK:STDOUT: %MulAssignWith.facet: %MulAssignWith.type.59a = facet_value %Cpp.long, (%MulAssignWith.impl_witness) [concrete]
  1606. // CHECK:STDOUT: %.4f0: type = fn_type_with_self_type %MulAssignWith.Op.type.2a9, %MulAssignWith.facet [concrete]
  1607. // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.MulAssignWith.impl.Op [concrete]
  1608. // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op: %Cpp.long.as.MulAssignWith.impl.Op.type = struct_value () [concrete]
  1609. // CHECK:STDOUT: %DivAssignWith.type.e6d: type = facet_type <@DivAssignWith, @DivAssignWith(%Cpp.long)> [concrete]
  1610. // CHECK:STDOUT: %DivAssignWith.Op.type.883: type = fn_type @DivAssignWith.Op, @DivAssignWith(%Cpp.long) [concrete]
  1611. // CHECK:STDOUT: %DivAssignWith.impl_witness: <witness> = impl_witness imports.%DivAssignWith.impl_witness_table [concrete]
  1612. // CHECK:STDOUT: %DivAssignWith.facet: %DivAssignWith.type.e6d = facet_value %Cpp.long, (%DivAssignWith.impl_witness) [concrete]
  1613. // CHECK:STDOUT: %.b89: type = fn_type_with_self_type %DivAssignWith.Op.type.883, %DivAssignWith.facet [concrete]
  1614. // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.DivAssignWith.impl.Op [concrete]
  1615. // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op: %Cpp.long.as.DivAssignWith.impl.Op.type = struct_value () [concrete]
  1616. // CHECK:STDOUT: %ModAssignWith.type.2a3: type = facet_type <@ModAssignWith, @ModAssignWith(%Cpp.long)> [concrete]
  1617. // CHECK:STDOUT: %ModAssignWith.Op.type.a01: type = fn_type @ModAssignWith.Op, @ModAssignWith(%Cpp.long) [concrete]
  1618. // CHECK:STDOUT: %ModAssignWith.impl_witness: <witness> = impl_witness imports.%ModAssignWith.impl_witness_table [concrete]
  1619. // CHECK:STDOUT: %ModAssignWith.facet: %ModAssignWith.type.2a3 = facet_value %Cpp.long, (%ModAssignWith.impl_witness) [concrete]
  1620. // CHECK:STDOUT: %.28d: type = fn_type_with_self_type %ModAssignWith.Op.type.a01, %ModAssignWith.facet [concrete]
  1621. // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.ModAssignWith.impl.Op [concrete]
  1622. // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op: %Cpp.long.as.ModAssignWith.impl.Op.type = struct_value () [concrete]
  1623. // CHECK:STDOUT: %BitAndAssignWith.type.efd: type = facet_type <@BitAndAssignWith, @BitAndAssignWith(%Cpp.long)> [concrete]
  1624. // CHECK:STDOUT: %BitAndAssignWith.Op.type.3d8: type = fn_type @BitAndAssignWith.Op, @BitAndAssignWith(%Cpp.long) [concrete]
  1625. // CHECK:STDOUT: %BitAndAssignWith.impl_witness: <witness> = impl_witness imports.%BitAndAssignWith.impl_witness_table [concrete]
  1626. // CHECK:STDOUT: %BitAndAssignWith.facet: %BitAndAssignWith.type.efd = facet_value %Cpp.long, (%BitAndAssignWith.impl_witness) [concrete]
  1627. // CHECK:STDOUT: %.8d8: type = fn_type_with_self_type %BitAndAssignWith.Op.type.3d8, %BitAndAssignWith.facet [concrete]
  1628. // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.BitAndAssignWith.impl.Op [concrete]
  1629. // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op: %Cpp.long.as.BitAndAssignWith.impl.Op.type = struct_value () [concrete]
  1630. // CHECK:STDOUT: %BitOrAssignWith.type.b27: type = facet_type <@BitOrAssignWith, @BitOrAssignWith(%Cpp.long)> [concrete]
  1631. // CHECK:STDOUT: %BitOrAssignWith.Op.type.99d: type = fn_type @BitOrAssignWith.Op, @BitOrAssignWith(%Cpp.long) [concrete]
  1632. // CHECK:STDOUT: %BitOrAssignWith.impl_witness: <witness> = impl_witness imports.%BitOrAssignWith.impl_witness_table [concrete]
  1633. // CHECK:STDOUT: %BitOrAssignWith.facet: %BitOrAssignWith.type.b27 = facet_value %Cpp.long, (%BitOrAssignWith.impl_witness) [concrete]
  1634. // CHECK:STDOUT: %.ece: type = fn_type_with_self_type %BitOrAssignWith.Op.type.99d, %BitOrAssignWith.facet [concrete]
  1635. // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.BitOrAssignWith.impl.Op [concrete]
  1636. // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op: %Cpp.long.as.BitOrAssignWith.impl.Op.type = struct_value () [concrete]
  1637. // CHECK:STDOUT: %BitXorAssignWith.type.431: type = facet_type <@BitXorAssignWith, @BitXorAssignWith(%Cpp.long)> [concrete]
  1638. // CHECK:STDOUT: %BitXorAssignWith.Op.type.d3b: type = fn_type @BitXorAssignWith.Op, @BitXorAssignWith(%Cpp.long) [concrete]
  1639. // CHECK:STDOUT: %BitXorAssignWith.impl_witness: <witness> = impl_witness imports.%BitXorAssignWith.impl_witness_table [concrete]
  1640. // CHECK:STDOUT: %BitXorAssignWith.facet: %BitXorAssignWith.type.431 = facet_value %Cpp.long, (%BitXorAssignWith.impl_witness) [concrete]
  1641. // CHECK:STDOUT: %.da8: type = fn_type_with_self_type %BitXorAssignWith.Op.type.d3b, %BitXorAssignWith.facet [concrete]
  1642. // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.BitXorAssignWith.impl.Op [concrete]
  1643. // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op: %Cpp.long.as.BitXorAssignWith.impl.Op.type = struct_value () [concrete]
  1644. // CHECK:STDOUT: %LeftShiftAssignWith.type.bed: type = facet_type <@LeftShiftAssignWith, @LeftShiftAssignWith(%Cpp.long)> [concrete]
  1645. // CHECK:STDOUT: %LeftShiftAssignWith.Op.type.1b3: type = fn_type @LeftShiftAssignWith.Op, @LeftShiftAssignWith(%Cpp.long) [concrete]
  1646. // CHECK:STDOUT: %LeftShiftAssignWith.impl_witness: <witness> = impl_witness imports.%LeftShiftAssignWith.impl_witness_table [concrete]
  1647. // CHECK:STDOUT: %LeftShiftAssignWith.facet: %LeftShiftAssignWith.type.bed = facet_value %Cpp.long, (%LeftShiftAssignWith.impl_witness) [concrete]
  1648. // CHECK:STDOUT: %.959: type = fn_type_with_self_type %LeftShiftAssignWith.Op.type.1b3, %LeftShiftAssignWith.facet [concrete]
  1649. // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.LeftShiftAssignWith.impl.Op [concrete]
  1650. // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type = struct_value () [concrete]
  1651. // CHECK:STDOUT: %RightShiftAssignWith.type.222: type = facet_type <@RightShiftAssignWith, @RightShiftAssignWith(%Cpp.long)> [concrete]
  1652. // CHECK:STDOUT: %RightShiftAssignWith.Op.type.400: type = fn_type @RightShiftAssignWith.Op, @RightShiftAssignWith(%Cpp.long) [concrete]
  1653. // CHECK:STDOUT: %RightShiftAssignWith.impl_witness: <witness> = impl_witness imports.%RightShiftAssignWith.impl_witness_table [concrete]
  1654. // CHECK:STDOUT: %RightShiftAssignWith.facet: %RightShiftAssignWith.type.222 = facet_value %Cpp.long, (%RightShiftAssignWith.impl_witness) [concrete]
  1655. // CHECK:STDOUT: %.ff6: type = fn_type_with_self_type %RightShiftAssignWith.Op.type.400, %RightShiftAssignWith.facet [concrete]
  1656. // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.type: type = fn_type @Cpp.long.as.RightShiftAssignWith.impl.Op [concrete]
  1657. // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op: %Cpp.long.as.RightShiftAssignWith.impl.Op.type = struct_value () [concrete]
  1658. // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
  1659. // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
  1660. // CHECK:STDOUT: }
  1661. // CHECK:STDOUT:
  1662. // CHECK:STDOUT: imports {
  1663. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1664. // CHECK:STDOUT: .long = constants.%Cpp.long
  1665. // CHECK:STDOUT: import Cpp//...
  1666. // CHECK:STDOUT: }
  1667. // 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]
  1668. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  1669. // CHECK:STDOUT: %Core.import_ref.5aa: %Cpp.long.as.AddAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op]
  1670. // CHECK:STDOUT: %AddAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.5aa), @Cpp.long.as.AddAssignWith.impl [concrete]
  1671. // CHECK:STDOUT: %Core.import_ref.7e7: %Cpp.long.as.SubAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.SubAssignWith.impl.Op]
  1672. // CHECK:STDOUT: %SubAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.7e7), @Cpp.long.as.SubAssignWith.impl [concrete]
  1673. // CHECK:STDOUT: %Core.import_ref.2efa: %Cpp.long.as.MulAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.MulAssignWith.impl.Op]
  1674. // CHECK:STDOUT: %MulAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.2efa), @Cpp.long.as.MulAssignWith.impl [concrete]
  1675. // CHECK:STDOUT: %Core.import_ref.ed0: %Cpp.long.as.DivAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.DivAssignWith.impl.Op]
  1676. // CHECK:STDOUT: %DivAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.ed0), @Cpp.long.as.DivAssignWith.impl [concrete]
  1677. // CHECK:STDOUT: %Core.import_ref.127: %Cpp.long.as.ModAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.ModAssignWith.impl.Op]
  1678. // CHECK:STDOUT: %ModAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.127), @Cpp.long.as.ModAssignWith.impl [concrete]
  1679. // CHECK:STDOUT: %Core.import_ref.462: %Cpp.long.as.BitAndAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.BitAndAssignWith.impl.Op]
  1680. // CHECK:STDOUT: %BitAndAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.462), @Cpp.long.as.BitAndAssignWith.impl [concrete]
  1681. // CHECK:STDOUT: %Core.import_ref.ebc: %Cpp.long.as.BitOrAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.BitOrAssignWith.impl.Op]
  1682. // CHECK:STDOUT: %BitOrAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.ebc), @Cpp.long.as.BitOrAssignWith.impl [concrete]
  1683. // CHECK:STDOUT: %Core.import_ref.c11: %Cpp.long.as.BitXorAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.BitXorAssignWith.impl.Op]
  1684. // CHECK:STDOUT: %BitXorAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.c11), @Cpp.long.as.BitXorAssignWith.impl [concrete]
  1685. // CHECK:STDOUT: %Core.import_ref.fdb: %Cpp.long.as.LeftShiftAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op]
  1686. // CHECK:STDOUT: %LeftShiftAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.fdb), @Cpp.long.as.LeftShiftAssignWith.impl [concrete]
  1687. // CHECK:STDOUT: %Core.import_ref.791: %Cpp.long.as.RightShiftAssignWith.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op]
  1688. // CHECK:STDOUT: %RightShiftAssignWith.impl_witness_table = impl_witness_table (%Core.import_ref.791), @Cpp.long.as.RightShiftAssignWith.impl [concrete]
  1689. // CHECK:STDOUT: }
  1690. // CHECK:STDOUT:
  1691. // CHECK:STDOUT: fn @CompoundAssignmentHomogeneousLong() {
  1692. // CHECK:STDOUT: !entry:
  1693. // CHECK:STDOUT: name_binding_decl {
  1694. // CHECK:STDOUT: %a.patt: %pattern_type.68c = ref_binding_pattern a [concrete]
  1695. // CHECK:STDOUT: %a.var_patt: %pattern_type.68c = var_pattern %a.patt [concrete]
  1696. // CHECK:STDOUT: }
  1697. // CHECK:STDOUT: %a.var: ref %Cpp.long = var %a.var_patt
  1698. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1699. // CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1700. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %int_1.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  1701. // 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]
  1702. // CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1.loc8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.5a4]
  1703. // CHECK:STDOUT: assign %a.var, %.loc8_3
  1704. // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref.loc8 [concrete = constants.%Cpp.long] {
  1705. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1706. // CHECK:STDOUT: %long.ref.loc8: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1707. // CHECK:STDOUT: }
  1708. // CHECK:STDOUT: %a: ref %Cpp.long = ref_binding a, %a.var
  1709. // CHECK:STDOUT: name_binding_decl {
  1710. // CHECK:STDOUT: %b.patt: %pattern_type.68c = ref_binding_pattern b [concrete]
  1711. // CHECK:STDOUT: %b.var_patt: %pattern_type.68c = var_pattern %b.patt [concrete]
  1712. // CHECK:STDOUT: }
  1713. // CHECK:STDOUT: %b.var: ref %Cpp.long = var %b.var_patt
  1714. // CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1715. // CHECK:STDOUT: %impl.elem0.loc9: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1716. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  1717. // 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]
  1718. // CHECK:STDOUT: %.loc9_3: init %Cpp.long = converted %int_1.loc9, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_1.5a4]
  1719. // CHECK:STDOUT: assign %b.var, %.loc9_3
  1720. // CHECK:STDOUT: %.loc9_13: type = splice_block %long.ref.loc9 [concrete = constants.%Cpp.long] {
  1721. // CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1722. // CHECK:STDOUT: %long.ref.loc9: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1723. // CHECK:STDOUT: }
  1724. // CHECK:STDOUT: %b: ref %Cpp.long = ref_binding b, %b.var
  1725. // CHECK:STDOUT: %a.ref.loc11: ref %Cpp.long = name_ref a, %a
  1726. // CHECK:STDOUT: %b.ref.loc11: ref %Cpp.long = name_ref b, %b
  1727. // CHECK:STDOUT: %impl.elem0.loc11: %.2a7 = impl_witness_access constants.%AddAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.AddAssignWith.impl.Op]
  1728. // CHECK:STDOUT: %bound_method.loc11: <bound method> = bound_method %a.ref.loc11, %impl.elem0.loc11
  1729. // CHECK:STDOUT: %.loc11: %Cpp.long = acquire_value %b.ref.loc11
  1730. // CHECK:STDOUT: %Cpp.long.as.AddAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc11(%a.ref.loc11, %.loc11)
  1731. // CHECK:STDOUT: %a.ref.loc12: ref %Cpp.long = name_ref a, %a
  1732. // CHECK:STDOUT: %b.ref.loc12: ref %Cpp.long = name_ref b, %b
  1733. // CHECK:STDOUT: %impl.elem0.loc12: %.c07 = impl_witness_access constants.%SubAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.SubAssignWith.impl.Op]
  1734. // CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %a.ref.loc12, %impl.elem0.loc12
  1735. // CHECK:STDOUT: %.loc12: %Cpp.long = acquire_value %b.ref.loc12
  1736. // CHECK:STDOUT: %Cpp.long.as.SubAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc12(%a.ref.loc12, %.loc12)
  1737. // CHECK:STDOUT: %a.ref.loc13: ref %Cpp.long = name_ref a, %a
  1738. // CHECK:STDOUT: %b.ref.loc13: ref %Cpp.long = name_ref b, %b
  1739. // CHECK:STDOUT: %impl.elem0.loc13: %.4f0 = impl_witness_access constants.%MulAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.MulAssignWith.impl.Op]
  1740. // CHECK:STDOUT: %bound_method.loc13: <bound method> = bound_method %a.ref.loc13, %impl.elem0.loc13
  1741. // CHECK:STDOUT: %.loc13: %Cpp.long = acquire_value %b.ref.loc13
  1742. // CHECK:STDOUT: %Cpp.long.as.MulAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc13(%a.ref.loc13, %.loc13)
  1743. // CHECK:STDOUT: %a.ref.loc14: ref %Cpp.long = name_ref a, %a
  1744. // CHECK:STDOUT: %b.ref.loc14: ref %Cpp.long = name_ref b, %b
  1745. // CHECK:STDOUT: %impl.elem0.loc14: %.b89 = impl_witness_access constants.%DivAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.DivAssignWith.impl.Op]
  1746. // CHECK:STDOUT: %bound_method.loc14: <bound method> = bound_method %a.ref.loc14, %impl.elem0.loc14
  1747. // CHECK:STDOUT: %.loc14: %Cpp.long = acquire_value %b.ref.loc14
  1748. // CHECK:STDOUT: %Cpp.long.as.DivAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc14(%a.ref.loc14, %.loc14)
  1749. // CHECK:STDOUT: %a.ref.loc15: ref %Cpp.long = name_ref a, %a
  1750. // CHECK:STDOUT: %b.ref.loc15: ref %Cpp.long = name_ref b, %b
  1751. // CHECK:STDOUT: %impl.elem0.loc15: %.28d = impl_witness_access constants.%ModAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.ModAssignWith.impl.Op]
  1752. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %a.ref.loc15, %impl.elem0.loc15
  1753. // CHECK:STDOUT: %.loc15: %Cpp.long = acquire_value %b.ref.loc15
  1754. // CHECK:STDOUT: %Cpp.long.as.ModAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc15(%a.ref.loc15, %.loc15)
  1755. // CHECK:STDOUT: %a.ref.loc17: ref %Cpp.long = name_ref a, %a
  1756. // CHECK:STDOUT: %b.ref.loc17: ref %Cpp.long = name_ref b, %b
  1757. // CHECK:STDOUT: %impl.elem0.loc17: %.8d8 = impl_witness_access constants.%BitAndAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.BitAndAssignWith.impl.Op]
  1758. // CHECK:STDOUT: %bound_method.loc17: <bound method> = bound_method %a.ref.loc17, %impl.elem0.loc17
  1759. // CHECK:STDOUT: %.loc17: %Cpp.long = acquire_value %b.ref.loc17
  1760. // CHECK:STDOUT: %Cpp.long.as.BitAndAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc17(%a.ref.loc17, %.loc17)
  1761. // CHECK:STDOUT: %a.ref.loc18: ref %Cpp.long = name_ref a, %a
  1762. // CHECK:STDOUT: %b.ref.loc18: ref %Cpp.long = name_ref b, %b
  1763. // CHECK:STDOUT: %impl.elem0.loc18: %.ece = impl_witness_access constants.%BitOrAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.BitOrAssignWith.impl.Op]
  1764. // CHECK:STDOUT: %bound_method.loc18: <bound method> = bound_method %a.ref.loc18, %impl.elem0.loc18
  1765. // CHECK:STDOUT: %.loc18: %Cpp.long = acquire_value %b.ref.loc18
  1766. // CHECK:STDOUT: %Cpp.long.as.BitOrAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc18(%a.ref.loc18, %.loc18)
  1767. // CHECK:STDOUT: %a.ref.loc19: ref %Cpp.long = name_ref a, %a
  1768. // CHECK:STDOUT: %b.ref.loc19: ref %Cpp.long = name_ref b, %b
  1769. // CHECK:STDOUT: %impl.elem0.loc19: %.da8 = impl_witness_access constants.%BitXorAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.BitXorAssignWith.impl.Op]
  1770. // CHECK:STDOUT: %bound_method.loc19: <bound method> = bound_method %a.ref.loc19, %impl.elem0.loc19
  1771. // CHECK:STDOUT: %.loc19: %Cpp.long = acquire_value %b.ref.loc19
  1772. // CHECK:STDOUT: %Cpp.long.as.BitXorAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc19(%a.ref.loc19, %.loc19)
  1773. // CHECK:STDOUT: %a.ref.loc20: ref %Cpp.long = name_ref a, %a
  1774. // CHECK:STDOUT: %b.ref.loc20: ref %Cpp.long = name_ref b, %b
  1775. // CHECK:STDOUT: %impl.elem0.loc20: %.959 = impl_witness_access constants.%LeftShiftAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.LeftShiftAssignWith.impl.Op]
  1776. // CHECK:STDOUT: %bound_method.loc20: <bound method> = bound_method %a.ref.loc20, %impl.elem0.loc20
  1777. // CHECK:STDOUT: %.loc20: %Cpp.long = acquire_value %b.ref.loc20
  1778. // CHECK:STDOUT: %Cpp.long.as.LeftShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc20(%a.ref.loc20, %.loc20)
  1779. // CHECK:STDOUT: %a.ref.loc21: ref %Cpp.long = name_ref a, %a
  1780. // CHECK:STDOUT: %b.ref.loc21: ref %Cpp.long = name_ref b, %b
  1781. // CHECK:STDOUT: %impl.elem0.loc21: %.ff6 = impl_witness_access constants.%RightShiftAssignWith.impl_witness, element0 [concrete = constants.%Cpp.long.as.RightShiftAssignWith.impl.Op]
  1782. // CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %a.ref.loc21, %impl.elem0.loc21
  1783. // CHECK:STDOUT: %.loc21: %Cpp.long = acquire_value %b.ref.loc21
  1784. // CHECK:STDOUT: %Cpp.long.as.RightShiftAssignWith.impl.Op.call: init %empty_tuple.type = call %bound_method.loc21(%a.ref.loc21, %.loc21)
  1785. // CHECK:STDOUT: %DestroyOp.bound.loc9: <bound method> = bound_method %b.var, constants.%DestroyOp
  1786. // CHECK:STDOUT: %DestroyOp.call.loc9: init %empty_tuple.type = call %DestroyOp.bound.loc9(%b.var)
  1787. // CHECK:STDOUT: %DestroyOp.bound.loc8: <bound method> = bound_method %a.var, constants.%DestroyOp
  1788. // CHECK:STDOUT: %DestroyOp.call.loc8: init %empty_tuple.type = call %DestroyOp.bound.loc8(%a.var)
  1789. // CHECK:STDOUT: <elided>
  1790. // CHECK:STDOUT: }
  1791. // CHECK:STDOUT:
  1792. // CHECK:STDOUT: fn @DestroyOp(%self.param: %Cpp.long) = "no_op";
  1793. // CHECK:STDOUT:
  1794. // CHECK:STDOUT: --- increment_decrement_long.carbon
  1795. // CHECK:STDOUT:
  1796. // CHECK:STDOUT: constants {
  1797. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1798. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  1799. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  1800. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  1801. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  1802. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  1803. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  1804. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  1805. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet [concrete]
  1806. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  1807. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type = struct_value () [concrete]
  1808. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert [concrete]
  1809. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  1810. // CHECK:STDOUT: %Inc.type: type = facet_type <@Inc> [concrete]
  1811. // CHECK:STDOUT: %Inc.Op.type: type = fn_type @Inc.Op [concrete]
  1812. // CHECK:STDOUT: %Inc.impl_witness: <witness> = impl_witness imports.%Inc.impl_witness_table [concrete]
  1813. // CHECK:STDOUT: %Inc.facet: %Inc.type = facet_value %Cpp.long, (%Inc.impl_witness) [concrete]
  1814. // CHECK:STDOUT: %.153: type = fn_type_with_self_type %Inc.Op.type, %Inc.facet [concrete]
  1815. // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op.type: type = fn_type @Cpp.long.as.Inc.impl.Op [concrete]
  1816. // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op: %Cpp.long.as.Inc.impl.Op.type = struct_value () [concrete]
  1817. // CHECK:STDOUT: %Dec.type: type = facet_type <@Dec> [concrete]
  1818. // CHECK:STDOUT: %Dec.Op.type: type = fn_type @Dec.Op [concrete]
  1819. // CHECK:STDOUT: %Dec.impl_witness: <witness> = impl_witness imports.%Dec.impl_witness_table [concrete]
  1820. // CHECK:STDOUT: %Dec.facet: %Dec.type = facet_value %Cpp.long, (%Dec.impl_witness) [concrete]
  1821. // CHECK:STDOUT: %.fff: type = fn_type_with_self_type %Dec.Op.type, %Dec.facet [concrete]
  1822. // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op.type: type = fn_type @Cpp.long.as.Dec.impl.Op [concrete]
  1823. // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op: %Cpp.long.as.Dec.impl.Op.type = struct_value () [concrete]
  1824. // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
  1825. // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
  1826. // CHECK:STDOUT: }
  1827. // CHECK:STDOUT:
  1828. // CHECK:STDOUT: imports {
  1829. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1830. // CHECK:STDOUT: .long = constants.%Cpp.long
  1831. // CHECK:STDOUT: import Cpp//...
  1832. // CHECK:STDOUT: }
  1833. // 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]
  1834. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  1835. // CHECK:STDOUT: %Core.import_ref.9d7: %Cpp.long.as.Inc.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.Inc.impl.Op]
  1836. // CHECK:STDOUT: %Inc.impl_witness_table = impl_witness_table (%Core.import_ref.9d7), @Cpp.long.as.Inc.impl [concrete]
  1837. // CHECK:STDOUT: %Core.import_ref.d5d: %Cpp.long.as.Dec.impl.Op.type = import_ref Core//prelude/types/cpp/int, loc{{\d+_\d+}}, loaded [concrete = constants.%Cpp.long.as.Dec.impl.Op]
  1838. // CHECK:STDOUT: %Dec.impl_witness_table = impl_witness_table (%Core.import_ref.d5d), @Cpp.long.as.Dec.impl [concrete]
  1839. // CHECK:STDOUT: }
  1840. // CHECK:STDOUT:
  1841. // CHECK:STDOUT: fn @IncrementDecrementLong() {
  1842. // CHECK:STDOUT: !entry:
  1843. // CHECK:STDOUT: name_binding_decl {
  1844. // CHECK:STDOUT: %a.patt: %pattern_type.68c = ref_binding_pattern a [concrete]
  1845. // CHECK:STDOUT: %a.var_patt: %pattern_type.68c = var_pattern %a.patt [concrete]
  1846. // CHECK:STDOUT: }
  1847. // CHECK:STDOUT: %a.var: ref %Cpp.long = var %a.var_patt
  1848. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  1849. // CHECK:STDOUT: %impl.elem0.loc8: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert]
  1850. // CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %int_1, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  1851. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc8(%int_1) [concrete = constants.%int_1.5a4]
  1852. // CHECK:STDOUT: %.loc8_3: init %Cpp.long = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5a4]
  1853. // CHECK:STDOUT: assign %a.var, %.loc8_3
  1854. // CHECK:STDOUT: %.loc8_13: type = splice_block %long.ref [concrete = constants.%Cpp.long] {
  1855. // CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  1856. // CHECK:STDOUT: %long.ref: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  1857. // CHECK:STDOUT: }
  1858. // CHECK:STDOUT: %a: ref %Cpp.long = ref_binding a, %a.var
  1859. // CHECK:STDOUT: %a.ref.loc9: ref %Cpp.long = name_ref a, %a
  1860. // CHECK:STDOUT: %impl.elem0.loc9: %.153 = impl_witness_access constants.%Inc.impl_witness, element0 [concrete = constants.%Cpp.long.as.Inc.impl.Op]
  1861. // CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %a.ref.loc9, %impl.elem0.loc9
  1862. // CHECK:STDOUT: %Cpp.long.as.Inc.impl.Op.call: init %empty_tuple.type = call %bound_method.loc9(%a.ref.loc9)
  1863. // CHECK:STDOUT: %a.ref.loc10: ref %Cpp.long = name_ref a, %a
  1864. // CHECK:STDOUT: %impl.elem0.loc10: %.fff = impl_witness_access constants.%Dec.impl_witness, element0 [concrete = constants.%Cpp.long.as.Dec.impl.Op]
  1865. // CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %a.ref.loc10, %impl.elem0.loc10
  1866. // CHECK:STDOUT: %Cpp.long.as.Dec.impl.Op.call: init %empty_tuple.type = call %bound_method.loc10(%a.ref.loc10)
  1867. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
  1868. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  1869. // CHECK:STDOUT: <elided>
  1870. // CHECK:STDOUT: }
  1871. // CHECK:STDOUT:
  1872. // CHECK:STDOUT: fn @DestroyOp(%self.param: %Cpp.long) = "no_op";
  1873. // CHECK:STDOUT:
  1874. // CHECK:STDOUT: --- unsigned_long.carbon
  1875. // CHECK:STDOUT:
  1876. // CHECK:STDOUT: constants {
  1877. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  1878. // CHECK:STDOUT: %Cpp.unsigned_long: type = class_type @ULong32 [concrete]
  1879. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  1880. // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete]
  1881. // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete]
  1882. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  1883. // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete]
  1884. // CHECK:STDOUT: %pattern_type.5b7: type = pattern_type %Cpp.unsigned_long [concrete]
  1885. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  1886. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  1887. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  1888. // CHECK:STDOUT: %ImplicitAs.type.3c3: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.unsigned_long)> [concrete]
  1889. // CHECK:STDOUT: %ImplicitAs.Convert.type.691: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.unsigned_long) [concrete]
  1890. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  1891. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  1892. // CHECK:STDOUT: %ImplicitAs.type.146: type = facet_type <@ImplicitAs, @ImplicitAs(%u32)> [concrete]
  1893. // CHECK:STDOUT: %ImplicitAs.Convert.type.92a: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u32) [concrete]
  1894. // CHECK:STDOUT: %ImplicitAs.impl_witness.a19: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.5b5 [concrete]
  1895. // CHECK:STDOUT: %ImplicitAs.facet.66c: %ImplicitAs.type.3c3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.a19) [concrete]
  1896. // CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %ImplicitAs.Convert.type.691, %ImplicitAs.facet.66c [concrete]
  1897. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.71f: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete]
  1898. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.14b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.71f = struct_value () [concrete]
  1899. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.14b [concrete]
  1900. // CHECK:STDOUT: %int_1.0ab: %Cpp.unsigned_long = int_value 1 [concrete]
  1901. // CHECK:STDOUT: %ULongResult: type = class_type @ULongResult [concrete]
  1902. // CHECK:STDOUT: %pattern_type.6f2: type = pattern_type %ULongResult [concrete]
  1903. // CHECK:STDOUT: %PassULong.cpp_overload_set.type: type = cpp_overload_set_type @PassULong.cpp_overload_set [concrete]
  1904. // CHECK:STDOUT: %PassULong.cpp_overload_set.value: %PassULong.cpp_overload_set.type = cpp_overload_set_value @PassULong.cpp_overload_set [concrete]
  1905. // CHECK:STDOUT: %ptr.f5e: type = ptr_type %ULongResult [concrete]
  1906. // CHECK:STDOUT: %PassULong__carbon_thunk.type.3fc2d8.1: type = fn_type @PassULong__carbon_thunk.1 [concrete]
  1907. // CHECK:STDOUT: %PassULong__carbon_thunk.ff747d.1: %PassULong__carbon_thunk.type.3fc2d8.1 = struct_value () [concrete]
  1908. // CHECK:STDOUT: %pattern_type.4a9: type = pattern_type %u32 [concrete]
  1909. // CHECK:STDOUT: %ImplicitAs.impl_witness.e61: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.af7 [concrete]
  1910. // CHECK:STDOUT: %ImplicitAs.facet.3c4: %ImplicitAs.type.146 = facet_value %Cpp.unsigned_long, (%ImplicitAs.impl_witness.e61) [concrete]
  1911. // CHECK:STDOUT: %.da1: type = fn_type_with_self_type %ImplicitAs.Convert.type.92a, %ImplicitAs.facet.3c4 [concrete]
  1912. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.bef: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert.1 [concrete]
  1913. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.19d: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.bef = struct_value () [concrete]
  1914. // CHECK:STDOUT: %UIntResult: type = class_type @UIntResult [concrete]
  1915. // CHECK:STDOUT: %pattern_type.dc7: type = pattern_type %UIntResult [concrete]
  1916. // CHECK:STDOUT: %ptr.059: type = ptr_type %UIntResult [concrete]
  1917. // CHECK:STDOUT: %PassULong__carbon_thunk.type.3fc2d8.2: type = fn_type @PassULong__carbon_thunk.2 [concrete]
  1918. // CHECK:STDOUT: %PassULong__carbon_thunk.ff747d.2: %PassULong__carbon_thunk.type.3fc2d8.2 = struct_value () [concrete]
  1919. // CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
  1920. // CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
  1921. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  1922. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  1923. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  1924. // CHECK:STDOUT: %As.type.950: type = facet_type <@As, @As(%Cpp.unsigned_long)> [concrete]
  1925. // CHECK:STDOUT: %As.Convert.type.3ff: type = fn_type @As.Convert, @As(%Cpp.unsigned_long) [concrete]
  1926. // CHECK:STDOUT: %As.impl_witness.d5f: <witness> = impl_witness imports.%As.impl_witness_table.f58 [concrete]
  1927. // CHECK:STDOUT: %As.facet: %As.type.950 = facet_value Core.IntLiteral, (%As.impl_witness.d5f) [concrete]
  1928. // CHECK:STDOUT: %.80d: type = fn_type_with_self_type %As.Convert.type.3ff, %As.facet [concrete]
  1929. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
  1930. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
  1931. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete]
  1932. // CHECK:STDOUT: %ImplicitAs.impl_witness.a13: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.50d [concrete]
  1933. // CHECK:STDOUT: %ImplicitAs.facet.2f7: %ImplicitAs.type.139 = facet_value %Cpp.unsigned_long, (%ImplicitAs.impl_witness.a13) [concrete]
  1934. // CHECK:STDOUT: %.4f2: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.2f7 [concrete]
  1935. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.a9d: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert.2 [concrete]
  1936. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.a9d = struct_value () [concrete]
  1937. // 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]
  1938. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  1939. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  1940. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  1941. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  1942. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  1943. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  1944. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  1945. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  1946. // 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]
  1947. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  1948. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  1949. // 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]
  1950. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  1951. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  1952. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  1953. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  1954. // 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]
  1955. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  1956. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  1957. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  1958. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  1959. // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc24 [concrete]
  1960. // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete]
  1961. // CHECK:STDOUT: %UIntResult.cpp_destructor.type: type = fn_type @UIntResult.cpp_destructor [concrete]
  1962. // CHECK:STDOUT: %UIntResult.cpp_destructor: %UIntResult.cpp_destructor.type = struct_value () [concrete]
  1963. // CHECK:STDOUT: %ULongResult.cpp_destructor.type: type = fn_type @ULongResult.cpp_destructor [concrete]
  1964. // CHECK:STDOUT: %ULongResult.cpp_destructor: %ULongResult.cpp_destructor.type = struct_value () [concrete]
  1965. // CHECK:STDOUT: }
  1966. // CHECK:STDOUT:
  1967. // CHECK:STDOUT: imports {
  1968. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  1969. // CHECK:STDOUT: .CppCompat = %CppCompat.4b4
  1970. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  1971. // CHECK:STDOUT: .UInt = %Core.UInt
  1972. // CHECK:STDOUT: .Float = %Core.Float
  1973. // CHECK:STDOUT: .As = %Core.As
  1974. // CHECK:STDOUT: .Destroy = %Core.Destroy
  1975. // CHECK:STDOUT: import Core//prelude
  1976. // CHECK:STDOUT: import Core//prelude/...
  1977. // CHECK:STDOUT: }
  1978. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  1979. // CHECK:STDOUT: .unsigned_long = constants.%Cpp.unsigned_long
  1980. // CHECK:STDOUT: .ULongResult = %ULongResult.decl
  1981. // CHECK:STDOUT: .PassULong = %PassULong.cpp_overload_set.value
  1982. // CHECK:STDOUT: .UIntResult = %UIntResult.decl
  1983. // CHECK:STDOUT: import Cpp//...
  1984. // CHECK:STDOUT: }
  1985. // CHECK:STDOUT: %Core.CppCompat: <namespace> = import_ref Core//prelude, CppCompat, loaded
  1986. // CHECK:STDOUT: %CppCompat.4b4: <namespace> = namespace %Core.CppCompat, [concrete] {
  1987. // CHECK:STDOUT: .ULong32 = %Core.ULong32
  1988. // CHECK:STDOUT: import Core//prelude
  1989. // CHECK:STDOUT: import Core//prelude/...
  1990. // CHECK:STDOUT: }
  1991. // CHECK:STDOUT: %Core.ULong32: type = import_ref Core//prelude/types/cpp/int, ULong32, loaded [concrete = constants.%Cpp.unsigned_long]
  1992. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  1993. // 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]
  1994. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.5b5 = impl_witness_table (%Core.import_ref.702), @Core.IntLiteral.as.ImplicitAs.impl.541 [concrete]
  1995. // CHECK:STDOUT: %ULongResult.decl: type = class_decl @ULongResult [concrete = constants.%ULongResult] {} {}
  1996. // 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]
  1997. // 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] {
  1998. // CHECK:STDOUT: <elided>
  1999. // CHECK:STDOUT: } {
  2000. // CHECK:STDOUT: <elided>
  2001. // CHECK:STDOUT: }
  2002. // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/types/uint, UInt, loaded [concrete = constants.%UInt.generic]
  2003. // 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]
  2004. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.af7 = impl_witness_table (%Core.import_ref.d88), @Cpp.unsigned_long.as.ImplicitAs.impl.66a [concrete]
  2005. // CHECK:STDOUT: %UIntResult.decl: type = class_decl @UIntResult [concrete = constants.%UIntResult] {} {}
  2006. // 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] {
  2007. // CHECK:STDOUT: <elided>
  2008. // CHECK:STDOUT: } {
  2009. // CHECK:STDOUT: <elided>
  2010. // CHECK:STDOUT: }
  2011. // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types/float, Float, loaded [concrete = constants.%Float.generic]
  2012. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
  2013. // 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]
  2014. // CHECK:STDOUT: %As.impl_witness_table.f58 = impl_witness_table (%Core.import_ref.190), @Core.IntLiteral.as.As.impl.8c9 [concrete]
  2015. // 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]
  2016. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.50d = impl_witness_table (%Core.import_ref.f5e), @Cpp.unsigned_long.as.ImplicitAs.impl.78e [concrete]
  2017. // 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)]
  2018. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  2019. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  2020. // CHECK:STDOUT: }
  2021. // CHECK:STDOUT:
  2022. // CHECK:STDOUT: fn @F() {
  2023. // CHECK:STDOUT: !entry:
  2024. // CHECK:STDOUT: name_binding_decl {
  2025. // CHECK:STDOUT: %cpp_unsigned_long.patt: %pattern_type.5b7 = value_binding_pattern cpp_unsigned_long [concrete]
  2026. // CHECK:STDOUT: }
  2027. // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  2028. // CHECK:STDOUT: %.loc15_29: type = splice_block %unsigned_long.ref.loc15 [concrete = constants.%Cpp.unsigned_long] {
  2029. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2030. // CHECK:STDOUT: %unsigned_long.ref.loc15: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long]
  2031. // CHECK:STDOUT: }
  2032. // CHECK:STDOUT: %impl.elem0.loc15: %.6bf = impl_witness_access constants.%ImplicitAs.impl_witness.a19, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.14b]
  2033. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  2034. // 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]
  2035. // CHECK:STDOUT: %.loc15_46.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.0ab]
  2036. // CHECK:STDOUT: %.loc15_46.2: %Cpp.unsigned_long = converted %int_1.loc15, %.loc15_46.1 [concrete = constants.%int_1.0ab]
  2037. // CHECK:STDOUT: %cpp_unsigned_long: %Cpp.unsigned_long = value_binding cpp_unsigned_long, %.loc15_46.2
  2038. // CHECK:STDOUT: name_binding_decl {
  2039. // CHECK:STDOUT: %cpp_unsigned_long_result.patt: %pattern_type.6f2 = value_binding_pattern cpp_unsigned_long_result [concrete]
  2040. // CHECK:STDOUT: }
  2041. // CHECK:STDOUT: %Cpp.ref.loc16_51: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2042. // 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]
  2043. // CHECK:STDOUT: %cpp_unsigned_long.ref.loc16: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
  2044. // CHECK:STDOUT: %.loc16_82.1: ref %ULongResult = temporary_storage
  2045. // CHECK:STDOUT: %addr.loc16: %ptr.f5e = addr_of %.loc16_82.1
  2046. // 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)
  2047. // CHECK:STDOUT: %.loc16_82.2: init %ULongResult to %.loc16_82.1 = in_place_init %PassULong__carbon_thunk.call.loc16
  2048. // CHECK:STDOUT: %.loc16_36: type = splice_block %ULongResult.ref.loc16 [concrete = constants.%ULongResult] {
  2049. // CHECK:STDOUT: %Cpp.ref.loc16_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2050. // CHECK:STDOUT: %ULongResult.ref.loc16: type = name_ref ULongResult, imports.%ULongResult.decl [concrete = constants.%ULongResult]
  2051. // CHECK:STDOUT: }
  2052. // CHECK:STDOUT: %.loc16_82.3: ref %ULongResult = temporary %.loc16_82.1, %.loc16_82.2
  2053. // CHECK:STDOUT: %.loc16_82.4: %ULongResult = acquire_value %.loc16_82.3
  2054. // CHECK:STDOUT: %cpp_unsigned_long_result: %ULongResult = value_binding cpp_unsigned_long_result, %.loc16_82.4
  2055. // CHECK:STDOUT: name_binding_decl {
  2056. // CHECK:STDOUT: %cpp_compat_ulong.patt: %pattern_type.5b7 = value_binding_pattern cpp_compat_ulong [concrete]
  2057. // CHECK:STDOUT: }
  2058. // CHECK:STDOUT: %cpp_unsigned_long.ref.loc18: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
  2059. // CHECK:STDOUT: %.loc18: type = splice_block %ULong32.ref [concrete = constants.%Cpp.unsigned_long] {
  2060. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  2061. // CHECK:STDOUT: %CppCompat.ref: <namespace> = name_ref CppCompat, imports.%CppCompat.4b4 [concrete = imports.%CppCompat.4b4]
  2062. // CHECK:STDOUT: %ULong32.ref: type = name_ref ULong32, imports.%Core.ULong32 [concrete = constants.%Cpp.unsigned_long]
  2063. // CHECK:STDOUT: }
  2064. // CHECK:STDOUT: %cpp_compat_ulong: %Cpp.unsigned_long = value_binding cpp_compat_ulong, %cpp_unsigned_long.ref.loc18
  2065. // CHECK:STDOUT: name_binding_decl {
  2066. // CHECK:STDOUT: %cpp_compat_ulong_result.patt: %pattern_type.6f2 = value_binding_pattern cpp_compat_ulong_result [concrete]
  2067. // CHECK:STDOUT: }
  2068. // CHECK:STDOUT: %Cpp.ref.loc19_50: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2069. // 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]
  2070. // CHECK:STDOUT: %cpp_compat_ulong.ref: %Cpp.unsigned_long = name_ref cpp_compat_ulong, %cpp_compat_ulong
  2071. // CHECK:STDOUT: %.loc19_80.1: ref %ULongResult = temporary_storage
  2072. // CHECK:STDOUT: %addr.loc19: %ptr.f5e = addr_of %.loc19_80.1
  2073. // 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)
  2074. // CHECK:STDOUT: %.loc19_80.2: init %ULongResult to %.loc19_80.1 = in_place_init %PassULong__carbon_thunk.call.loc19
  2075. // CHECK:STDOUT: %.loc19_35: type = splice_block %ULongResult.ref.loc19 [concrete = constants.%ULongResult] {
  2076. // CHECK:STDOUT: %Cpp.ref.loc19_32: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2077. // CHECK:STDOUT: %ULongResult.ref.loc19: type = name_ref ULongResult, imports.%ULongResult.decl [concrete = constants.%ULongResult]
  2078. // CHECK:STDOUT: }
  2079. // CHECK:STDOUT: %.loc19_80.3: ref %ULongResult = temporary %.loc19_80.1, %.loc19_80.2
  2080. // CHECK:STDOUT: %.loc19_80.4: %ULongResult = acquire_value %.loc19_80.3
  2081. // CHECK:STDOUT: %cpp_compat_ulong_result: %ULongResult = value_binding cpp_compat_ulong_result, %.loc19_80.4
  2082. // CHECK:STDOUT: name_binding_decl {
  2083. // CHECK:STDOUT: %carbon_u32.patt: %pattern_type.4a9 = value_binding_pattern carbon_u32 [concrete]
  2084. // CHECK:STDOUT: }
  2085. // CHECK:STDOUT: %cpp_unsigned_long.ref.loc21: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
  2086. // CHECK:STDOUT: %.loc21_19: type = splice_block %u32 [concrete = constants.%u32] {
  2087. // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  2088. // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [concrete = constants.%u32]
  2089. // CHECK:STDOUT: }
  2090. // 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]
  2091. // CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %cpp_unsigned_long.ref.loc21, %impl.elem0.loc21
  2092. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc21: init %u32 = call %bound_method.loc21(%cpp_unsigned_long.ref.loc21)
  2093. // CHECK:STDOUT: %.loc21_25.1: %u32 = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc21
  2094. // CHECK:STDOUT: %.loc21_25.2: %u32 = converted %cpp_unsigned_long.ref.loc21, %.loc21_25.1
  2095. // CHECK:STDOUT: %carbon_u32: %u32 = value_binding carbon_u32, %.loc21_25.2
  2096. // CHECK:STDOUT: name_binding_decl {
  2097. // CHECK:STDOUT: %carbon_u32_result.patt: %pattern_type.dc7 = value_binding_pattern carbon_u32_result [concrete]
  2098. // CHECK:STDOUT: }
  2099. // CHECK:STDOUT: %Cpp.ref.loc22_43: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2100. // 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]
  2101. // CHECK:STDOUT: %carbon_u32.ref: %u32 = name_ref carbon_u32, %carbon_u32
  2102. // CHECK:STDOUT: %.loc22_67.1: ref %UIntResult = temporary_storage
  2103. // CHECK:STDOUT: %addr.loc22: %ptr.059 = addr_of %.loc22_67.1
  2104. // CHECK:STDOUT: %PassULong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassULong__carbon_thunk.decl.108234.2(%carbon_u32.ref, %addr.loc22)
  2105. // CHECK:STDOUT: %.loc22_67.2: init %UIntResult to %.loc22_67.1 = in_place_init %PassULong__carbon_thunk.call.loc22
  2106. // CHECK:STDOUT: %.loc22_29: type = splice_block %UIntResult.ref [concrete = constants.%UIntResult] {
  2107. // CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2108. // CHECK:STDOUT: %UIntResult.ref: type = name_ref UIntResult, imports.%UIntResult.decl [concrete = constants.%UIntResult]
  2109. // CHECK:STDOUT: }
  2110. // CHECK:STDOUT: %.loc22_67.3: ref %UIntResult = temporary %.loc22_67.1, %.loc22_67.2
  2111. // CHECK:STDOUT: %.loc22_67.4: %UIntResult = acquire_value %.loc22_67.3
  2112. // CHECK:STDOUT: %carbon_u32_result: %UIntResult = value_binding carbon_u32_result, %.loc22_67.4
  2113. // CHECK:STDOUT: name_binding_decl {
  2114. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  2115. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  2116. // CHECK:STDOUT: }
  2117. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  2118. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  2119. // CHECK:STDOUT: %.loc24_52.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  2120. // 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]
  2121. // 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]
  2122. // 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]
  2123. // CHECK:STDOUT: %bound_method.loc24_52.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
  2124. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_52.2(%float) [concrete = constants.%float.e3b]
  2125. // CHECK:STDOUT: %.loc24_52.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  2126. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  2127. // CHECK:STDOUT: %.loc24_52.3: ref %f32.97e = array_index %a.var, %int_0
  2128. // CHECK:STDOUT: %.loc24_52.4: init %f32.97e to %.loc24_52.3 = initialize_from %.loc24_52.2 [concrete = constants.%float.e3b]
  2129. // CHECK:STDOUT: %.loc24_52.5: init %array_type to %a.var = array_init (%.loc24_52.4) [concrete = constants.%array]
  2130. // CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_52.1, %.loc24_52.5 [concrete = constants.%array]
  2131. // CHECK:STDOUT: assign %a.var, %.loc24_3
  2132. // CHECK:STDOUT: %.loc24_43: type = splice_block %array_type [concrete = constants.%array_type] {
  2133. // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  2134. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  2135. // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  2136. // CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  2137. // CHECK:STDOUT: %unsigned_long.ref.loc24: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long]
  2138. // 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]
  2139. // 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]
  2140. // 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]
  2141. // CHECK:STDOUT: %.loc24_23.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.0ab]
  2142. // CHECK:STDOUT: %.loc24_23.2: %Cpp.unsigned_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.0ab]
  2143. // 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]
  2144. // 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]
  2145. // 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]
  2146. // CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
  2147. // CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
  2148. // CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
  2149. // CHECK:STDOUT: }
  2150. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  2151. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp.b0ebf8.1
  2152. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  2153. // CHECK:STDOUT: %UIntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_67.3, constants.%UIntResult.cpp_destructor
  2154. // CHECK:STDOUT: %UIntResult.cpp_destructor.call: init %empty_tuple.type = call %UIntResult.cpp_destructor.bound(%.loc22_67.3)
  2155. // CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_80.3, constants.%ULongResult.cpp_destructor
  2156. // CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc19(%.loc19_80.3)
  2157. // CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_82.3, constants.%ULongResult.cpp_destructor
  2158. // CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc16(%.loc16_82.3)
  2159. // CHECK:STDOUT: <elided>
  2160. // CHECK:STDOUT: }
  2161. // CHECK:STDOUT:
  2162. // CHECK:STDOUT: fn @DestroyOp.loc24(%self.param: %array_type) = "no_op";
  2163. // CHECK:STDOUT:
  2164. // CHECK:STDOUT: fn @DestroyOp.loc22(%self.param: %UIntResult) = "no_op";
  2165. // CHECK:STDOUT:
  2166. // CHECK:STDOUT: fn @DestroyOp.loc19(%self.param: %ULongResult) = "no_op";
  2167. // CHECK:STDOUT: