builtins.llp64.carbon 98 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019
  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. // --- unsigned_long.carbon
  54. library "[[@TEST_NAME]]";
  55. import Cpp inline
  56. '''
  57. class ULongResult {};
  58. auto PassULong(unsigned long x) -> ULongResult;
  59. class UIntResult {};
  60. auto PassULong(unsigned int x) -> UIntResult;
  61. ''';
  62. fn F() {
  63. //@dump-sem-ir-begin
  64. let cpp_unsigned_long: Cpp.unsigned_long = 1;
  65. let cpp_unsigned_long_result: Cpp.ULongResult = Cpp.PassULong(cpp_unsigned_long);
  66. let cpp_compat_ulong: Core.CppCompat.ULong32 = cpp_unsigned_long;
  67. let cpp_compat_ulong_result: Cpp.ULongResult = Cpp.PassULong(cpp_compat_ulong);
  68. let carbon_u32: u32 = cpp_unsigned_long;
  69. let carbon_u32_result: Cpp.UIntResult = Cpp.PassULong(carbon_u32);
  70. var a: array(f32, 1 as Cpp.unsigned_long) = (1.0,);
  71. //@dump-sem-ir-end
  72. }
  73. // CHECK:STDOUT: --- long_long.carbon
  74. // CHECK:STDOUT:
  75. // CHECK:STDOUT: constants {
  76. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  77. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
  78. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  79. // CHECK:STDOUT: %i64: type = class_type @Int, @Int(%int_64) [concrete]
  80. // CHECK:STDOUT: %pattern_type.95b: type = pattern_type %i64 [concrete]
  81. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  82. // CHECK:STDOUT: %ImplicitAs.type.2ad: type = facet_type <@ImplicitAs, @ImplicitAs(%i64)> [concrete]
  83. // CHECK:STDOUT: %ImplicitAs.Convert.type.94e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i64) [concrete]
  84. // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  85. // 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]
  86. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.3c2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.4e6 = struct_value () [symbolic]
  87. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  88. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  89. // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
  90. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.2ed: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%From) [symbolic]
  91. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.d29: %Int.as.ImplicitAs.impl.Convert.type.2ed = struct_value () [symbolic]
  92. // CHECK:STDOUT: %ImplicitAs.impl_witness.556: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.74f, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
  93. // 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]
  94. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b78 = struct_value () [concrete]
  95. // CHECK:STDOUT: %ImplicitAs.facet.d48: %ImplicitAs.type.2ad = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.556) [concrete]
  96. // CHECK:STDOUT: %.567: type = fn_type_with_self_type %ImplicitAs.Convert.type.94e, %ImplicitAs.facet.d48 [concrete]
  97. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.57d [concrete]
  98. // 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]
  99. // CHECK:STDOUT: %bound_method.288: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  100. // CHECK:STDOUT: %int_1.41a: %i64 = int_value 1 [concrete]
  101. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  102. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  103. // CHECK:STDOUT: %As.type.229: type = facet_type <@As, @As(%i64)> [concrete]
  104. // CHECK:STDOUT: %As.Convert.type.d57: type = fn_type @As.Convert, @As(%i64) [concrete]
  105. // 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]
  106. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.dbe: %Core.IntLiteral.as.As.impl.Convert.type.09e = struct_value () [symbolic]
  107. // CHECK:STDOUT: %As.impl_witness.c71: <witness> = impl_witness imports.%As.impl_witness_table.9fc, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  108. // 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]
  109. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.a54: %Core.IntLiteral.as.As.impl.Convert.type.cee = struct_value () [concrete]
  110. // CHECK:STDOUT: %As.facet: %As.type.229 = facet_value Core.IntLiteral, (%As.impl_witness.c71) [concrete]
  111. // CHECK:STDOUT: %.aba: type = fn_type_with_self_type %As.Convert.type.d57, %As.facet [concrete]
  112. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.a54 [concrete]
  113. // 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]
  114. // CHECK:STDOUT: %bound_method.41b: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  115. // CHECK:STDOUT: %ImplicitAs.impl_witness.e86: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.ea2, @Int.as.ImplicitAs.impl(%int_64) [concrete]
  116. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.type.ccf: type = fn_type @Int.as.ImplicitAs.impl.Convert, @Int.as.ImplicitAs.impl(%int_64) [concrete]
  117. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.535: %Int.as.ImplicitAs.impl.Convert.type.ccf = struct_value () [concrete]
  118. // CHECK:STDOUT: %ImplicitAs.facet.234: %ImplicitAs.type.139 = facet_value %i64, (%ImplicitAs.impl_witness.e86) [concrete]
  119. // CHECK:STDOUT: %.3aa: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.234 [concrete]
  120. // CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.535 [concrete]
  121. // 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]
  122. // CHECK:STDOUT: %bound_method.d1e: <bound method> = bound_method %int_1.41a, %Int.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  123. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  124. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  125. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  126. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  127. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  128. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  129. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  130. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  131. // 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]
  132. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  133. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  134. // 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]
  135. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  136. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  137. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  138. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  139. // 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]
  140. // CHECK:STDOUT: %bound_method.1e4: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  141. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  142. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  143. // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
  144. // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
  145. // CHECK:STDOUT: }
  146. // CHECK:STDOUT:
  147. // CHECK:STDOUT: imports {
  148. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  149. // CHECK:STDOUT: .long_long = @F.%i64.1
  150. // CHECK:STDOUT: import Cpp//...
  151. // CHECK:STDOUT: }
  152. // 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)]
  153. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.74f = impl_witness_table (%Core.import_ref.42d), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  154. // 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)]
  155. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.ea2 = impl_witness_table (%Core.import_ref.0bc), @Int.as.ImplicitAs.impl [concrete]
  156. // 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)]
  157. // CHECK:STDOUT: %As.impl_witness_table.9fc = impl_witness_table (%Core.import_ref.ca0), @Core.IntLiteral.as.As.impl [concrete]
  158. // 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)]
  159. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  160. // CHECK:STDOUT: }
  161. // CHECK:STDOUT:
  162. // CHECK:STDOUT: fn @F() {
  163. // CHECK:STDOUT: !entry:
  164. // CHECK:STDOUT: name_binding_decl {
  165. // CHECK:STDOUT: %cpp_long_long.patt: %pattern_type.95b = value_binding_pattern cpp_long_long [concrete]
  166. // CHECK:STDOUT: }
  167. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  168. // CHECK:STDOUT: %.loc8_25: type = splice_block %long_long.ref.loc8 [concrete = constants.%i64] {
  169. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  170. // CHECK:STDOUT: <elided>
  171. // CHECK:STDOUT: %long_long.ref.loc8: type = name_ref long_long, %i64.1 [concrete = constants.%i64]
  172. // CHECK:STDOUT: }
  173. // CHECK:STDOUT: %impl.elem0.loc8: %.567 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
  174. // 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]
  175. // 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]
  176. // CHECK:STDOUT: %bound_method.loc8_38.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.288]
  177. // 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]
  178. // CHECK:STDOUT: %.loc8_38.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.41a]
  179. // CHECK:STDOUT: %.loc8_38.2: %i64 = converted %int_1.loc8, %.loc8_38.1 [concrete = constants.%int_1.41a]
  180. // CHECK:STDOUT: %cpp_long_long: %i64 = value_binding cpp_long_long, %.loc8_38.2
  181. // CHECK:STDOUT: name_binding_decl {
  182. // CHECK:STDOUT: %carbon_long_long.patt: %pattern_type.95b = value_binding_pattern carbon_long_long [concrete]
  183. // CHECK:STDOUT: }
  184. // CHECK:STDOUT: %cpp_long_long.ref: %i64 = name_ref cpp_long_long, %cpp_long_long
  185. // CHECK:STDOUT: %.loc9: type = splice_block %i64.loc9 [concrete = constants.%i64] {
  186. // CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  187. // CHECK:STDOUT: %i64.loc9: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
  188. // CHECK:STDOUT: }
  189. // CHECK:STDOUT: %carbon_long_long: %i64 = value_binding carbon_long_long, %cpp_long_long.ref
  190. // CHECK:STDOUT: name_binding_decl {
  191. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  192. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  193. // CHECK:STDOUT: }
  194. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  195. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  196. // CHECK:STDOUT: %.loc11_48.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  197. // 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]
  198. // 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]
  199. // 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]
  200. // CHECK:STDOUT: %bound_method.loc11_48.2: <bound method> = bound_method %float, %specific_fn.loc11_48 [concrete = constants.%bound_method.1e4]
  201. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_48.2(%float) [concrete = constants.%float.e3b]
  202. // CHECK:STDOUT: %.loc11_48.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  203. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  204. // CHECK:STDOUT: %.loc11_48.3: ref %f32.97e = array_index %a.var, %int_0
  205. // CHECK:STDOUT: %.loc11_48.4: init %f32.97e = initialize_from %.loc11_48.2 to %.loc11_48.3 [concrete = constants.%float.e3b]
  206. // CHECK:STDOUT: %.loc11_48.5: init %array_type = array_init (%.loc11_48.4) to %a.var [concrete = constants.%array]
  207. // CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_48.1, %.loc11_48.5 [concrete = constants.%array]
  208. // CHECK:STDOUT: assign %a.var, %.loc11_3
  209. // CHECK:STDOUT: %.loc11_39: type = splice_block %array_type [concrete = constants.%array_type] {
  210. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  211. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  212. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  213. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  214. // CHECK:STDOUT: %long_long.ref.loc11: type = name_ref long_long, %i64.1 [concrete = constants.%i64]
  215. // 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]
  216. // 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]
  217. // 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]
  218. // CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.41b]
  219. // 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]
  220. // CHECK:STDOUT: %.loc11_23.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
  221. // CHECK:STDOUT: %.loc11_23.2: %i64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.41a]
  222. // 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]
  223. // 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]
  224. // 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]
  225. // CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.d1e]
  226. // 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]
  227. // CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
  228. // CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
  229. // CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
  230. // CHECK:STDOUT: }
  231. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  232. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
  233. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  234. // CHECK:STDOUT: <elided>
  235. // CHECK:STDOUT: }
  236. // CHECK:STDOUT:
  237. // CHECK:STDOUT: fn @DestroyOp(%self.param: %array_type) = "no_op";
  238. // CHECK:STDOUT:
  239. // CHECK:STDOUT: --- unsigned_long_long.carbon
  240. // CHECK:STDOUT:
  241. // CHECK:STDOUT: constants {
  242. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  243. // CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete]
  244. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  245. // CHECK:STDOUT: %u64: type = class_type @UInt, @UInt(%int_64) [concrete]
  246. // CHECK:STDOUT: %pattern_type.157: type = pattern_type %u64 [concrete]
  247. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  248. // CHECK:STDOUT: %ImplicitAs.type.584: type = facet_type <@ImplicitAs, @ImplicitAs(%u64)> [concrete]
  249. // CHECK:STDOUT: %ImplicitAs.Convert.type.c65: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u64) [concrete]
  250. // CHECK:STDOUT: %To.fe9: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
  251. // 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]
  252. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.46e: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.6a6 = struct_value () [symbolic]
  253. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  254. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  255. // CHECK:STDOUT: %From: Core.IntLiteral = symbolic_binding From, 0 [symbolic]
  256. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.7f8: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%From) [symbolic]
  257. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.0ea: %UInt.as.ImplicitAs.impl.Convert.type.7f8 = struct_value () [symbolic]
  258. // CHECK:STDOUT: %ImplicitAs.impl_witness.bb3: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.899, @Core.IntLiteral.as.ImplicitAs.impl(%int_64) [concrete]
  259. // 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]
  260. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.042: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.fb8 = struct_value () [concrete]
  261. // CHECK:STDOUT: %ImplicitAs.facet.dfe: %ImplicitAs.type.584 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.bb3) [concrete]
  262. // CHECK:STDOUT: %.da7: type = fn_type_with_self_type %ImplicitAs.Convert.type.c65, %ImplicitAs.facet.dfe [concrete]
  263. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.042 [concrete]
  264. // 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]
  265. // CHECK:STDOUT: %bound_method.fec: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  266. // CHECK:STDOUT: %int_1.f23: %u64 = int_value 1 [concrete]
  267. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  268. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  269. // CHECK:STDOUT: %As.type.f20: type = facet_type <@As, @As(%u64)> [concrete]
  270. // CHECK:STDOUT: %As.Convert.type.7eb: type = fn_type @As.Convert, @As(%u64) [concrete]
  271. // 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]
  272. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.979: %Core.IntLiteral.as.As.impl.Convert.type.2b1 = struct_value () [symbolic]
  273. // CHECK:STDOUT: %As.impl_witness.f54: <witness> = impl_witness imports.%As.impl_witness_table.7eb, @Core.IntLiteral.as.As.impl(%int_64) [concrete]
  274. // 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]
  275. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.715: %Core.IntLiteral.as.As.impl.Convert.type.0f2 = struct_value () [concrete]
  276. // CHECK:STDOUT: %As.facet: %As.type.f20 = facet_value Core.IntLiteral, (%As.impl_witness.f54) [concrete]
  277. // CHECK:STDOUT: %.11a: type = fn_type_with_self_type %As.Convert.type.7eb, %As.facet [concrete]
  278. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.715 [concrete]
  279. // 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]
  280. // CHECK:STDOUT: %bound_method.9cf: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert.specific_fn [concrete]
  281. // CHECK:STDOUT: %ImplicitAs.impl_witness.2cc: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.493, @UInt.as.ImplicitAs.impl(%int_64) [concrete]
  282. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.type.812: type = fn_type @UInt.as.ImplicitAs.impl.Convert, @UInt.as.ImplicitAs.impl(%int_64) [concrete]
  283. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.309: %UInt.as.ImplicitAs.impl.Convert.type.812 = struct_value () [concrete]
  284. // CHECK:STDOUT: %ImplicitAs.facet.02d: %ImplicitAs.type.139 = facet_value %u64, (%ImplicitAs.impl_witness.2cc) [concrete]
  285. // CHECK:STDOUT: %.a1c: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.02d [concrete]
  286. // CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.309 [concrete]
  287. // 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]
  288. // CHECK:STDOUT: %bound_method.f18: <bound method> = bound_method %int_1.f23, %UInt.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  289. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  290. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  291. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  292. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  293. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  294. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  295. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  296. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  297. // 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]
  298. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  299. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  300. // 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]
  301. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  302. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  303. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  304. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  305. // 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]
  306. // CHECK:STDOUT: %bound_method.1e4: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  307. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  308. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  309. // CHECK:STDOUT: %DestroyOp.type: type = fn_type @DestroyOp [concrete]
  310. // CHECK:STDOUT: %DestroyOp: %DestroyOp.type = struct_value () [concrete]
  311. // CHECK:STDOUT: }
  312. // CHECK:STDOUT:
  313. // CHECK:STDOUT: imports {
  314. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  315. // CHECK:STDOUT: .unsigned_long_long = @F.%u64.1
  316. // CHECK:STDOUT: import Cpp//...
  317. // CHECK:STDOUT: }
  318. // 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)]
  319. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.899 = impl_witness_table (%Core.import_ref.741), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
  320. // 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)]
  321. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.493 = impl_witness_table (%Core.import_ref.483), @UInt.as.ImplicitAs.impl [concrete]
  322. // 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)]
  323. // CHECK:STDOUT: %As.impl_witness_table.7eb = impl_witness_table (%Core.import_ref.600), @Core.IntLiteral.as.As.impl [concrete]
  324. // 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)]
  325. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  326. // CHECK:STDOUT: }
  327. // CHECK:STDOUT:
  328. // CHECK:STDOUT: fn @F() {
  329. // CHECK:STDOUT: !entry:
  330. // CHECK:STDOUT: name_binding_decl {
  331. // CHECK:STDOUT: %cpp_unsigned_long_long.patt: %pattern_type.157 = value_binding_pattern cpp_unsigned_long_long [concrete]
  332. // CHECK:STDOUT: }
  333. // CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  334. // CHECK:STDOUT: %.loc8_34: type = splice_block %unsigned_long_long.ref.loc8 [concrete = constants.%u64] {
  335. // CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  336. // CHECK:STDOUT: <elided>
  337. // CHECK:STDOUT: %unsigned_long_long.ref.loc8: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64]
  338. // CHECK:STDOUT: }
  339. // CHECK:STDOUT: %impl.elem0.loc8: %.da7 = impl_witness_access constants.%ImplicitAs.impl_witness.bb3, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.042]
  340. // 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]
  341. // 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]
  342. // CHECK:STDOUT: %bound_method.loc8_56.2: <bound method> = bound_method %int_1.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.fec]
  343. // 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]
  344. // CHECK:STDOUT: %.loc8_56.1: %u64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.f23]
  345. // CHECK:STDOUT: %.loc8_56.2: %u64 = converted %int_1.loc8, %.loc8_56.1 [concrete = constants.%int_1.f23]
  346. // CHECK:STDOUT: %cpp_unsigned_long_long: %u64 = value_binding cpp_unsigned_long_long, %.loc8_56.2
  347. // CHECK:STDOUT: name_binding_decl {
  348. // CHECK:STDOUT: %carbon_unsigned_long_long.patt: %pattern_type.157 = value_binding_pattern carbon_unsigned_long_long [concrete]
  349. // CHECK:STDOUT: }
  350. // CHECK:STDOUT: %cpp_unsigned_long_long.ref: %u64 = name_ref cpp_unsigned_long_long, %cpp_unsigned_long_long
  351. // CHECK:STDOUT: %.loc9: type = splice_block %u64.loc9 [concrete = constants.%u64] {
  352. // CHECK:STDOUT: %int_64.loc9: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
  353. // CHECK:STDOUT: %u64.loc9: type = class_type @UInt, @UInt(constants.%int_64) [concrete = constants.%u64]
  354. // CHECK:STDOUT: }
  355. // CHECK:STDOUT: %carbon_unsigned_long_long: %u64 = value_binding carbon_unsigned_long_long, %cpp_unsigned_long_long.ref
  356. // CHECK:STDOUT: name_binding_decl {
  357. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  358. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  359. // CHECK:STDOUT: }
  360. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  361. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  362. // CHECK:STDOUT: %.loc11_57.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  363. // 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]
  364. // 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]
  365. // 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]
  366. // CHECK:STDOUT: %bound_method.loc11_57.2: <bound method> = bound_method %float, %specific_fn.loc11_57 [concrete = constants.%bound_method.1e4]
  367. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_57.2(%float) [concrete = constants.%float.e3b]
  368. // CHECK:STDOUT: %.loc11_57.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  369. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  370. // CHECK:STDOUT: %.loc11_57.3: ref %f32.97e = array_index %a.var, %int_0
  371. // CHECK:STDOUT: %.loc11_57.4: init %f32.97e = initialize_from %.loc11_57.2 to %.loc11_57.3 [concrete = constants.%float.e3b]
  372. // CHECK:STDOUT: %.loc11_57.5: init %array_type = array_init (%.loc11_57.4) to %a.var [concrete = constants.%array]
  373. // CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_57.1, %.loc11_57.5 [concrete = constants.%array]
  374. // CHECK:STDOUT: assign %a.var, %.loc11_3
  375. // CHECK:STDOUT: %.loc11_48: type = splice_block %array_type [concrete = constants.%array_type] {
  376. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  377. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  378. // CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  379. // CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  380. // CHECK:STDOUT: %unsigned_long_long.ref.loc11: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64]
  381. // 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]
  382. // 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]
  383. // 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]
  384. // CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.9cf]
  385. // 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]
  386. // CHECK:STDOUT: %.loc11_23.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
  387. // CHECK:STDOUT: %.loc11_23.2: %u64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.f23]
  388. // 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]
  389. // 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]
  390. // 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]
  391. // CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.f18]
  392. // 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]
  393. // CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
  394. // CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
  395. // CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
  396. // CHECK:STDOUT: }
  397. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  398. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
  399. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  400. // CHECK:STDOUT: <elided>
  401. // CHECK:STDOUT: }
  402. // CHECK:STDOUT:
  403. // CHECK:STDOUT: fn @DestroyOp(%self.param: %array_type) = "no_op";
  404. // CHECK:STDOUT:
  405. // CHECK:STDOUT: --- long.carbon
  406. // CHECK:STDOUT:
  407. // CHECK:STDOUT: constants {
  408. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  409. // CHECK:STDOUT: %Cpp.long: type = class_type @Long32 [concrete]
  410. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  411. // CHECK:STDOUT: %Int.type: type = generic_class_type @Int [concrete]
  412. // CHECK:STDOUT: %Int.generic: %Int.type = struct_value () [concrete]
  413. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  414. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  415. // CHECK:STDOUT: %pattern_type.68c: type = pattern_type %Cpp.long [concrete]
  416. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  417. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  418. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  419. // CHECK:STDOUT: %ImplicitAs.type.819: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.long)> [concrete]
  420. // CHECK:STDOUT: %ImplicitAs.Convert.type.4c2: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.long) [concrete]
  421. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  422. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  423. // CHECK:STDOUT: %ImplicitAs.type.e8c: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  424. // CHECK:STDOUT: %ImplicitAs.Convert.type.1b6: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%i32) [concrete]
  425. // CHECK:STDOUT: %ImplicitAs.impl_witness.2ce: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.903 [concrete]
  426. // CHECK:STDOUT: %ImplicitAs.facet.eed: %ImplicitAs.type.819 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.2ce) [concrete]
  427. // CHECK:STDOUT: %.dad: type = fn_type_with_self_type %ImplicitAs.Convert.type.4c2, %ImplicitAs.facet.eed [concrete]
  428. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete]
  429. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.b38 = struct_value () [concrete]
  430. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a [concrete]
  431. // CHECK:STDOUT: %int_1.5a4: %Cpp.long = int_value 1 [concrete]
  432. // CHECK:STDOUT: %LongResult: type = class_type @LongResult [concrete]
  433. // CHECK:STDOUT: %pattern_type.cd9: type = pattern_type %LongResult [concrete]
  434. // CHECK:STDOUT: %PassLong.cpp_overload_set.type: type = cpp_overload_set_type @PassLong.cpp_overload_set [concrete]
  435. // CHECK:STDOUT: %PassLong.cpp_overload_set.value: %PassLong.cpp_overload_set.type = cpp_overload_set_value @PassLong.cpp_overload_set [concrete]
  436. // CHECK:STDOUT: %ptr.305: type = ptr_type %LongResult [concrete]
  437. // CHECK:STDOUT: %PassLong__carbon_thunk.type.9d9430.1: type = fn_type @PassLong__carbon_thunk.1 [concrete]
  438. // CHECK:STDOUT: %PassLong__carbon_thunk.58a8f3.1: %PassLong__carbon_thunk.type.9d9430.1 = struct_value () [concrete]
  439. // CHECK:STDOUT: %pattern_type.7ce: type = pattern_type %i32 [concrete]
  440. // CHECK:STDOUT: %ImplicitAs.impl_witness.925: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.c80 [concrete]
  441. // CHECK:STDOUT: %ImplicitAs.facet.96f: %ImplicitAs.type.e8c = facet_value %Cpp.long, (%ImplicitAs.impl_witness.925) [concrete]
  442. // CHECK:STDOUT: %.79c: type = fn_type_with_self_type %ImplicitAs.Convert.type.1b6, %ImplicitAs.facet.96f [concrete]
  443. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.796: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.1 [concrete]
  444. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.3eb: %Cpp.long.as.ImplicitAs.impl.Convert.type.796 = struct_value () [concrete]
  445. // CHECK:STDOUT: %IntResult: type = class_type @IntResult [concrete]
  446. // CHECK:STDOUT: %pattern_type.454: type = pattern_type %IntResult [concrete]
  447. // CHECK:STDOUT: %ptr.3cb: type = ptr_type %IntResult [concrete]
  448. // CHECK:STDOUT: %PassLong__carbon_thunk.type.9d9430.2: type = fn_type @PassLong__carbon_thunk.2 [concrete]
  449. // CHECK:STDOUT: %PassLong__carbon_thunk.58a8f3.2: %PassLong__carbon_thunk.type.9d9430.2 = struct_value () [concrete]
  450. // CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
  451. // CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
  452. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  453. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  454. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  455. // CHECK:STDOUT: %As.type.508: type = facet_type <@As, @As(%Cpp.long)> [concrete]
  456. // CHECK:STDOUT: %As.Convert.type.229: type = fn_type @As.Convert, @As(%Cpp.long) [concrete]
  457. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness imports.%As.impl_witness_table [concrete]
  458. // CHECK:STDOUT: %As.facet: %As.type.508 = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
  459. // CHECK:STDOUT: %.040: type = fn_type_with_self_type %As.Convert.type.229, %As.facet [concrete]
  460. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
  461. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
  462. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete]
  463. // CHECK:STDOUT: %ImplicitAs.impl_witness.e4d: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.a09 [concrete]
  464. // CHECK:STDOUT: %ImplicitAs.facet.772: %ImplicitAs.type.139 = facet_value %Cpp.long, (%ImplicitAs.impl_witness.e4d) [concrete]
  465. // CHECK:STDOUT: %.8e3: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.772 [concrete]
  466. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.type.9ed: type = fn_type @Cpp.long.as.ImplicitAs.impl.Convert.2 [concrete]
  467. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.d49: %Cpp.long.as.ImplicitAs.impl.Convert.type.9ed = struct_value () [concrete]
  468. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5a4, %Cpp.long.as.ImplicitAs.impl.Convert.d49 [concrete]
  469. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  470. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  471. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  472. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  473. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  474. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  475. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  476. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  477. // 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]
  478. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  479. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  480. // 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]
  481. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  482. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  483. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  484. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  485. // 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]
  486. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  487. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  488. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  489. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  490. // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc24 [concrete]
  491. // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete]
  492. // CHECK:STDOUT: %IntResult.cpp_destructor.type: type = fn_type @IntResult.cpp_destructor [concrete]
  493. // CHECK:STDOUT: %IntResult.cpp_destructor: %IntResult.cpp_destructor.type = struct_value () [concrete]
  494. // CHECK:STDOUT: %LongResult.cpp_destructor.type: type = fn_type @LongResult.cpp_destructor [concrete]
  495. // CHECK:STDOUT: %LongResult.cpp_destructor: %LongResult.cpp_destructor.type = struct_value () [concrete]
  496. // CHECK:STDOUT: }
  497. // CHECK:STDOUT:
  498. // CHECK:STDOUT: imports {
  499. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  500. // CHECK:STDOUT: .CppCompat = %CppCompat.4b4
  501. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  502. // CHECK:STDOUT: .Int = %Core.Int
  503. // CHECK:STDOUT: .Float = %Core.Float
  504. // CHECK:STDOUT: .As = %Core.As
  505. // CHECK:STDOUT: .Destroy = %Core.Destroy
  506. // CHECK:STDOUT: import Core//prelude
  507. // CHECK:STDOUT: import Core//prelude/...
  508. // CHECK:STDOUT: }
  509. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  510. // CHECK:STDOUT: .long = constants.%Cpp.long
  511. // CHECK:STDOUT: .LongResult = %LongResult.decl
  512. // CHECK:STDOUT: .PassLong = %PassLong.cpp_overload_set.value
  513. // CHECK:STDOUT: .IntResult = %IntResult.decl
  514. // CHECK:STDOUT: import Cpp//...
  515. // CHECK:STDOUT: }
  516. // CHECK:STDOUT: %Core.CppCompat: <namespace> = import_ref Core//prelude, CppCompat, loaded
  517. // CHECK:STDOUT: %CppCompat.4b4: <namespace> = namespace %Core.CppCompat, [concrete] {
  518. // CHECK:STDOUT: .Long32 = %Core.Long32
  519. // CHECK:STDOUT: import Core//prelude
  520. // CHECK:STDOUT: import Core//prelude/...
  521. // CHECK:STDOUT: }
  522. // CHECK:STDOUT: %Core.Long32: type = import_ref Core//prelude/types/cpp/int, Long32, loaded [concrete = constants.%Cpp.long]
  523. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  524. // 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]
  525. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.903 = impl_witness_table (%Core.import_ref.b8a), @Core.IntLiteral.as.ImplicitAs.impl.052 [concrete]
  526. // CHECK:STDOUT: %LongResult.decl: type = class_decl @LongResult [concrete = constants.%LongResult] {} {}
  527. // 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]
  528. // 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] {
  529. // CHECK:STDOUT: <elided>
  530. // CHECK:STDOUT: } {
  531. // CHECK:STDOUT: <elided>
  532. // CHECK:STDOUT: }
  533. // CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
  534. // 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]
  535. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.c80 = impl_witness_table (%Core.import_ref.946), @Cpp.long.as.ImplicitAs.impl.9f8 [concrete]
  536. // CHECK:STDOUT: %IntResult.decl: type = class_decl @IntResult [concrete = constants.%IntResult] {} {}
  537. // 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] {
  538. // CHECK:STDOUT: <elided>
  539. // CHECK:STDOUT: } {
  540. // CHECK:STDOUT: <elided>
  541. // CHECK:STDOUT: }
  542. // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types/float, Float, loaded [concrete = constants.%Float.generic]
  543. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
  544. // 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]
  545. // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.import_ref.686), @Core.IntLiteral.as.As.impl.a00 [concrete]
  546. // 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]
  547. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.a09 = impl_witness_table (%Core.import_ref.168), @Cpp.long.as.ImplicitAs.impl.e94 [concrete]
  548. // 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)]
  549. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  550. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  551. // CHECK:STDOUT: }
  552. // CHECK:STDOUT:
  553. // CHECK:STDOUT: fn @F() {
  554. // CHECK:STDOUT: !entry:
  555. // CHECK:STDOUT: name_binding_decl {
  556. // CHECK:STDOUT: %cpp_long.patt: %pattern_type.68c = value_binding_pattern cpp_long [concrete]
  557. // CHECK:STDOUT: }
  558. // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  559. // CHECK:STDOUT: %.loc15_20: type = splice_block %long.ref.loc15 [concrete = constants.%Cpp.long] {
  560. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  561. // CHECK:STDOUT: %long.ref.loc15: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  562. // CHECK:STDOUT: }
  563. // CHECK:STDOUT: %impl.elem0.loc15: %.dad = impl_witness_access constants.%ImplicitAs.impl_witness.2ce, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f2a]
  564. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  565. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %Cpp.long = call %bound_method.loc15(%int_1.loc15) [concrete = constants.%int_1.5a4]
  566. // CHECK:STDOUT: %.loc15_28.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5a4]
  567. // CHECK:STDOUT: %.loc15_28.2: %Cpp.long = converted %int_1.loc15, %.loc15_28.1 [concrete = constants.%int_1.5a4]
  568. // CHECK:STDOUT: %cpp_long: %Cpp.long = value_binding cpp_long, %.loc15_28.2
  569. // CHECK:STDOUT: name_binding_decl {
  570. // CHECK:STDOUT: %cpp_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_long_result [concrete]
  571. // CHECK:STDOUT: }
  572. // CHECK:STDOUT: %Cpp.ref.loc16_41: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  573. // 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]
  574. // CHECK:STDOUT: %cpp_long.ref.loc16: %Cpp.long = name_ref cpp_long, %cpp_long
  575. // CHECK:STDOUT: %.loc16_62.1: ref %LongResult = temporary_storage
  576. // CHECK:STDOUT: %addr.loc16: %ptr.305 = addr_of %.loc16_62.1
  577. // 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)
  578. // CHECK:STDOUT: %.loc16_62.2: init %LongResult = in_place_init %PassLong__carbon_thunk.call.loc16, %.loc16_62.1
  579. // CHECK:STDOUT: %.loc16_27: type = splice_block %LongResult.ref.loc16 [concrete = constants.%LongResult] {
  580. // CHECK:STDOUT: %Cpp.ref.loc16_24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  581. // CHECK:STDOUT: %LongResult.ref.loc16: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
  582. // CHECK:STDOUT: }
  583. // CHECK:STDOUT: %.loc16_62.3: ref %LongResult = temporary %.loc16_62.1, %.loc16_62.2
  584. // CHECK:STDOUT: %.loc16_62.4: %LongResult = acquire_value %.loc16_62.3
  585. // CHECK:STDOUT: %cpp_long_result: %LongResult = value_binding cpp_long_result, %.loc16_62.4
  586. // CHECK:STDOUT: name_binding_decl {
  587. // CHECK:STDOUT: %cpp_compat_long.patt: %pattern_type.68c = value_binding_pattern cpp_compat_long [concrete]
  588. // CHECK:STDOUT: }
  589. // CHECK:STDOUT: %cpp_long.ref.loc18: %Cpp.long = name_ref cpp_long, %cpp_long
  590. // CHECK:STDOUT: %.loc18: type = splice_block %Long32.ref [concrete = constants.%Cpp.long] {
  591. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  592. // CHECK:STDOUT: %CppCompat.ref: <namespace> = name_ref CppCompat, imports.%CppCompat.4b4 [concrete = imports.%CppCompat.4b4]
  593. // CHECK:STDOUT: %Long32.ref: type = name_ref Long32, imports.%Core.Long32 [concrete = constants.%Cpp.long]
  594. // CHECK:STDOUT: }
  595. // CHECK:STDOUT: %cpp_compat_long: %Cpp.long = value_binding cpp_compat_long, %cpp_long.ref.loc18
  596. // CHECK:STDOUT: name_binding_decl {
  597. // CHECK:STDOUT: %cpp_compat_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_compat_long_result [concrete]
  598. // CHECK:STDOUT: }
  599. // CHECK:STDOUT: %Cpp.ref.loc19_48: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  600. // 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]
  601. // CHECK:STDOUT: %cpp_compat_long.ref: %Cpp.long = name_ref cpp_compat_long, %cpp_compat_long
  602. // CHECK:STDOUT: %.loc19_76.1: ref %LongResult = temporary_storage
  603. // CHECK:STDOUT: %addr.loc19: %ptr.305 = addr_of %.loc19_76.1
  604. // 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)
  605. // CHECK:STDOUT: %.loc19_76.2: init %LongResult = in_place_init %PassLong__carbon_thunk.call.loc19, %.loc19_76.1
  606. // CHECK:STDOUT: %.loc19_34: type = splice_block %LongResult.ref.loc19 [concrete = constants.%LongResult] {
  607. // CHECK:STDOUT: %Cpp.ref.loc19_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  608. // CHECK:STDOUT: %LongResult.ref.loc19: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
  609. // CHECK:STDOUT: }
  610. // CHECK:STDOUT: %.loc19_76.3: ref %LongResult = temporary %.loc19_76.1, %.loc19_76.2
  611. // CHECK:STDOUT: %.loc19_76.4: %LongResult = acquire_value %.loc19_76.3
  612. // CHECK:STDOUT: %cpp_compat_long_result: %LongResult = value_binding cpp_compat_long_result, %.loc19_76.4
  613. // CHECK:STDOUT: name_binding_decl {
  614. // CHECK:STDOUT: %carbon_i32.patt: %pattern_type.7ce = value_binding_pattern carbon_i32 [concrete]
  615. // CHECK:STDOUT: }
  616. // CHECK:STDOUT: %cpp_long.ref.loc21: %Cpp.long = name_ref cpp_long, %cpp_long
  617. // CHECK:STDOUT: %.loc21_19: type = splice_block %i32 [concrete = constants.%i32] {
  618. // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  619. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  620. // CHECK:STDOUT: }
  621. // CHECK:STDOUT: %impl.elem0.loc21: %.79c = impl_witness_access constants.%ImplicitAs.impl_witness.925, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.3eb]
  622. // CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %cpp_long.ref.loc21, %impl.elem0.loc21
  623. // CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc21: init %i32 = call %bound_method.loc21(%cpp_long.ref.loc21)
  624. // CHECK:STDOUT: %.loc21_25.1: %i32 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc21
  625. // CHECK:STDOUT: %.loc21_25.2: %i32 = converted %cpp_long.ref.loc21, %.loc21_25.1
  626. // CHECK:STDOUT: %carbon_i32: %i32 = value_binding carbon_i32, %.loc21_25.2
  627. // CHECK:STDOUT: name_binding_decl {
  628. // CHECK:STDOUT: %carbon_i32_result.patt: %pattern_type.454 = value_binding_pattern carbon_i32_result [concrete]
  629. // CHECK:STDOUT: }
  630. // CHECK:STDOUT: %Cpp.ref.loc22_42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  631. // 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]
  632. // CHECK:STDOUT: %carbon_i32.ref: %i32 = name_ref carbon_i32, %carbon_i32
  633. // CHECK:STDOUT: %.loc22_65.1: ref %IntResult = temporary_storage
  634. // CHECK:STDOUT: %addr.loc22: %ptr.3cb = addr_of %.loc22_65.1
  635. // CHECK:STDOUT: %PassLong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.2(%carbon_i32.ref, %addr.loc22)
  636. // CHECK:STDOUT: %.loc22_65.2: init %IntResult = in_place_init %PassLong__carbon_thunk.call.loc22, %.loc22_65.1
  637. // CHECK:STDOUT: %.loc22_29: type = splice_block %IntResult.ref [concrete = constants.%IntResult] {
  638. // CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  639. // CHECK:STDOUT: %IntResult.ref: type = name_ref IntResult, imports.%IntResult.decl [concrete = constants.%IntResult]
  640. // CHECK:STDOUT: }
  641. // CHECK:STDOUT: %.loc22_65.3: ref %IntResult = temporary %.loc22_65.1, %.loc22_65.2
  642. // CHECK:STDOUT: %.loc22_65.4: %IntResult = acquire_value %.loc22_65.3
  643. // CHECK:STDOUT: %carbon_i32_result: %IntResult = value_binding carbon_i32_result, %.loc22_65.4
  644. // CHECK:STDOUT: name_binding_decl {
  645. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  646. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  647. // CHECK:STDOUT: }
  648. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  649. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  650. // CHECK:STDOUT: %.loc24_43.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  651. // 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]
  652. // 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]
  653. // 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]
  654. // CHECK:STDOUT: %bound_method.loc24_43.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
  655. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_43.2(%float) [concrete = constants.%float.e3b]
  656. // CHECK:STDOUT: %.loc24_43.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  657. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  658. // CHECK:STDOUT: %.loc24_43.3: ref %f32.97e = array_index %a.var, %int_0
  659. // CHECK:STDOUT: %.loc24_43.4: init %f32.97e = initialize_from %.loc24_43.2 to %.loc24_43.3 [concrete = constants.%float.e3b]
  660. // CHECK:STDOUT: %.loc24_43.5: init %array_type = array_init (%.loc24_43.4) to %a.var [concrete = constants.%array]
  661. // CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_43.1, %.loc24_43.5 [concrete = constants.%array]
  662. // CHECK:STDOUT: assign %a.var, %.loc24_3
  663. // CHECK:STDOUT: %.loc24_34: type = splice_block %array_type [concrete = constants.%array_type] {
  664. // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  665. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  666. // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  667. // CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  668. // CHECK:STDOUT: %long.ref.loc24: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
  669. // CHECK:STDOUT: %impl.elem0.loc24_23.1: %.040 = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  670. // 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]
  671. // 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]
  672. // CHECK:STDOUT: %.loc24_23.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5a4]
  673. // CHECK:STDOUT: %.loc24_23.2: %Cpp.long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.5a4]
  674. // 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]
  675. // 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]
  676. // 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]
  677. // CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
  678. // CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
  679. // CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
  680. // CHECK:STDOUT: }
  681. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  682. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp.b0ebf8.1
  683. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  684. // CHECK:STDOUT: %IntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_65.3, constants.%IntResult.cpp_destructor
  685. // CHECK:STDOUT: %IntResult.cpp_destructor.call: init %empty_tuple.type = call %IntResult.cpp_destructor.bound(%.loc22_65.3)
  686. // CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_76.3, constants.%LongResult.cpp_destructor
  687. // CHECK:STDOUT: %LongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc19(%.loc19_76.3)
  688. // CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_62.3, constants.%LongResult.cpp_destructor
  689. // CHECK:STDOUT: %LongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc16(%.loc16_62.3)
  690. // CHECK:STDOUT: <elided>
  691. // CHECK:STDOUT: }
  692. // CHECK:STDOUT:
  693. // CHECK:STDOUT: fn @DestroyOp.loc24(%self.param: %array_type) = "no_op";
  694. // CHECK:STDOUT:
  695. // CHECK:STDOUT: fn @DestroyOp.loc22(%self.param: %IntResult) = "no_op";
  696. // CHECK:STDOUT:
  697. // CHECK:STDOUT: fn @DestroyOp.loc19(%self.param: %LongResult) = "no_op";
  698. // CHECK:STDOUT:
  699. // CHECK:STDOUT: --- unsigned_long.carbon
  700. // CHECK:STDOUT:
  701. // CHECK:STDOUT: constants {
  702. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  703. // CHECK:STDOUT: %Cpp.unsigned_long: type = class_type @ULong32 [concrete]
  704. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  705. // CHECK:STDOUT: %UInt.type: type = generic_class_type @UInt [concrete]
  706. // CHECK:STDOUT: %UInt.generic: %UInt.type = struct_value () [concrete]
  707. // CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
  708. // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(%int_32) [concrete]
  709. // CHECK:STDOUT: %pattern_type.5b7: type = pattern_type %Cpp.unsigned_long [concrete]
  710. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  711. // CHECK:STDOUT: %ImplicitAs.type.cc7: type = generic_interface_type @ImplicitAs [concrete]
  712. // CHECK:STDOUT: %ImplicitAs.generic: %ImplicitAs.type.cc7 = struct_value () [concrete]
  713. // CHECK:STDOUT: %ImplicitAs.type.3c3: type = facet_type <@ImplicitAs, @ImplicitAs(%Cpp.unsigned_long)> [concrete]
  714. // CHECK:STDOUT: %ImplicitAs.Convert.type.691: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%Cpp.unsigned_long) [concrete]
  715. // CHECK:STDOUT: %ImplicitAs.type.139: type = facet_type <@ImplicitAs, @ImplicitAs(Core.IntLiteral)> [concrete]
  716. // CHECK:STDOUT: %ImplicitAs.Convert.type.71e: type = fn_type @ImplicitAs.Convert, @ImplicitAs(Core.IntLiteral) [concrete]
  717. // CHECK:STDOUT: %ImplicitAs.type.146: type = facet_type <@ImplicitAs, @ImplicitAs(%u32)> [concrete]
  718. // CHECK:STDOUT: %ImplicitAs.Convert.type.92a: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%u32) [concrete]
  719. // CHECK:STDOUT: %ImplicitAs.impl_witness.a19: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.5b5 [concrete]
  720. // CHECK:STDOUT: %ImplicitAs.facet.66c: %ImplicitAs.type.3c3 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.a19) [concrete]
  721. // CHECK:STDOUT: %.6bf: type = fn_type_with_self_type %ImplicitAs.Convert.type.691, %ImplicitAs.facet.66c [concrete]
  722. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.71f: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert.1 [concrete]
  723. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.14b: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.71f = struct_value () [concrete]
  724. // CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.ImplicitAs.impl.Convert.14b [concrete]
  725. // CHECK:STDOUT: %int_1.0ab: %Cpp.unsigned_long = int_value 1 [concrete]
  726. // CHECK:STDOUT: %ULongResult: type = class_type @ULongResult [concrete]
  727. // CHECK:STDOUT: %pattern_type.6f2: type = pattern_type %ULongResult [concrete]
  728. // CHECK:STDOUT: %PassULong.cpp_overload_set.type: type = cpp_overload_set_type @PassULong.cpp_overload_set [concrete]
  729. // CHECK:STDOUT: %PassULong.cpp_overload_set.value: %PassULong.cpp_overload_set.type = cpp_overload_set_value @PassULong.cpp_overload_set [concrete]
  730. // CHECK:STDOUT: %ptr.f5e: type = ptr_type %ULongResult [concrete]
  731. // CHECK:STDOUT: %PassULong__carbon_thunk.type.3fc2d8.1: type = fn_type @PassULong__carbon_thunk.1 [concrete]
  732. // CHECK:STDOUT: %PassULong__carbon_thunk.ff747d.1: %PassULong__carbon_thunk.type.3fc2d8.1 = struct_value () [concrete]
  733. // CHECK:STDOUT: %pattern_type.4a9: type = pattern_type %u32 [concrete]
  734. // CHECK:STDOUT: %ImplicitAs.impl_witness.e61: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.af7 [concrete]
  735. // CHECK:STDOUT: %ImplicitAs.facet.3c4: %ImplicitAs.type.146 = facet_value %Cpp.unsigned_long, (%ImplicitAs.impl_witness.e61) [concrete]
  736. // CHECK:STDOUT: %.da1: type = fn_type_with_self_type %ImplicitAs.Convert.type.92a, %ImplicitAs.facet.3c4 [concrete]
  737. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.bef: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert.1 [concrete]
  738. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.19d: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.bef = struct_value () [concrete]
  739. // CHECK:STDOUT: %UIntResult: type = class_type @UIntResult [concrete]
  740. // CHECK:STDOUT: %pattern_type.dc7: type = pattern_type %UIntResult [concrete]
  741. // CHECK:STDOUT: %ptr.059: type = ptr_type %UIntResult [concrete]
  742. // CHECK:STDOUT: %PassULong__carbon_thunk.type.3fc2d8.2: type = fn_type @PassULong__carbon_thunk.2 [concrete]
  743. // CHECK:STDOUT: %PassULong__carbon_thunk.ff747d.2: %PassULong__carbon_thunk.type.3fc2d8.2 = struct_value () [concrete]
  744. // CHECK:STDOUT: %Float.type: type = generic_class_type @Float [concrete]
  745. // CHECK:STDOUT: %Float.generic: %Float.type = struct_value () [concrete]
  746. // CHECK:STDOUT: %f32.97e: type = class_type @Float, @Float(%int_32) [concrete]
  747. // CHECK:STDOUT: %As.type.90f: type = generic_interface_type @As [concrete]
  748. // CHECK:STDOUT: %As.generic: %As.type.90f = struct_value () [concrete]
  749. // CHECK:STDOUT: %As.type.950: type = facet_type <@As, @As(%Cpp.unsigned_long)> [concrete]
  750. // CHECK:STDOUT: %As.Convert.type.3ff: type = fn_type @As.Convert, @As(%Cpp.unsigned_long) [concrete]
  751. // CHECK:STDOUT: %As.impl_witness: <witness> = impl_witness imports.%As.impl_witness_table [concrete]
  752. // CHECK:STDOUT: %As.facet: %As.type.950 = facet_value Core.IntLiteral, (%As.impl_witness) [concrete]
  753. // CHECK:STDOUT: %.80d: type = fn_type_with_self_type %As.Convert.type.3ff, %As.facet [concrete]
  754. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.type: type = fn_type @Core.IntLiteral.as.As.impl.Convert [concrete]
  755. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert: %Core.IntLiteral.as.As.impl.Convert.type = struct_value () [concrete]
  756. // CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.bound: <bound method> = bound_method %int_1.5b8, %Core.IntLiteral.as.As.impl.Convert [concrete]
  757. // CHECK:STDOUT: %ImplicitAs.impl_witness.a13: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.50d [concrete]
  758. // CHECK:STDOUT: %ImplicitAs.facet.2f7: %ImplicitAs.type.139 = facet_value %Cpp.unsigned_long, (%ImplicitAs.impl_witness.a13) [concrete]
  759. // CHECK:STDOUT: %.4f2: type = fn_type_with_self_type %ImplicitAs.Convert.type.71e, %ImplicitAs.facet.2f7 [concrete]
  760. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.a9d: type = fn_type @Cpp.unsigned_long.as.ImplicitAs.impl.Convert.2 [concrete]
  761. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.type.a9d = struct_value () [concrete]
  762. // 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]
  763. // CHECK:STDOUT: %array_type: type = array_type %int_1.5b8, %f32.97e [concrete]
  764. // CHECK:STDOUT: %pattern_type.b36: type = pattern_type %array_type [concrete]
  765. // CHECK:STDOUT: %float.674: Core.FloatLiteral = float_literal_value 10e-1 [concrete]
  766. // CHECK:STDOUT: %tuple.type: type = tuple_type (Core.FloatLiteral) [concrete]
  767. // CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%float.674) [concrete]
  768. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  769. // CHECK:STDOUT: %ImplicitAs.type.223: type = facet_type <@ImplicitAs, @ImplicitAs(%f32.97e)> [concrete]
  770. // CHECK:STDOUT: %ImplicitAs.Convert.type.b8c: type = fn_type @ImplicitAs.Convert, @ImplicitAs(%f32.97e) [concrete]
  771. // 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]
  772. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.1f0: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.02f = struct_value () [symbolic]
  773. // CHECK:STDOUT: %ImplicitAs.impl_witness.bc6: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.31a, @Core.FloatLiteral.as.ImplicitAs.impl(%int_32) [concrete]
  774. // 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]
  775. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.type.461 = struct_value () [concrete]
  776. // CHECK:STDOUT: %ImplicitAs.facet.945: %ImplicitAs.type.223 = facet_value Core.FloatLiteral, (%ImplicitAs.impl_witness.bc6) [concrete]
  777. // CHECK:STDOUT: %.a6f: type = fn_type_with_self_type %ImplicitAs.Convert.type.b8c, %ImplicitAs.facet.945 [concrete]
  778. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55 [concrete]
  779. // 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]
  780. // CHECK:STDOUT: %bound_method: <bound method> = bound_method %float.674, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
  781. // CHECK:STDOUT: %float.e3b: %f32.97e = float_value 1 [concrete]
  782. // CHECK:STDOUT: %array: %array_type = tuple_value (%float.e3b) [concrete]
  783. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  784. // CHECK:STDOUT: %DestroyOp.type.3e79c2.1: type = fn_type @DestroyOp.loc24 [concrete]
  785. // CHECK:STDOUT: %DestroyOp.b0ebf8.1: %DestroyOp.type.3e79c2.1 = struct_value () [concrete]
  786. // CHECK:STDOUT: %UIntResult.cpp_destructor.type: type = fn_type @UIntResult.cpp_destructor [concrete]
  787. // CHECK:STDOUT: %UIntResult.cpp_destructor: %UIntResult.cpp_destructor.type = struct_value () [concrete]
  788. // CHECK:STDOUT: %ULongResult.cpp_destructor.type: type = fn_type @ULongResult.cpp_destructor [concrete]
  789. // CHECK:STDOUT: %ULongResult.cpp_destructor: %ULongResult.cpp_destructor.type = struct_value () [concrete]
  790. // CHECK:STDOUT: }
  791. // CHECK:STDOUT:
  792. // CHECK:STDOUT: imports {
  793. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  794. // CHECK:STDOUT: .CppCompat = %CppCompat.4b4
  795. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  796. // CHECK:STDOUT: .UInt = %Core.UInt
  797. // CHECK:STDOUT: .Float = %Core.Float
  798. // CHECK:STDOUT: .As = %Core.As
  799. // CHECK:STDOUT: .Destroy = %Core.Destroy
  800. // CHECK:STDOUT: import Core//prelude
  801. // CHECK:STDOUT: import Core//prelude/...
  802. // CHECK:STDOUT: }
  803. // CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
  804. // CHECK:STDOUT: .unsigned_long = constants.%Cpp.unsigned_long
  805. // CHECK:STDOUT: .ULongResult = %ULongResult.decl
  806. // CHECK:STDOUT: .PassULong = %PassULong.cpp_overload_set.value
  807. // CHECK:STDOUT: .UIntResult = %UIntResult.decl
  808. // CHECK:STDOUT: import Cpp//...
  809. // CHECK:STDOUT: }
  810. // CHECK:STDOUT: %Core.CppCompat: <namespace> = import_ref Core//prelude, CppCompat, loaded
  811. // CHECK:STDOUT: %CppCompat.4b4: <namespace> = namespace %Core.CppCompat, [concrete] {
  812. // CHECK:STDOUT: .ULong32 = %Core.ULong32
  813. // CHECK:STDOUT: import Core//prelude
  814. // CHECK:STDOUT: import Core//prelude/...
  815. // CHECK:STDOUT: }
  816. // CHECK:STDOUT: %Core.ULong32: type = import_ref Core//prelude/types/cpp/int, ULong32, loaded [concrete = constants.%Cpp.unsigned_long]
  817. // CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
  818. // 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]
  819. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.5b5 = impl_witness_table (%Core.import_ref.702), @Core.IntLiteral.as.ImplicitAs.impl.541 [concrete]
  820. // CHECK:STDOUT: %ULongResult.decl: type = class_decl @ULongResult [concrete = constants.%ULongResult] {} {}
  821. // 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]
  822. // 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] {
  823. // CHECK:STDOUT: <elided>
  824. // CHECK:STDOUT: } {
  825. // CHECK:STDOUT: <elided>
  826. // CHECK:STDOUT: }
  827. // CHECK:STDOUT: %Core.UInt: %UInt.type = import_ref Core//prelude/types/uint, UInt, loaded [concrete = constants.%UInt.generic]
  828. // 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]
  829. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.af7 = impl_witness_table (%Core.import_ref.d88), @Cpp.unsigned_long.as.ImplicitAs.impl.66a [concrete]
  830. // CHECK:STDOUT: %UIntResult.decl: type = class_decl @UIntResult [concrete = constants.%UIntResult] {} {}
  831. // 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] {
  832. // CHECK:STDOUT: <elided>
  833. // CHECK:STDOUT: } {
  834. // CHECK:STDOUT: <elided>
  835. // CHECK:STDOUT: }
  836. // CHECK:STDOUT: %Core.Float: %Float.type = import_ref Core//prelude/types/float, Float, loaded [concrete = constants.%Float.generic]
  837. // CHECK:STDOUT: %Core.As: %As.type.90f = import_ref Core//prelude/operators/as, As, loaded [concrete = constants.%As.generic]
  838. // 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]
  839. // CHECK:STDOUT: %As.impl_witness_table = impl_witness_table (%Core.import_ref.190), @Core.IntLiteral.as.As.impl.8c9 [concrete]
  840. // 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]
  841. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.50d = impl_witness_table (%Core.import_ref.f5e), @Cpp.unsigned_long.as.ImplicitAs.impl.78e [concrete]
  842. // 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)]
  843. // CHECK:STDOUT: %ImplicitAs.impl_witness_table.31a = impl_witness_table (%Core.import_ref.38a), @Core.FloatLiteral.as.ImplicitAs.impl [concrete]
  844. // CHECK:STDOUT: %Core.Destroy: type = import_ref Core//prelude/destroy, Destroy, loaded [concrete = constants.%Destroy.type]
  845. // CHECK:STDOUT: }
  846. // CHECK:STDOUT:
  847. // CHECK:STDOUT: fn @F() {
  848. // CHECK:STDOUT: !entry:
  849. // CHECK:STDOUT: name_binding_decl {
  850. // CHECK:STDOUT: %cpp_unsigned_long.patt: %pattern_type.5b7 = value_binding_pattern cpp_unsigned_long [concrete]
  851. // CHECK:STDOUT: }
  852. // CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  853. // CHECK:STDOUT: %.loc15_29: type = splice_block %unsigned_long.ref.loc15 [concrete = constants.%Cpp.unsigned_long] {
  854. // CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  855. // CHECK:STDOUT: %unsigned_long.ref.loc15: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long]
  856. // CHECK:STDOUT: }
  857. // CHECK:STDOUT: %impl.elem0.loc15: %.6bf = impl_witness_access constants.%ImplicitAs.impl_witness.a19, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.14b]
  858. // CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
  859. // 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]
  860. // CHECK:STDOUT: %.loc15_46.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.0ab]
  861. // CHECK:STDOUT: %.loc15_46.2: %Cpp.unsigned_long = converted %int_1.loc15, %.loc15_46.1 [concrete = constants.%int_1.0ab]
  862. // CHECK:STDOUT: %cpp_unsigned_long: %Cpp.unsigned_long = value_binding cpp_unsigned_long, %.loc15_46.2
  863. // CHECK:STDOUT: name_binding_decl {
  864. // CHECK:STDOUT: %cpp_unsigned_long_result.patt: %pattern_type.6f2 = value_binding_pattern cpp_unsigned_long_result [concrete]
  865. // CHECK:STDOUT: }
  866. // CHECK:STDOUT: %Cpp.ref.loc16_51: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  867. // 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]
  868. // CHECK:STDOUT: %cpp_unsigned_long.ref.loc16: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
  869. // CHECK:STDOUT: %.loc16_82.1: ref %ULongResult = temporary_storage
  870. // CHECK:STDOUT: %addr.loc16: %ptr.f5e = addr_of %.loc16_82.1
  871. // 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)
  872. // CHECK:STDOUT: %.loc16_82.2: init %ULongResult = in_place_init %PassULong__carbon_thunk.call.loc16, %.loc16_82.1
  873. // CHECK:STDOUT: %.loc16_36: type = splice_block %ULongResult.ref.loc16 [concrete = constants.%ULongResult] {
  874. // CHECK:STDOUT: %Cpp.ref.loc16_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  875. // CHECK:STDOUT: %ULongResult.ref.loc16: type = name_ref ULongResult, imports.%ULongResult.decl [concrete = constants.%ULongResult]
  876. // CHECK:STDOUT: }
  877. // CHECK:STDOUT: %.loc16_82.3: ref %ULongResult = temporary %.loc16_82.1, %.loc16_82.2
  878. // CHECK:STDOUT: %.loc16_82.4: %ULongResult = acquire_value %.loc16_82.3
  879. // CHECK:STDOUT: %cpp_unsigned_long_result: %ULongResult = value_binding cpp_unsigned_long_result, %.loc16_82.4
  880. // CHECK:STDOUT: name_binding_decl {
  881. // CHECK:STDOUT: %cpp_compat_ulong.patt: %pattern_type.5b7 = value_binding_pattern cpp_compat_ulong [concrete]
  882. // CHECK:STDOUT: }
  883. // CHECK:STDOUT: %cpp_unsigned_long.ref.loc18: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
  884. // CHECK:STDOUT: %.loc18: type = splice_block %ULong32.ref [concrete = constants.%Cpp.unsigned_long] {
  885. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
  886. // CHECK:STDOUT: %CppCompat.ref: <namespace> = name_ref CppCompat, imports.%CppCompat.4b4 [concrete = imports.%CppCompat.4b4]
  887. // CHECK:STDOUT: %ULong32.ref: type = name_ref ULong32, imports.%Core.ULong32 [concrete = constants.%Cpp.unsigned_long]
  888. // CHECK:STDOUT: }
  889. // CHECK:STDOUT: %cpp_compat_ulong: %Cpp.unsigned_long = value_binding cpp_compat_ulong, %cpp_unsigned_long.ref.loc18
  890. // CHECK:STDOUT: name_binding_decl {
  891. // CHECK:STDOUT: %cpp_compat_ulong_result.patt: %pattern_type.6f2 = value_binding_pattern cpp_compat_ulong_result [concrete]
  892. // CHECK:STDOUT: }
  893. // CHECK:STDOUT: %Cpp.ref.loc19_50: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  894. // 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]
  895. // CHECK:STDOUT: %cpp_compat_ulong.ref: %Cpp.unsigned_long = name_ref cpp_compat_ulong, %cpp_compat_ulong
  896. // CHECK:STDOUT: %.loc19_80.1: ref %ULongResult = temporary_storage
  897. // CHECK:STDOUT: %addr.loc19: %ptr.f5e = addr_of %.loc19_80.1
  898. // 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)
  899. // CHECK:STDOUT: %.loc19_80.2: init %ULongResult = in_place_init %PassULong__carbon_thunk.call.loc19, %.loc19_80.1
  900. // CHECK:STDOUT: %.loc19_35: type = splice_block %ULongResult.ref.loc19 [concrete = constants.%ULongResult] {
  901. // CHECK:STDOUT: %Cpp.ref.loc19_32: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  902. // CHECK:STDOUT: %ULongResult.ref.loc19: type = name_ref ULongResult, imports.%ULongResult.decl [concrete = constants.%ULongResult]
  903. // CHECK:STDOUT: }
  904. // CHECK:STDOUT: %.loc19_80.3: ref %ULongResult = temporary %.loc19_80.1, %.loc19_80.2
  905. // CHECK:STDOUT: %.loc19_80.4: %ULongResult = acquire_value %.loc19_80.3
  906. // CHECK:STDOUT: %cpp_compat_ulong_result: %ULongResult = value_binding cpp_compat_ulong_result, %.loc19_80.4
  907. // CHECK:STDOUT: name_binding_decl {
  908. // CHECK:STDOUT: %carbon_u32.patt: %pattern_type.4a9 = value_binding_pattern carbon_u32 [concrete]
  909. // CHECK:STDOUT: }
  910. // CHECK:STDOUT: %cpp_unsigned_long.ref.loc21: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
  911. // CHECK:STDOUT: %.loc21_19: type = splice_block %u32 [concrete = constants.%u32] {
  912. // CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  913. // CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [concrete = constants.%u32]
  914. // CHECK:STDOUT: }
  915. // 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]
  916. // CHECK:STDOUT: %bound_method.loc21: <bound method> = bound_method %cpp_unsigned_long.ref.loc21, %impl.elem0.loc21
  917. // CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc21: init %u32 = call %bound_method.loc21(%cpp_unsigned_long.ref.loc21)
  918. // CHECK:STDOUT: %.loc21_25.1: %u32 = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc21
  919. // CHECK:STDOUT: %.loc21_25.2: %u32 = converted %cpp_unsigned_long.ref.loc21, %.loc21_25.1
  920. // CHECK:STDOUT: %carbon_u32: %u32 = value_binding carbon_u32, %.loc21_25.2
  921. // CHECK:STDOUT: name_binding_decl {
  922. // CHECK:STDOUT: %carbon_u32_result.patt: %pattern_type.dc7 = value_binding_pattern carbon_u32_result [concrete]
  923. // CHECK:STDOUT: }
  924. // CHECK:STDOUT: %Cpp.ref.loc22_43: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  925. // 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]
  926. // CHECK:STDOUT: %carbon_u32.ref: %u32 = name_ref carbon_u32, %carbon_u32
  927. // CHECK:STDOUT: %.loc22_67.1: ref %UIntResult = temporary_storage
  928. // CHECK:STDOUT: %addr.loc22: %ptr.059 = addr_of %.loc22_67.1
  929. // CHECK:STDOUT: %PassULong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassULong__carbon_thunk.decl.108234.2(%carbon_u32.ref, %addr.loc22)
  930. // CHECK:STDOUT: %.loc22_67.2: init %UIntResult = in_place_init %PassULong__carbon_thunk.call.loc22, %.loc22_67.1
  931. // CHECK:STDOUT: %.loc22_29: type = splice_block %UIntResult.ref [concrete = constants.%UIntResult] {
  932. // CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  933. // CHECK:STDOUT: %UIntResult.ref: type = name_ref UIntResult, imports.%UIntResult.decl [concrete = constants.%UIntResult]
  934. // CHECK:STDOUT: }
  935. // CHECK:STDOUT: %.loc22_67.3: ref %UIntResult = temporary %.loc22_67.1, %.loc22_67.2
  936. // CHECK:STDOUT: %.loc22_67.4: %UIntResult = acquire_value %.loc22_67.3
  937. // CHECK:STDOUT: %carbon_u32_result: %UIntResult = value_binding carbon_u32_result, %.loc22_67.4
  938. // CHECK:STDOUT: name_binding_decl {
  939. // CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
  940. // CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
  941. // CHECK:STDOUT: }
  942. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  943. // CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
  944. // CHECK:STDOUT: %.loc24_52.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
  945. // 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]
  946. // 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]
  947. // 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]
  948. // CHECK:STDOUT: %bound_method.loc24_52.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
  949. // CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_52.2(%float) [concrete = constants.%float.e3b]
  950. // CHECK:STDOUT: %.loc24_52.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
  951. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  952. // CHECK:STDOUT: %.loc24_52.3: ref %f32.97e = array_index %a.var, %int_0
  953. // CHECK:STDOUT: %.loc24_52.4: init %f32.97e = initialize_from %.loc24_52.2 to %.loc24_52.3 [concrete = constants.%float.e3b]
  954. // CHECK:STDOUT: %.loc24_52.5: init %array_type = array_init (%.loc24_52.4) to %a.var [concrete = constants.%array]
  955. // CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_52.1, %.loc24_52.5 [concrete = constants.%array]
  956. // CHECK:STDOUT: assign %a.var, %.loc24_3
  957. // CHECK:STDOUT: %.loc24_43: type = splice_block %array_type [concrete = constants.%array_type] {
  958. // CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  959. // CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
  960. // CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  961. // CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
  962. // CHECK:STDOUT: %unsigned_long.ref.loc24: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long]
  963. // CHECK:STDOUT: %impl.elem0.loc24_23.1: %.80d = impl_witness_access constants.%As.impl_witness, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
  964. // 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]
  965. // 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]
  966. // CHECK:STDOUT: %.loc24_23.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.0ab]
  967. // CHECK:STDOUT: %.loc24_23.2: %Cpp.unsigned_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.0ab]
  968. // 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]
  969. // 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]
  970. // 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]
  971. // CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
  972. // CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
  973. // CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
  974. // CHECK:STDOUT: }
  975. // CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
  976. // CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp.b0ebf8.1
  977. // CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
  978. // CHECK:STDOUT: %UIntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_67.3, constants.%UIntResult.cpp_destructor
  979. // CHECK:STDOUT: %UIntResult.cpp_destructor.call: init %empty_tuple.type = call %UIntResult.cpp_destructor.bound(%.loc22_67.3)
  980. // CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_80.3, constants.%ULongResult.cpp_destructor
  981. // CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc19(%.loc19_80.3)
  982. // CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_82.3, constants.%ULongResult.cpp_destructor
  983. // CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc16(%.loc16_82.3)
  984. // CHECK:STDOUT: <elided>
  985. // CHECK:STDOUT: }
  986. // CHECK:STDOUT:
  987. // CHECK:STDOUT: fn @DestroyOp.loc24(%self.param: %array_type) = "no_op";
  988. // CHECK:STDOUT:
  989. // CHECK:STDOUT: fn @DestroyOp.loc22(%self.param: %UIntResult) = "no_op";
  990. // CHECK:STDOUT:
  991. // CHECK:STDOUT: fn @DestroyOp.loc19(%self.param: %ULongResult) = "no_op";
  992. // CHECK:STDOUT: