Rename IntLiteral to IntValue. (#4475)

This instruction represents integer values, whether they come from
literals or calculations, so it the old name is inaccurate. I also plan
to rename `BigInt` to `IntLiteral` based on recent discussion and this
change aims to avoid confusion stemming from the same name being used
for two different things.

I'm not renaming `FloatLiteral` because recent discussion suggests we
may want distinct `FloatLiteral` versus `FloatValue` representations in
SemIR.
This commit is contained in:
Richard Smith
2024-11-02 01:19:39 +00:00
committed by GitHub
parent 261fe38508
commit db76e81630
250 changed files with 1933 additions and 1935 deletions
+5 -5
View File
@@ -20,9 +20,9 @@ var arr: [i32; Add(1, 2)];
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %Add.type: type = fn_type @Add [template]
// CHECK:STDOUT: %Add: %Add.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.4: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 3 [template]
// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template]
// CHECK:STDOUT: %.6: type = ptr_type %.5 [template]
// CHECK:STDOUT: }
@@ -69,8 +69,8 @@ var arr: [i32; Add(1, 2)];
// CHECK:STDOUT: }
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %Add.ref: %Add.type = name_ref Add, %Add.decl [template = constants.%Add]
// CHECK:STDOUT: %.loc13_20: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_23: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc13_20: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_23: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %int.sadd: init i32 = call %Add.ref(%.loc13_20, %.loc13_23) [template = constants.%.4]
// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32, %.loc13_11.1 [template = i32]
+5 -5
View File
@@ -33,10 +33,10 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT: %F.type.2: type = fn_type @F.2 [template]
// CHECK:STDOUT: %F.2: %F.type.2 = struct_value () [template]
// CHECK:STDOUT: %.4: <witness> = interface_witness (%F.2) [template]
// CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: <bound method> = bound_method %.5, %F.2 [template]
// CHECK:STDOUT: %.7: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.8: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.7: i32 = int_value 2 [template]
// CHECK:STDOUT: %.8: i32 = int_value 3 [template]
// CHECK:STDOUT: %.9: type = array_type %.8, i32 [template]
// CHECK:STDOUT: %.10: type = ptr_type %.9 [template]
// CHECK:STDOUT: }
@@ -65,12 +65,12 @@ var arr: [i32; 1.(I.F)(2)];
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [template = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc19_16: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc19_16: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [template = constants.%I.type]
// CHECK:STDOUT: %F.ref: %.2 = name_ref F, @I.%.loc12 [template = constants.%.3]
// CHECK:STDOUT: %.loc19_17.1: %F.type.1 = interface_witness_access constants.%.4, element0 [template = constants.%F.2]
// CHECK:STDOUT: %.loc19_17.2: <bound method> = bound_method %.loc19_16, %.loc19_17.1 [template = constants.%.6]
// CHECK:STDOUT: %.loc19_24: i32 = int_literal 2 [template = constants.%.7]
// CHECK:STDOUT: %.loc19_24: i32 = int_value 2 [template = constants.%.7]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc19_17.2(%.loc19_16, %.loc19_24) [template = constants.%.8]
// CHECK:STDOUT: %.loc19_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc19_11.2: type = converted %int.make_type_32, %.loc19_11.1 [template = i32]
@@ -118,19 +118,19 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: %Op.type.2: type = fn_type @Op.2 [template]
// CHECK:STDOUT: %Op.2: %Op.type.2 = struct_value () [template]
// CHECK:STDOUT: %.2: <witness> = interface_witness (%Op.1) [template]
// CHECK:STDOUT: %.3: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.4: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.3: i32 = int_value 1 [template]
// CHECK:STDOUT: %.4: i32 = int_value 2 [template]
// CHECK:STDOUT: %.5: type = assoc_entity_type %Add.type, %Op.type.2 [template]
// CHECK:STDOUT: %.6: %.5 = assoc_entity element0, imports.%import_ref.6 [template]
// CHECK:STDOUT: %.7: <bound method> = bound_method %.3, %Op.1 [template]
// CHECK:STDOUT: %.8: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.8: i32 = int_value 3 [template]
// CHECK:STDOUT: %.9: type = array_type %.8, i32 [template]
// CHECK:STDOUT: %.10: type = ptr_type %.9 [template]
// CHECK:STDOUT: %.11: i32 = int_literal 4 [template]
// CHECK:STDOUT: %.11: i32 = int_value 4 [template]
// CHECK:STDOUT: %.12: <bound method> = bound_method %.8, %Op.1 [template]
// CHECK:STDOUT: %.13: i32 = int_literal 7 [template]
// CHECK:STDOUT: %.13: i32 = int_value 7 [template]
// CHECK:STDOUT: %.14: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.15: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.15: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.9 = tuple_value (%.8, %.11, %.13) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -162,8 +162,8 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT: %Add.ref: type = name_ref Add, imports.%import_ref.2 [template = constants.%Add.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc10_16: i32 = int_literal 1 [template = constants.%.3]
// CHECK:STDOUT: %.loc10_20: i32 = int_literal 2 [template = constants.%.4]
// CHECK:STDOUT: %.loc10_16: i32 = int_value 1 [template = constants.%.3]
// CHECK:STDOUT: %.loc10_20: i32 = int_value 2 [template = constants.%.4]
// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, imports.%import_ref.4 [template = constants.%.6]
// CHECK:STDOUT: %.loc10_18.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.loc10_18.2: <bound method> = bound_method %.loc10_16, %.loc10_18.1 [template = constants.%.7]
@@ -220,22 +220,22 @@ var arr: [i32; 1 + 2] = (3, 4, 3 + 4);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc10_26: i32 = int_literal 3 [template = constants.%.8]
// CHECK:STDOUT: %.loc10_29: i32 = int_literal 4 [template = constants.%.11]
// CHECK:STDOUT: %.loc10_32: i32 = int_literal 3 [template = constants.%.8]
// CHECK:STDOUT: %.loc10_36: i32 = int_literal 4 [template = constants.%.11]
// CHECK:STDOUT: %.loc10_26: i32 = int_value 3 [template = constants.%.8]
// CHECK:STDOUT: %.loc10_29: i32 = int_value 4 [template = constants.%.11]
// CHECK:STDOUT: %.loc10_32: i32 = int_value 3 [template = constants.%.8]
// CHECK:STDOUT: %.loc10_36: i32 = int_value 4 [template = constants.%.11]
// CHECK:STDOUT: %Op.ref: %.5 = name_ref Op, imports.%import_ref.4 [template = constants.%.6]
// CHECK:STDOUT: %.loc10_34.1: %Op.type.2 = interface_witness_access constants.%.2, element0 [template = constants.%Op.1]
// CHECK:STDOUT: %.loc10_34.2: <bound method> = bound_method %.loc10_32, %.loc10_34.1 [template = constants.%.12]
// CHECK:STDOUT: %int.sadd: init i32 = call %.loc10_34.2(%.loc10_32, %.loc10_36) [template = constants.%.13]
// CHECK:STDOUT: %.loc10_37.1: %.14 = tuple_literal (%.loc10_26, %.loc10_29, %int.sadd)
// CHECK:STDOUT: %.loc10_37.2: i32 = int_literal 0 [template = constants.%.15]
// CHECK:STDOUT: %.loc10_37.2: i32 = int_value 0 [template = constants.%.15]
// CHECK:STDOUT: %.loc10_37.3: ref i32 = array_index file.%arr.var, %.loc10_37.2
// CHECK:STDOUT: %.loc10_37.4: init i32 = initialize_from %.loc10_26 to %.loc10_37.3 [template = constants.%.8]
// CHECK:STDOUT: %.loc10_37.5: i32 = int_literal 1 [template = constants.%.3]
// CHECK:STDOUT: %.loc10_37.5: i32 = int_value 1 [template = constants.%.3]
// CHECK:STDOUT: %.loc10_37.6: ref i32 = array_index file.%arr.var, %.loc10_37.5
// CHECK:STDOUT: %.loc10_37.7: init i32 = initialize_from %.loc10_29 to %.loc10_37.6 [template = constants.%.11]
// CHECK:STDOUT: %.loc10_37.8: i32 = int_literal 2 [template = constants.%.4]
// CHECK:STDOUT: %.loc10_37.8: i32 = int_value 2 [template = constants.%.4]
// CHECK:STDOUT: %.loc10_37.9: ref i32 = array_index file.%arr.var, %.loc10_37.8
// CHECK:STDOUT: %.loc10_37.10: init i32 = initialize_from %int.sadd to %.loc10_37.9 [template = constants.%.13]
// CHECK:STDOUT: %.loc10_37.11: init %.9 = array_init (%.loc10_37.4, %.loc10_37.7, %.loc10_37.10) to file.%arr.var [template = constants.%array]
@@ -81,13 +81,13 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %TestAdd.type: type = fn_type @TestAdd [template]
// CHECK:STDOUT: %TestAdd: %TestAdd.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.4: i32 = int_literal 3 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 3 [template]
// CHECK:STDOUT: %.5: type = array_type %.4, i32 [template]
// CHECK:STDOUT: %.6: type = ptr_type %.5 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.8: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.8: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.5 = tuple_value (%.2, %.3, %.4) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -110,8 +110,8 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
// CHECK:STDOUT: %TestAdd.ref: %TestAdd.type = name_ref TestAdd, imports.%import_ref.2 [template = constants.%TestAdd]
// CHECK:STDOUT: %.loc4_29: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_32: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_29: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_32: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %int.sadd: init i32 = call %TestAdd.ref(%.loc4_29, %.loc4_32) [template = constants.%.4]
// CHECK:STDOUT: %.loc4_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc4_11.2: type = converted %int.make_type_32, %.loc4_11.1 [template = i32]
@@ -126,17 +126,17 @@ var arr: [i32; Core.TestAdd(1, 2)] = (1, 2, 3);
// CHECK:STDOUT:
// CHECK:STDOUT: fn @__global_init() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc4_39: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_42: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_45: i32 = int_literal 3 [template = constants.%.4]
// CHECK:STDOUT: %.loc4_39: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_42: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_45: i32 = int_value 3 [template = constants.%.4]
// CHECK:STDOUT: %.loc4_46.1: %.7 = tuple_literal (%.loc4_39, %.loc4_42, %.loc4_45)
// CHECK:STDOUT: %.loc4_46.2: i32 = int_literal 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc4_46.2: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc4_46.3: ref i32 = array_index file.%arr.var, %.loc4_46.2
// CHECK:STDOUT: %.loc4_46.4: init i32 = initialize_from %.loc4_39 to %.loc4_46.3 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_46.5: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_46.5: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc4_46.6: ref i32 = array_index file.%arr.var, %.loc4_46.5
// CHECK:STDOUT: %.loc4_46.7: init i32 = initialize_from %.loc4_42 to %.loc4_46.6 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_46.8: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_46.8: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc4_46.9: ref i32 = array_index file.%arr.var, %.loc4_46.8
// CHECK:STDOUT: %.loc4_46.10: init i32 = initialize_from %.loc4_45 to %.loc4_46.9 [template = constants.%.4]
// CHECK:STDOUT: %.loc4_46.11: init %.5 = array_init (%.loc4_46.4, %.loc4_46.7, %.loc4_46.10) to file.%arr.var [template = constants.%array]
@@ -78,8 +78,8 @@ fn Main() {
// CHECK:STDOUT: %Run2: %Run2.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: i32 = int_value 0 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -151,17 +151,17 @@ fn Main() {
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Run0.ref.loc23: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0]
// CHECK:STDOUT: %.loc23: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc23: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %Run0.ref.loc31: %Run0.type = name_ref Run0, file.%Run0.decl [template = constants.%Run0]
// CHECK:STDOUT: %.loc31_8: i32 = int_literal 0 [template = constants.%.3]
// CHECK:STDOUT: %.loc31_11: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc31_8: i32 = int_value 0 [template = constants.%.3]
// CHECK:STDOUT: %.loc31_11: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %Run1.ref.loc40: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1]
// CHECK:STDOUT: %Run1.ref.loc48: %Run1.type = name_ref Run1, file.%Run1.decl [template = constants.%Run1]
// CHECK:STDOUT: %.loc48_8: i32 = int_literal 0 [template = constants.%.3]
// CHECK:STDOUT: %.loc48_11: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc48_8: i32 = int_value 0 [template = constants.%.3]
// CHECK:STDOUT: %.loc48_11: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %Run2.ref.loc57: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2]
// CHECK:STDOUT: %Run2.ref.loc64: %Run2.type = name_ref Run2, file.%Run2.decl [template = constants.%Run2]
// CHECK:STDOUT: %.loc64: i32 = int_literal 0 [template = constants.%.3]
// CHECK:STDOUT: %.loc64: i32 = int_value 0 [template = constants.%.3]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -23,7 +23,7 @@ fn Run() {
// CHECK:STDOUT: --- fail_return_type_mismatch.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %.1: Core.BigInt = int_literal 64 [template]
// CHECK:STDOUT: %.1: Core.BigInt = int_value 64 [template]
// CHECK:STDOUT: %Float.type: type = fn_type @Float [template]
// CHECK:STDOUT: %.2: type = tuple_type () [template]
// CHECK:STDOUT: %Float: %Float.type = struct_value () [template]
@@ -82,7 +82,7 @@ fn Run() {
// CHECK:STDOUT: %return.patt: f64 = return_slot_pattern
// CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param0
// CHECK:STDOUT: } {
// CHECK:STDOUT: %.loc11_13.1: Core.BigInt = int_literal 64 [template = constants.%.1]
// CHECK:STDOUT: %.loc11_13.1: Core.BigInt = int_value 64 [template = constants.%.1]
// CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc11_13.1) [template = f64]
// CHECK:STDOUT: %.loc11_13.2: type = value_of_initializer %float.make_type [template = f64]
// CHECK:STDOUT: %.loc11_13.3: type = converted %float.make_type, %.loc11_13.2 [template = f64]
+2 -2
View File
@@ -26,7 +26,7 @@ fn Main() {
// CHECK:STDOUT: %Echo: %Echo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -81,7 +81,7 @@ fn Main() {
// CHECK:STDOUT: %b.var: ref i32 = var b
// CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var
// CHECK:STDOUT: %Echo.ref: %Echo.type = name_ref Echo, file.%Echo.decl [template = constants.%Echo]
// CHECK:STDOUT: %.loc16_21: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc16_21: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %Echo.call: init i32 = call %Echo.ref(%.loc16_21)
// CHECK:STDOUT: assign %b.var, %Echo.call
// CHECK:STDOUT: return
@@ -28,10 +28,10 @@ fn Main() {
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: type = tuple_type (type) [template]
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
// CHECK:STDOUT: %.4: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template]
// CHECK:STDOUT: %.5: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.6: i32 = int_literal 6 [template]
// CHECK:STDOUT: %.5: i32 = int_value 0 [template]
// CHECK:STDOUT: %.6: i32 = int_value 6 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -86,16 +86,16 @@ fn Main() {
// CHECK:STDOUT: %.loc14_15.4: type = converted %.loc14_15.1, constants.%.3 [template = constants.%.3]
// CHECK:STDOUT: %x.var: ref %.3 = var x
// CHECK:STDOUT: %x: ref %.3 = bind_name x, %x.var
// CHECK:STDOUT: %.loc14_20: i32 = int_literal 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_20: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_22.1: %.3 = tuple_literal (%.loc14_20)
// CHECK:STDOUT: %.loc14_22.2: init %.3 = tuple_init (%.loc14_20) to %x.var [template = constants.%tuple]
// CHECK:STDOUT: %.loc14_23: init %.3 = converted %.loc14_22.1, %.loc14_22.2 [template = constants.%tuple]
// CHECK:STDOUT: assign %x.var, %.loc14_23
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %x.ref: ref %.3 = name_ref x, %x
// CHECK:STDOUT: %.loc16_9: i32 = int_literal 0 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_9: i32 = int_value 0 [template = constants.%.5]
// CHECK:STDOUT: %.loc16_8.1: ref i32 = tuple_access %x.ref, element0
// CHECK:STDOUT: %.loc16_12: i32 = int_literal 6 [template = constants.%.6]
// CHECK:STDOUT: %.loc16_12: i32 = int_value 6 [template = constants.%.6]
// CHECK:STDOUT: %.loc16_8.2: i32 = bind_value %.loc16_8.1
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc16_8.2, %.loc16_12)
// CHECK:STDOUT: return
+2 -2
View File
@@ -24,7 +24,7 @@ fn Main() {
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -66,7 +66,7 @@ fn Main() {
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc14: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -25,7 +25,7 @@ fn Main() {
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -67,10 +67,10 @@ fn Main() {
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc14: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14)
// CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc15: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc15: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
+4 -4
View File
@@ -24,8 +24,8 @@ fn Main() {
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -74,8 +74,8 @@ fn Main() {
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Foo.ref: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc14_7: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_10: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %Foo.call: init %.1 = call %Foo.ref(%.loc14_7, %.loc14_10)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -25,8 +25,8 @@ fn Main() {
// CHECK:STDOUT: %Foo: %Foo.type = struct_value () [template]
// CHECK:STDOUT: %Main.type: type = fn_type @Main [template]
// CHECK:STDOUT: %Main: %Main.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: i32 = int_value 2 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -75,12 +75,12 @@ fn Main() {
// CHECK:STDOUT: fn @Main() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Foo.ref.loc14: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc14_7: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_10: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc14_7: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_10: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %Foo.call.loc14: init %.1 = call %Foo.ref.loc14(%.loc14_7, %.loc14_10)
// CHECK:STDOUT: %Foo.ref.loc15: %Foo.type = name_ref Foo, file.%Foo.decl [template = constants.%Foo]
// CHECK:STDOUT: %.loc15_7: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc15_10: i32 = int_literal 2 [template = constants.%.3]
// CHECK:STDOUT: %.loc15_7: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc15_10: i32 = int_value 2 [template = constants.%.3]
// CHECK:STDOUT: %Foo.call.loc15: init %.1 = call %Foo.ref.loc15(%.loc15_7, %.loc15_10)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
+15 -15
View File
@@ -459,7 +459,7 @@ import library "extern_api";
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template]
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
@@ -548,11 +548,11 @@ import library "extern_api";
// CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
// CHECK:STDOUT: assign file.%a.var, %A.call
// CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B]
// CHECK:STDOUT: %.loc7: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc7: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7)
// CHECK:STDOUT: assign file.%b.var, %B.call
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C]
// CHECK:STDOUT: %.loc8_23: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc8_23: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc8_25.1: %.4 = tuple_literal (%.loc8_23)
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc8_23) [template = constants.%tuple]
// CHECK:STDOUT: %.loc8_25.2: %.4 = converted %.loc8_25.1, %tuple [template = constants.%tuple]
@@ -587,7 +587,7 @@ import library "extern_api";
// CHECK:STDOUT: %D: %D.type = struct_value () [template]
// CHECK:STDOUT: %E.type: type = fn_type @E [template]
// CHECK:STDOUT: %E: %E.type = struct_value () [template]
// CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -698,11 +698,11 @@ import library "extern_api";
// CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
// CHECK:STDOUT: assign file.%a.var, %A.call
// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B]
// CHECK:STDOUT: %.loc53: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc53: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc53)
// CHECK:STDOUT: assign file.%b.var, %B.call
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %.loc54_23: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc54_23: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc54_25.1: %.3 = tuple_literal (%.loc54_23)
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc54_23) [template = constants.%tuple]
// CHECK:STDOUT: %.loc54_25.2: %.3 = converted %.loc54_25.1, %tuple [template = constants.%tuple]
@@ -737,7 +737,7 @@ import library "extern_api";
// CHECK:STDOUT: %D: %D.type = struct_value () [template]
// CHECK:STDOUT: %E.type: type = fn_type @E [template]
// CHECK:STDOUT: %E: %E.type = struct_value () [template]
// CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.5) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -848,11 +848,11 @@ import library "extern_api";
// CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
// CHECK:STDOUT: assign file.%a.var, %A.call
// CHECK:STDOUT: %B.ref: %B.type = name_ref B, file.%B.decl [template = constants.%B]
// CHECK:STDOUT: %.loc13: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc13: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc13)
// CHECK:STDOUT: assign file.%b.var, %B.call
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, file.%C.decl [template = constants.%C]
// CHECK:STDOUT: %.loc14_23: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_23: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_25.1: %.3 = tuple_literal (%.loc14_23)
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc14_23) [template = constants.%tuple]
// CHECK:STDOUT: %.loc14_25.2: %.3 = converted %.loc14_25.1, %tuple [template = constants.%tuple]
@@ -878,7 +878,7 @@ import library "extern_api";
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template]
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
@@ -972,11 +972,11 @@ import library "extern_api";
// CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
// CHECK:STDOUT: assign file.%a.var, %A.call
// CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B]
// CHECK:STDOUT: %.loc53: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc53: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc53)
// CHECK:STDOUT: assign file.%b.var, %B.call
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C]
// CHECK:STDOUT: %.loc54_23: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc54_23: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc54_25.1: %.4 = tuple_literal (%.loc54_23)
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc54_23) [template = constants.%tuple]
// CHECK:STDOUT: %.loc54_25.2: %.4 = converted %.loc54_25.1, %tuple [template = constants.%tuple]
@@ -1002,7 +1002,7 @@ import library "extern_api";
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template]
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
@@ -1096,11 +1096,11 @@ import library "extern_api";
// CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
// CHECK:STDOUT: assign file.%a.var, %A.call
// CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B]
// CHECK:STDOUT: %.loc52: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc52: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc52)
// CHECK:STDOUT: assign file.%b.var, %B.call
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C]
// CHECK:STDOUT: %.loc53_23: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc53_23: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc53_25.1: %.4 = tuple_literal (%.loc53_23)
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc53_23) [template = constants.%tuple]
// CHECK:STDOUT: %.loc53_25.2: %.4 = converted %.loc53_25.1, %tuple [template = constants.%tuple]
+5 -5
View File
@@ -124,7 +124,7 @@ fn D() {}
// CHECK:STDOUT: %.4: type = struct_type {.c: i32} [template]
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
// CHECK:STDOUT: %.5: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.5: i32 = int_value 0 [template]
// CHECK:STDOUT: %D.type: type = fn_type @D [template]
// CHECK:STDOUT: %D: %D.type = struct_value () [template]
// CHECK:STDOUT: }
@@ -204,7 +204,7 @@ fn D() {}
// CHECK:STDOUT: fn @C(%c.param_patt: %.3) -> %.4 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %c.ref: %.3 = name_ref c, %c
// CHECK:STDOUT: %.loc6_47: i32 = int_literal 0 [template = constants.%.5]
// CHECK:STDOUT: %.loc6_47: i32 = int_value 0 [template = constants.%.5]
// CHECK:STDOUT: %.loc6_46: i32 = tuple_access %c.ref, element0
// CHECK:STDOUT: %.loc6_48: %.4 = struct_literal (%.loc6_46)
// CHECK:STDOUT: %struct: %.4 = struct_value (%.loc6_46)
@@ -250,7 +250,7 @@ fn D() {}
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %B.type: type = fn_type @B [template]
// CHECK:STDOUT: %B: %B.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.2: i32 = int_value 1 [template]
// CHECK:STDOUT: %.3: type = struct_type {.c: i32} [template]
// CHECK:STDOUT: %C.type: type = fn_type @C [template]
// CHECK:STDOUT: %C: %C.type = struct_value () [template]
@@ -315,11 +315,11 @@ fn D() {}
// CHECK:STDOUT: %A.call: init %.1 = call %A.ref()
// CHECK:STDOUT: assign file.%a.var, %A.call
// CHECK:STDOUT: %B.ref: %B.type = name_ref B, imports.%import_ref.2 [template = constants.%B]
// CHECK:STDOUT: %.loc7: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc7: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %B.call: init i32 = call %B.ref(%.loc7)
// CHECK:STDOUT: assign file.%b.var, %B.call
// CHECK:STDOUT: %C.ref: %C.type = name_ref C, imports.%import_ref.3 [template = constants.%C]
// CHECK:STDOUT: %.loc8_23: i32 = int_literal 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc8_23: i32 = int_value 1 [template = constants.%.2]
// CHECK:STDOUT: %.loc8_25.1: %.4 = tuple_literal (%.loc8_23)
// CHECK:STDOUT: %tuple: %.4 = tuple_value (%.loc8_23) [template = constants.%tuple]
// CHECK:STDOUT: %.loc8_25.2: %.4 = converted %.loc8_25.1, %tuple [template = constants.%tuple]
+14 -14
View File
@@ -724,8 +724,8 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %.4: type = ptr_type %.3 [symbolic]
// CHECK:STDOUT: %CallTupleParam.type: type = fn_type @CallTupleParam [template]
// CHECK:STDOUT: %CallTupleParam: %CallTupleParam.type = struct_value () [template]
// CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.6: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32) [template]
// CHECK:STDOUT: %.8: <specific function> = specific_function %TupleParam, @TupleParam(i32) [template]
// CHECK:STDOUT: %.9: type = ptr_type %.7 [template]
@@ -786,8 +786,8 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: fn @CallTupleParam() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %TupleParam.ref: %TupleParam.type = name_ref TupleParam, file.%TupleParam.decl [template = constants.%TupleParam]
// CHECK:STDOUT: %.loc7_15: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc7_18: i32 = int_literal 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc7_15: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc7_18: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc7_19.1: %.7 = tuple_literal (%.loc7_15, %.loc7_18)
// CHECK:STDOUT: %.loc7_3: <specific function> = specific_function %TupleParam.ref, @TupleParam(i32) [template = constants.%.8]
// CHECK:STDOUT: %tuple: %.7 = tuple_value (%.loc7_15, %.loc7_18) [template = constants.%tuple]
@@ -824,8 +824,8 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %.3: type = ptr_type %.2 [symbolic]
// CHECK:STDOUT: %CallStructParam.type: type = fn_type @CallStructParam [template]
// CHECK:STDOUT: %CallStructParam: %CallStructParam.type = struct_value () [template]
// CHECK:STDOUT: %.4: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.5: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 2 [template]
// CHECK:STDOUT: %.6: type = struct_type {.a: i32, .b: i32} [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -882,8 +882,8 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: fn @CallStructParam() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %StructParam.ref: %StructParam.type = name_ref StructParam, file.%StructParam.decl [template = constants.%StructParam]
// CHECK:STDOUT: %.loc14_21: i32 = int_literal 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_29: i32 = int_literal 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_21: i32 = int_value 1 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_29: i32 = int_value 2 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_30: %.6 = struct_literal (%.loc14_21, %.loc14_29)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -906,7 +906,7 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %ImplicitNotDeducible: %ImplicitNotDeducible.type = struct_value () [template]
// CHECK:STDOUT: %CallImplicitNotDeducible.type: type = fn_type @CallImplicitNotDeducible [template]
// CHECK:STDOUT: %CallImplicitNotDeducible: %CallImplicitNotDeducible.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 42 [template]
// CHECK:STDOUT: %.2: i32 = int_value 42 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -959,7 +959,7 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: fn @CallImplicitNotDeducible() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ImplicitNotDeducible.ref: %ImplicitNotDeducible.type = name_ref ImplicitNotDeducible, file.%ImplicitNotDeducible.decl [template = constants.%ImplicitNotDeducible]
// CHECK:STDOUT: %.loc16: i32 = int_literal 42 [template = constants.%.2]
// CHECK:STDOUT: %.loc16: i32 = int_value 42 [template = constants.%.2]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -980,8 +980,8 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: %ImplicitNotDeducible: %ImplicitNotDeducible.type = struct_value () [template]
// CHECK:STDOUT: %CallImplicitNotDeducible.type: type = fn_type @CallImplicitNotDeducible [template]
// CHECK:STDOUT: %CallImplicitNotDeducible: %CallImplicitNotDeducible.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 42 [template]
// CHECK:STDOUT: %.3: i32 = int_literal 12 [template]
// CHECK:STDOUT: %.2: i32 = int_value 42 [template]
// CHECK:STDOUT: %.3: i32 = int_value 12 [template]
// CHECK:STDOUT: %.4: type = struct_type {.x: i32} [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1034,8 +1034,8 @@ fn CallImplicitNotDeducible() {
// CHECK:STDOUT: fn @CallImplicitNotDeducible() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ImplicitNotDeducible.ref: %ImplicitNotDeducible.type = name_ref ImplicitNotDeducible, file.%ImplicitNotDeducible.decl [template = constants.%ImplicitNotDeducible]
// CHECK:STDOUT: %.loc13_24: i32 = int_literal 42 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_34: i32 = int_literal 12 [template = constants.%.3]
// CHECK:STDOUT: %.loc13_24: i32 = int_value 42 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_34: i32 = int_value 12 [template = constants.%.3]
// CHECK:STDOUT: %.loc13_36: %.4 = struct_literal (%.loc13_34)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
@@ -45,7 +45,7 @@ fn CallNegative() {
// CHECK:STDOUT: %.2: type = int_type signed, %N [symbolic]
// CHECK:STDOUT: %CallNegative.type: type = fn_type @CallNegative [template]
// CHECK:STDOUT: %CallNegative: %CallNegative.type = struct_value () [template]
// CHECK:STDOUT: %.3: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.3: i32 = int_value 0 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
@@ -116,7 +116,7 @@ fn CallNegative() {
// CHECK:STDOUT: fn @CallNegative() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %ErrorIfNIsZero.ref: %ErrorIfNIsZero.type = name_ref ErrorIfNIsZero, file.%ErrorIfNIsZero.decl [template = constants.%ErrorIfNIsZero]
// CHECK:STDOUT: %.loc19: i32 = int_literal 0 [template = constants.%.3]
// CHECK:STDOUT: %.loc19: i32 = int_value 0 [template = constants.%.3]
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -37,7 +37,7 @@ fn G() {
// CHECK:STDOUT: %C: type = class_type @C [template]
// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template]
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %.5: i32 = int_literal 100 [template]
// CHECK:STDOUT: %.5: i32 = int_value 100 [template]
// CHECK:STDOUT: %.6: type = array_type %.5, i32 [template]
// CHECK:STDOUT: %.7: type = ptr_type %.6 [template]
// CHECK:STDOUT: %.8: type = unbound_element_type %C, %.6 [template]
@@ -117,7 +117,7 @@ fn G() {
// CHECK:STDOUT:
// CHECK:STDOUT: class @C {
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc15_26: i32 = int_literal 100 [template = constants.%.5]
// CHECK:STDOUT: %.loc15_26: i32 = int_value 100 [template = constants.%.5]
// CHECK:STDOUT: %.loc15_21.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc15_21.2: type = converted %int.make_type_32, %.loc15_21.1 [template = i32]
// CHECK:STDOUT: %.loc15_29: type = array_type %.loc15_26, i32 [template = constants.%.6]
+6 -6
View File
@@ -62,7 +62,7 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %CallDefined.type: type = fn_type @CallDefined [template]
// CHECK:STDOUT: %CallDefined: %CallDefined.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.2: i32 = int_value 0 [template]
// CHECK:STDOUT: %.3: <specific function> = specific_function %Defined, @Defined(i32) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -129,7 +129,7 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: fn @CallDefined() -> i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Defined.ref: %Defined.type = name_ref Defined, file.%Defined.decl [template = constants.%Defined]
// CHECK:STDOUT: %.loc9_18: i32 = int_literal 0 [template = constants.%.2]
// CHECK:STDOUT: %.loc9_18: i32 = int_value 0 [template = constants.%.2]
// CHECK:STDOUT: %.loc9_10: <specific function> = specific_function %Defined.ref, @Defined(i32) [template = constants.%.3]
// CHECK:STDOUT: %Defined.call: init i32 = call %.loc9_10(%.loc9_18)
// CHECK:STDOUT: %.loc9_20.1: i32 = value_of_initializer %Defined.call
@@ -161,7 +161,7 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %CallDefined.type: type = fn_type @CallDefined [template]
// CHECK:STDOUT: %CallDefined: %CallDefined.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.2: i32 = int_value 0 [template]
// CHECK:STDOUT: %.3: <specific function> = specific_function %Defined, @Defined(i32) [template]
// CHECK:STDOUT: %T.patt.2: type = symbolic_binding_pattern T, 0 [symbolic]
// CHECK:STDOUT: }
@@ -246,7 +246,7 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: fn @CallDefined() -> i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Defined.ref: %Defined.type = name_ref Defined, file.%Defined.decl.loc4 [template = constants.%Defined]
// CHECK:STDOUT: %.loc7_18: i32 = int_literal 0 [template = constants.%.2]
// CHECK:STDOUT: %.loc7_18: i32 = int_value 0 [template = constants.%.2]
// CHECK:STDOUT: %.loc7_10: <specific function> = specific_function %Defined.ref, @Defined(i32) [template = constants.%.3]
// CHECK:STDOUT: %Defined.call: init i32 = call %.loc7_10(%.loc7_18)
// CHECK:STDOUT: %.loc7_20.1: i32 = value_of_initializer %Defined.call
@@ -278,7 +278,7 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template]
// CHECK:STDOUT: %CallUndefined.type: type = fn_type @CallUndefined [template]
// CHECK:STDOUT: %CallUndefined: %CallUndefined.type = struct_value () [template]
// CHECK:STDOUT: %.2: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.2: i32 = int_value 0 [template]
// CHECK:STDOUT: %.3: <specific function> = specific_function %Undefined, @Undefined(i32) [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -339,7 +339,7 @@ fn CallUndefined() -> i32 {
// CHECK:STDOUT: fn @CallUndefined() -> i32 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %Undefined.ref: %Undefined.type = name_ref Undefined, file.%Undefined.decl [template = constants.%Undefined]
// CHECK:STDOUT: %.loc13_20: i32 = int_literal 0 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_20: i32 = int_value 0 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_10: <specific function> = specific_function %Undefined.ref, @Undefined(i32) [template = constants.%.3]
// CHECK:STDOUT: %Undefined.call: init i32 = call %.loc13_10(%.loc13_20)
// CHECK:STDOUT: %.loc13_22.1: i32 = value_of_initializer %Undefined.call