From df68bf9f710f1bfc79cae99b3de9b8e31c14345e Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 28 Oct 2024 16:35:08 -0700 Subject: [PATCH] Switch to using `Core.BigInt` as the type of the size of a type literal. (#4450) This removes one of the few ways in which `i32` is special and gets us closer to removing it as a special case. --- core/prelude/types.carbon | 6 +- toolchain/check/handle_literal.cpp | 17 +- toolchain/check/testdata/array/base.carbon | 8 +- .../testdata/basics/builtin_types.carbon | 8 +- .../fail_numeric_literal_overflow.carbon | 10 +- .../testdata/basics/numeric_literals.carbon | 8 +- .../testdata/basics/type_literals.carbon | 48 ++-- .../check/testdata/builtins/float/add.carbon | 64 +++--- .../check/testdata/builtins/float/div.carbon | 68 +++--- .../check/testdata/builtins/float/eq.carbon | 26 +-- .../testdata/builtins/float/greater.carbon | 18 +- .../testdata/builtins/float/greater_eq.carbon | 18 +- .../check/testdata/builtins/float/less.carbon | 18 +- .../testdata/builtins/float/less_eq.carbon | 18 +- .../check/testdata/builtins/float/mul.carbon | 64 +++--- .../testdata/builtins/float/negate.carbon | 54 ++--- .../check/testdata/builtins/float/neq.carbon | 26 +-- .../check/testdata/builtins/float/sub.carbon | 64 +++--- .../check/testdata/deduce/int_float.carbon | 216 +++++++++--------- .../call/fail_return_type_mismatch.carbon | 8 +- .../function/generic/resolve_used.carbon | 97 ++++---- .../if_expr/fail_not_in_function.carbon | 6 +- .../fail_and_or_not_in_function.carbon | 8 +- .../return/fail_returned_var_type.carbon | 8 +- .../struct/fail_member_access_type.carbon | 8 +- .../testdata/struct/member_access.carbon | 8 +- .../testdata/struct/reorder_fields.carbon | 14 +- toolchain/lower/constant.cpp | 13 +- toolchain/sem_ir/builtin_function_kind.cpp | 4 +- 29 files changed, 485 insertions(+), 448 deletions(-) diff --git a/core/prelude/types.carbon b/core/prelude/types.carbon index e8297cfaccb9..a8b85cbef5c3 100644 --- a/core/prelude/types.carbon +++ b/core/prelude/types.carbon @@ -13,6 +13,6 @@ export import library "prelude/types/bool"; fn BigInt() -> type = "big_int.make_type"; fn Int32() -> type = "int.make_type_32"; -fn Int(size: i32) -> type = "int.make_type_signed"; -fn UInt(size: i32) -> type = "int.make_type_unsigned"; -fn Float(size: i32) -> type = "float.make_type"; +fn Int(size: BigInt()) -> type = "int.make_type_signed"; +fn UInt(size: BigInt()) -> type = "int.make_type_unsigned"; +fn Float(size: BigInt()) -> type = "float.make_type"; diff --git a/toolchain/check/handle_literal.cpp b/toolchain/check/handle_literal.cpp index f6fab497e92d..9498f368c28b 100644 --- a/toolchain/check/handle_literal.cpp +++ b/toolchain/check/handle_literal.cpp @@ -49,6 +49,19 @@ static auto MakeI32Literal(Context& context, Parse::NodeId node_id, .int_id = context.ints().Add(i32_val)}); } +// Forms an IntLiteral instruction with type `BigInt` for a given literal +// integer value, which is assumed to be unsigned. +static auto MakeBigIntLiteral(Context& context, Parse::NodeId node_id, + IntId int_id) -> SemIR::InstId { + // TODO: `IntId`s with different bit-widths are considered different values + // here. Decide how we want to canonicalize these. For now this is only used + // by type literals, so we rely on the lexer picking some consistent rule. + return context.AddInst( + node_id, + {.type_id = context.GetBuiltinType(SemIR::BuiltinInstKind::BigIntType), + .int_id = int_id}); +} + auto HandleParseNode(Context& context, Parse::IntLiteralId node_id) -> bool { // Convert the literal to i32. // TODO: Form an integer literal value and a corresponding type here instead. @@ -134,7 +147,7 @@ static auto HandleIntOrUnsignedIntTypeLiteral(Context& context, node_id, IntWidthNotMultipleOf8, int_kind.is_signed(), llvm::APSInt(context.ints().Get(size_id), /*isUnsigned=*/true)); } - auto width_id = MakeI32Literal(context, node_id, size_id); + auto width_id = MakeBigIntLiteral(context, node_id, size_id); auto fn_inst_id = context.LookupNameInCore( node_id, int_kind == SemIR::IntKind::Signed ? "Int" : "UInt"); auto type_inst_id = PerformCall(context, node_id, fn_inst_id, {width_id}); @@ -175,7 +188,7 @@ auto HandleParseNode(Context& context, Parse::FloatTypeLiteralId node_id) } auto tok_id = context.parse_tree().node_token(node_id); auto size_id = context.tokens().GetTypeLiteralSize(tok_id); - auto width_id = MakeI32Literal(context, node_id, size_id); + auto width_id = MakeBigIntLiteral(context, node_id, size_id); auto fn_inst_id = context.LookupNameInCore(node_id, "Float"); auto type_inst_id = PerformCall(context, node_id, fn_inst_id, {width_id}); context.node_stack().Push(node_id, type_inst_id); diff --git a/toolchain/check/testdata/array/base.carbon b/toolchain/check/testdata/array/base.carbon index 1c70499378f2..ae72a9f381f8 100644 --- a/toolchain/check/testdata/array/base.carbon +++ b/toolchain/check/testdata/array/base.carbon @@ -24,7 +24,7 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %.5: type = tuple_type (i32) [template] // CHECK:STDOUT: %.6: i32 = int_literal 0 [template] // CHECK:STDOUT: %array.1: %.3 = tuple_value (%.2) [template] -// CHECK:STDOUT: %.7: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.7: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.8: i32 = int_literal 2 [template] @@ -58,7 +58,7 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -76,7 +76,7 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: %.loc11_15: type = array_type %.loc11_14, i32 [template = constants.%.3] // CHECK:STDOUT: %a.var: ref %.3 = var a // CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var -// CHECK:STDOUT: %.loc12_9.1: i32 = int_literal 64 [template = constants.%.7] +// CHECK:STDOUT: %.loc12_9.1: Core.BigInt = int_literal 64 [template = constants.%.7] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64] // CHECK:STDOUT: %.loc12_14: i32 = int_literal 2 [template = constants.%.8] // CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %float.make_type [template = f64] @@ -94,7 +94,7 @@ var c: [(); 5] = ((), (), (), (), (),); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/basics/builtin_types.carbon b/toolchain/check/testdata/basics/builtin_types.carbon index acb6873b4caa..abf6d2f74418 100644 --- a/toolchain/check/testdata/basics/builtin_types.carbon +++ b/toolchain/check/testdata/basics/builtin_types.carbon @@ -20,7 +20,7 @@ var test_type: type = i32; // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %.2: i32 = int_literal 0 [template] -// CHECK:STDOUT: %.3: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.3: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.4: f64 = float_literal 0.10000000000000001 [template] @@ -42,7 +42,7 @@ var test_type: type = i32; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -59,7 +59,7 @@ var test_type: type = i32; // CHECK:STDOUT: %.loc11_15.2: type = converted %int.make_type_32, %.loc11_15.1 [template = i32] // CHECK:STDOUT: %test_i32.var: ref i32 = var test_i32 // CHECK:STDOUT: %test_i32: ref i32 = bind_name test_i32, %test_i32.var -// CHECK:STDOUT: %.loc12_15.1: i32 = int_literal 64 [template = constants.%.3] +// CHECK:STDOUT: %.loc12_15.1: Core.BigInt = int_literal 64 [template = constants.%.3] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_15.1) [template = f64] // CHECK:STDOUT: %.loc12_15.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc12_15.3: type = converted %float.make_type, %.loc12_15.2 [template = f64] @@ -71,7 +71,7 @@ var test_type: type = i32; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index 50b3c07be21a..e227bbabb8f8 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -43,7 +43,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.2: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: } @@ -62,7 +62,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -84,11 +84,11 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: %int.make_type_32.loc27: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc27_8.1: type = value_of_initializer %int.make_type_32.loc27 [template = i32] // CHECK:STDOUT: %.loc27_8.2: type = converted %int.make_type_32.loc27, %.loc27_8.1 [template = i32] -// CHECK:STDOUT: %.loc33_8.1: i32 = int_literal 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc33_8.1: Core.BigInt = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type.loc33: init type = call constants.%Float(%.loc33_8.1) [template = f64] // CHECK:STDOUT: %.loc33_8.2: type = value_of_initializer %float.make_type.loc33 [template = f64] // CHECK:STDOUT: %.loc33_8.3: type = converted %float.make_type.loc33, %.loc33_8.2 [template = f64] -// CHECK:STDOUT: %.loc38_8.1: i32 = int_literal 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc38_8.1: Core.BigInt = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type.loc38: init type = call constants.%Float(%.loc38_8.1) [template = f64] // CHECK:STDOUT: %.loc38_8.2: type = value_of_initializer %float.make_type.loc38 [template = f64] // CHECK:STDOUT: %.loc38_8.3: type = converted %float.make_type.loc38, %.loc38_8.2 [template = f64] @@ -96,7 +96,7 @@ let e: f64 = 5.0e39999999999999999993; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/basics/numeric_literals.carbon b/toolchain/check/testdata/basics/numeric_literals.carbon index a652d5b218ad..7a3a0954224d 100644 --- a/toolchain/check/testdata/basics/numeric_literals.carbon +++ b/toolchain/check/testdata/basics/numeric_literals.carbon @@ -51,7 +51,7 @@ fn F() { // CHECK:STDOUT: %.13: i32 = int_literal 4 [template] // CHECK:STDOUT: %.14: i32 = int_literal 5 [template] // CHECK:STDOUT: %array.1: %.3 = tuple_value (%.5, %.6, %.5, %.5, %.7, %.7) [template] -// CHECK:STDOUT: %.15: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.15: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.16: type = array_type %.2, f64 [template] @@ -80,7 +80,7 @@ fn F() { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -129,7 +129,7 @@ fn F() { // CHECK:STDOUT: %.loc21_3.20: init %.3 = array_init (%.loc21_3.4, %.loc21_3.7, %.loc21_3.10, %.loc21_3.13, %.loc21_3.16, %.loc21_3.19) to %ints.var [template = constants.%array.1] // CHECK:STDOUT: %.loc21_4: init %.3 = converted %.loc21_3.1, %.loc21_3.20 [template = constants.%array.1] // CHECK:STDOUT: assign %ints.var, %.loc21_4 -// CHECK:STDOUT: %.loc22_16.1: i32 = int_literal 64 [template = constants.%.15] +// CHECK:STDOUT: %.loc22_16.1: Core.BigInt = int_literal 64 [template = constants.%.15] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc22_16.1) [template = f64] // CHECK:STDOUT: %.loc22_21: i32 = int_literal 6 [template = constants.%.2] // CHECK:STDOUT: %.loc22_16.2: type = value_of_initializer %float.make_type [template = f64] @@ -170,5 +170,5 @@ fn F() { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/basics/type_literals.carbon b/toolchain/check/testdata/basics/type_literals.carbon index 54ae4cdc31b1..c828b9d0e029 100644 --- a/toolchain/check/testdata/basics/type_literals.carbon +++ b/toolchain/check/testdata/basics/type_literals.carbon @@ -130,14 +130,14 @@ var test_f128: f128; // CHECK:STDOUT: --- iN.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 8 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 8 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.4: i32 = int_literal 16 [template] +// CHECK:STDOUT: %.4: Core.BigInt = int_literal 16 [template] // CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %.6: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.6: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %.7: type = int_type signed, %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -153,7 +153,7 @@ var test_f128: f128; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %Int.type = import_ref Core//prelude/types, inst+29, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref: %Int.type = import_ref Core//prelude/types, inst+30, loaded [template = constants.%Int] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -164,19 +164,19 @@ var test_f128: f128; // CHECK:STDOUT: .test_i64 = %test_i64 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 8 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_14.1: Core.BigInt = int_literal 8 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_signed.loc3: init type = call constants.%Int(%.loc3_14.1) [template = constants.%.3] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_signed.loc3 [template = constants.%.3] // CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_signed.loc3, %.loc3_14.2 [template = constants.%.3] // CHECK:STDOUT: %test_i8.var: ref %.3 = var test_i8 // CHECK:STDOUT: %test_i8: ref %.3 = bind_name test_i8, %test_i8.var -// CHECK:STDOUT: %.loc4_15.1: i32 = int_literal 16 [template = constants.%.4] +// CHECK:STDOUT: %.loc4_15.1: Core.BigInt = int_literal 16 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_signed.loc4: init type = call constants.%Int(%.loc4_15.1) [template = constants.%.5] // CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_signed.loc4 [template = constants.%.5] // CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_signed.loc4, %.loc4_15.2 [template = constants.%.5] // CHECK:STDOUT: %test_i16.var: ref %.5 = var test_i16 // CHECK:STDOUT: %test_i16: ref %.5 = bind_name test_i16, %test_i16.var -// CHECK:STDOUT: %.loc5_15.1: i32 = int_literal 64 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_15.1: Core.BigInt = int_literal 64 [template = constants.%.6] // CHECK:STDOUT: %int.make_type_signed.loc5: init type = call constants.%Int(%.loc5_15.1) [template = constants.%.7] // CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_signed.loc5 [template = constants.%.7] // CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_signed.loc5, %.loc5_15.2 [template = constants.%.7] @@ -184,36 +184,36 @@ var test_f128: f128; // CHECK:STDOUT: %test_i64: ref %.7 = bind_name test_i64, %test_i64.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Int(%size.param_patt: i32) -> type = "int.make_type_signed"; +// CHECK:STDOUT: fn @Int(%size.param_patt: Core.BigInt) -> type = "int.make_type_signed"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_iN_bad_width.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 1 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 1 [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type signed, %.1 [template] -// CHECK:STDOUT: %.4: i32 = int_literal 15 [template] +// CHECK:STDOUT: %.4: Core.BigInt = int_literal 15 [template] // CHECK:STDOUT: %.5: type = int_type signed, %.4 [template] -// CHECK:STDOUT: %.6: i32 = int_literal 1000000000 [template] +// CHECK:STDOUT: %.6: Core.BigInt = int_literal 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} // CHECK:STDOUT: -// CHECK:STDOUT: fn @Int(%size.param_patt: i32) -> type = "int.make_type_signed"; +// CHECK:STDOUT: fn @Int(%size.param_patt: Core.BigInt) -> type = "int.make_type_signed"; // CHECK:STDOUT: // CHECK:STDOUT: --- uN.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 8 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 8 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type unsigned, %.1 [template] -// CHECK:STDOUT: %.4: i32 = int_literal 16 [template] +// CHECK:STDOUT: %.4: Core.BigInt = int_literal 16 [template] // CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] -// CHECK:STDOUT: %.6: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.6: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %.7: type = int_type unsigned, %.6 [template] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -229,7 +229,7 @@ var test_f128: f128; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %UInt.type = import_ref Core//prelude/types, inst+43, loaded [template = constants.%UInt] +// CHECK:STDOUT: %import_ref: %UInt.type = import_ref Core//prelude/types, inst+45, loaded [template = constants.%UInt] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -240,19 +240,19 @@ var test_f128: f128; // CHECK:STDOUT: .test_u64 = %test_u64 // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 8 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_14.1: Core.BigInt = int_literal 8 [template = constants.%.1] // CHECK:STDOUT: %int.make_type_unsigned.loc3: init type = call constants.%UInt(%.loc3_14.1) [template = constants.%.3] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %int.make_type_unsigned.loc3 [template = constants.%.3] // CHECK:STDOUT: %.loc3_14.3: type = converted %int.make_type_unsigned.loc3, %.loc3_14.2 [template = constants.%.3] // CHECK:STDOUT: %test_u8.var: ref %.3 = var test_u8 // CHECK:STDOUT: %test_u8: ref %.3 = bind_name test_u8, %test_u8.var -// CHECK:STDOUT: %.loc4_15.1: i32 = int_literal 16 [template = constants.%.4] +// CHECK:STDOUT: %.loc4_15.1: Core.BigInt = int_literal 16 [template = constants.%.4] // CHECK:STDOUT: %int.make_type_unsigned.loc4: init type = call constants.%UInt(%.loc4_15.1) [template = constants.%.5] // CHECK:STDOUT: %.loc4_15.2: type = value_of_initializer %int.make_type_unsigned.loc4 [template = constants.%.5] // CHECK:STDOUT: %.loc4_15.3: type = converted %int.make_type_unsigned.loc4, %.loc4_15.2 [template = constants.%.5] // CHECK:STDOUT: %test_u16.var: ref %.5 = var test_u16 // CHECK:STDOUT: %test_u16: ref %.5 = bind_name test_u16, %test_u16.var -// CHECK:STDOUT: %.loc5_15.1: i32 = int_literal 64 [template = constants.%.6] +// CHECK:STDOUT: %.loc5_15.1: Core.BigInt = int_literal 64 [template = constants.%.6] // CHECK:STDOUT: %int.make_type_unsigned.loc5: init type = call constants.%UInt(%.loc5_15.1) [template = constants.%.7] // CHECK:STDOUT: %.loc5_15.2: type = value_of_initializer %int.make_type_unsigned.loc5 [template = constants.%.7] // CHECK:STDOUT: %.loc5_15.3: type = converted %int.make_type_unsigned.loc5, %.loc5_15.2 [template = constants.%.7] @@ -260,24 +260,24 @@ var test_f128: f128; // CHECK:STDOUT: %test_u64: ref %.7 = bind_name test_u64, %test_u64.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @UInt(%size.param_patt: i32) -> type = "int.make_type_unsigned"; +// CHECK:STDOUT: fn @UInt(%size.param_patt: Core.BigInt) -> type = "int.make_type_unsigned"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_uN_bad_width.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 1 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 1 [template] // CHECK:STDOUT: %UInt.type: type = fn_type @UInt [template] // CHECK:STDOUT: %.2: type = tuple_type () [template] // CHECK:STDOUT: %UInt: %UInt.type = struct_value () [template] // CHECK:STDOUT: %.3: type = int_type unsigned, %.1 [template] -// CHECK:STDOUT: %.4: i32 = int_literal 15 [template] +// CHECK:STDOUT: %.4: Core.BigInt = int_literal 15 [template] // CHECK:STDOUT: %.5: type = int_type unsigned, %.4 [template] -// CHECK:STDOUT: %.6: i32 = int_literal 1000000000 [template] +// CHECK:STDOUT: %.6: Core.BigInt = int_literal 1000000000 [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file {} // CHECK:STDOUT: -// CHECK:STDOUT: fn @UInt(%size.param_patt: i32) -> type = "int.make_type_unsigned"; +// CHECK:STDOUT: fn @UInt(%size.param_patt: Core.BigInt) -> type = "int.make_type_unsigned"; // CHECK:STDOUT: // CHECK:STDOUT: --- fail_fN_bad_width.carbon // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/add.carbon b/toolchain/check/testdata/builtins/float/add.carbon index 72a3b32cd9a2..069b49d6242f 100644 --- a/toolchain/check/testdata/builtins/float/add.carbon +++ b/toolchain/check/testdata/builtins/float/add.carbon @@ -53,7 +53,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_add.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -78,7 +78,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -97,15 +97,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_11.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] @@ -124,15 +124,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_35.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] @@ -143,7 +143,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_8.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type, %.loc8_8.2 [template = f64] @@ -151,7 +151,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %x: ref f64 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Add(%a.param_patt: f64, %b.param_patt: f64) -> f64 = "float.add"; // CHECK:STDOUT: @@ -179,7 +179,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -214,7 +214,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -236,11 +236,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] @@ -259,19 +259,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_15.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_23.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_31.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_39.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] @@ -292,11 +292,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_21.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_29.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] @@ -318,15 +318,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_17.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_33.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] @@ -343,11 +343,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_33.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] @@ -366,19 +366,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_26.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_34.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_42.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_50.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] @@ -399,11 +399,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_32.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_40.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] @@ -419,7 +419,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TooFew(%a.param_patt: f64) -> f64; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/div.carbon b/toolchain/check/testdata/builtins/float/div.carbon index f3b255b96def..85c6137c132c 100644 --- a/toolchain/check/testdata/builtins/float/div.carbon +++ b/toolchain/check/testdata/builtins/float/div.carbon @@ -55,7 +55,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_div.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -84,7 +84,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -105,15 +105,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_11.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] @@ -132,15 +132,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_35.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] @@ -151,23 +151,23 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_8.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type.loc8 [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type.loc8, %.loc8_8.2 [template = f64] // CHECK:STDOUT: %a.var: ref f64 = var a // CHECK:STDOUT: %a: ref f64 = bind_name a, %a.var -// CHECK:STDOUT: %.loc9_8.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc9_8.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc9: init type = call constants.%Float(%.loc9_8.1) [template = f64] // CHECK:STDOUT: %.loc9_8.2: type = value_of_initializer %float.make_type.loc9 [template = f64] // CHECK:STDOUT: %.loc9_8.3: type = converted %float.make_type.loc9, %.loc9_8.2 [template = f64] -// CHECK:STDOUT: %.loc10_8.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc10_8.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc10: init type = call constants.%Float(%.loc10_8.1) [template = f64] // CHECK:STDOUT: %.loc10_8.2: type = value_of_initializer %float.make_type.loc10 [template = f64] // CHECK:STDOUT: %.loc10_8.3: type = converted %float.make_type.loc10, %.loc10_8.2 [template = f64] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Div(%a.param_patt: f64, %b.param_patt: f64) -> f64 = "float.div"; // CHECK:STDOUT: @@ -209,7 +209,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -244,7 +244,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -266,11 +266,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] @@ -289,19 +289,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_15.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_23.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_31.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_39.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] @@ -322,11 +322,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_21.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_29.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] @@ -348,15 +348,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_17.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_33.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] @@ -373,11 +373,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_33.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] @@ -396,19 +396,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_26.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_34.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_42.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_50.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] @@ -429,11 +429,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_32.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_40.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] @@ -449,7 +449,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TooFew(%a.param_patt: f64) -> f64; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/eq.carbon b/toolchain/check/testdata/builtins/float/eq.carbon index 2836138eacb5..153918b2074b 100644 --- a/toolchain/check/testdata/builtins/float/eq.carbon +++ b/toolchain/check/testdata/builtins/float/eq.carbon @@ -36,7 +36,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: --- float_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -72,7 +72,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,11 +94,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_10.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_10.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_10: init type = call constants.%Float(%.loc2_10.1) [template = f64] // CHECK:STDOUT: %.loc2_10.2: type = value_of_initializer %float.make_type.loc2_10 [template = f64] // CHECK:STDOUT: %.loc2_10.3: type = converted %float.make_type.loc2_10, %.loc2_10.2 [template = f64] -// CHECK:STDOUT: %.loc2_18.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_18.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_18: init type = call constants.%Float(%.loc2_18.1) [template = f64] // CHECK:STDOUT: %.loc2_18.2: type = value_of_initializer %float.make_type.loc2_18 [template = f64] // CHECK:STDOUT: %.loc2_18.3: type = converted %float.make_type.loc2_18, %.loc2_18.2 [template = f64] @@ -135,11 +135,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc12_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%.loc12_19.1) [template = f64] // CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %float.make_type.loc12_19 [template = f64] // CHECK:STDOUT: %.loc12_19.3: type = converted %float.make_type.loc12_19, %.loc12_19.2 [template = f64] -// CHECK:STDOUT: %.loc12_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc12_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%.loc12_27.1) [template = f64] // CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %float.make_type.loc12_27 [template = f64] // CHECK:STDOUT: %.loc12_27.3: type = converted %float.make_type.loc12_27, %.loc12_27.2 [template = f64] @@ -169,7 +169,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: .Self = constants.%False // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: @@ -232,7 +232,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -252,7 +252,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -269,15 +269,15 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%.loc7_19.1) [template = f64] // CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %float.make_type.loc7_19 [template = f64] // CHECK:STDOUT: %.loc7_19.3: type = converted %float.make_type.loc7_19, %.loc7_19.2 [template = f64] -// CHECK:STDOUT: %.loc7_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%.loc7_27.1) [template = f64] // CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %float.make_type.loc7_27 [template = f64] // CHECK:STDOUT: %.loc7_27.3: type = converted %float.make_type.loc7_27, %.loc7_27.2 [template = f64] -// CHECK:STDOUT: %.loc7_35.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_35.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%.loc7_35.1) [template = f64] // CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %float.make_type.loc7_35 [template = f64] // CHECK:STDOUT: %.loc7_35.3: type = converted %float.make_type.loc7_35, %.loc7_35.2 [template = f64] @@ -290,7 +290,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @WrongResult(%a.param_patt: f64, %b.param_patt: f64) -> f64; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/greater.carbon b/toolchain/check/testdata/builtins/float/greater.carbon index 4af9fe44ed63..5ac20481f95f 100644 --- a/toolchain/check/testdata/builtins/float/greater.carbon +++ b/toolchain/check/testdata/builtins/float/greater.carbon @@ -31,7 +31,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_greater.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -71,7 +71,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,11 +94,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_15.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_15.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_15: init type = call constants.%Float(%.loc2_15.1) [template = f64] // CHECK:STDOUT: %.loc2_15.2: type = value_of_initializer %float.make_type.loc2_15 [template = f64] // CHECK:STDOUT: %.loc2_15.3: type = converted %float.make_type.loc2_15, %.loc2_15.2 [template = f64] -// CHECK:STDOUT: %.loc2_23.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_23.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_23: init type = call constants.%Float(%.loc2_23.1) [template = f64] // CHECK:STDOUT: %.loc2_23.2: type = value_of_initializer %float.make_type.loc2_23 [template = f64] // CHECK:STDOUT: %.loc2_23.3: type = converted %float.make_type.loc2_23, %.loc2_23.2 [template = f64] @@ -118,11 +118,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] @@ -154,11 +154,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] @@ -188,7 +188,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .Self = constants.%False // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/greater_eq.carbon b/toolchain/check/testdata/builtins/float/greater_eq.carbon index 1aff290b929b..c8e23c333323 100644 --- a/toolchain/check/testdata/builtins/float/greater_eq.carbon +++ b/toolchain/check/testdata/builtins/float/greater_eq.carbon @@ -31,7 +31,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_greater_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -71,7 +71,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,11 +94,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_17.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_17.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_17: init type = call constants.%Float(%.loc2_17.1) [template = f64] // CHECK:STDOUT: %.loc2_17.2: type = value_of_initializer %float.make_type.loc2_17 [template = f64] // CHECK:STDOUT: %.loc2_17.3: type = converted %float.make_type.loc2_17, %.loc2_17.2 [template = f64] -// CHECK:STDOUT: %.loc2_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_25: init type = call constants.%Float(%.loc2_25.1) [template = f64] // CHECK:STDOUT: %.loc2_25.2: type = value_of_initializer %float.make_type.loc2_25 [template = f64] // CHECK:STDOUT: %.loc2_25.3: type = converted %float.make_type.loc2_25, %.loc2_25.2 [template = f64] @@ -118,11 +118,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] @@ -154,11 +154,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] @@ -188,7 +188,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .Self = constants.%False // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/less.carbon b/toolchain/check/testdata/builtins/float/less.carbon index ee242f68826c..a66d9956e67a 100644 --- a/toolchain/check/testdata/builtins/float/less.carbon +++ b/toolchain/check/testdata/builtins/float/less.carbon @@ -31,7 +31,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_less.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -71,7 +71,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,11 +94,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_12.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_12.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_12: init type = call constants.%Float(%.loc2_12.1) [template = f64] // CHECK:STDOUT: %.loc2_12.2: type = value_of_initializer %float.make_type.loc2_12 [template = f64] // CHECK:STDOUT: %.loc2_12.3: type = converted %float.make_type.loc2_12, %.loc2_12.2 [template = f64] -// CHECK:STDOUT: %.loc2_20.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_20.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_20: init type = call constants.%Float(%.loc2_20.1) [template = f64] // CHECK:STDOUT: %.loc2_20.2: type = value_of_initializer %float.make_type.loc2_20 [template = f64] // CHECK:STDOUT: %.loc2_20.3: type = converted %float.make_type.loc2_20, %.loc2_20.2 [template = f64] @@ -118,11 +118,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] @@ -154,11 +154,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] @@ -188,7 +188,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .Self = constants.%False // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/less_eq.carbon b/toolchain/check/testdata/builtins/float/less_eq.carbon index 8e3681c1b400..a0f293324223 100644 --- a/toolchain/check/testdata/builtins/float/less_eq.carbon +++ b/toolchain/check/testdata/builtins/float/less_eq.carbon @@ -31,7 +31,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_less_eq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -71,7 +71,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,11 +94,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%.loc2_14.1) [template = f64] // CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %float.make_type.loc2_14 [template = f64] // CHECK:STDOUT: %.loc2_14.3: type = converted %float.make_type.loc2_14, %.loc2_14.2 [template = f64] -// CHECK:STDOUT: %.loc2_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%.loc2_22.1) [template = f64] // CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %float.make_type.loc2_22 [template = f64] // CHECK:STDOUT: %.loc2_22.3: type = converted %float.make_type.loc2_22, %.loc2_22.2 [template = f64] @@ -118,11 +118,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc3_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_14: init type = call constants.%Float(%.loc3_14.1) [template = f64] // CHECK:STDOUT: %.loc3_14.2: type = value_of_initializer %float.make_type.loc3_14 [template = f64] // CHECK:STDOUT: %.loc3_14.3: type = converted %float.make_type.loc3_14, %.loc3_14.2 [template = f64] -// CHECK:STDOUT: %.loc3_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc3_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc3_22: init type = call constants.%Float(%.loc3_22.1) [template = f64] // CHECK:STDOUT: %.loc3_22.2: type = value_of_initializer %float.make_type.loc3_22 [template = f64] // CHECK:STDOUT: %.loc3_22.3: type = converted %float.make_type.loc3_22, %.loc3_22.2 [template = f64] @@ -154,11 +154,11 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc16_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_19: init type = call constants.%Float(%.loc16_19.1) [template = f64] // CHECK:STDOUT: %.loc16_19.2: type = value_of_initializer %float.make_type.loc16_19 [template = f64] // CHECK:STDOUT: %.loc16_19.3: type = converted %float.make_type.loc16_19, %.loc16_19.2 [template = f64] -// CHECK:STDOUT: %.loc16_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc16_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc16_27: init type = call constants.%Float(%.loc16_27.1) [template = f64] // CHECK:STDOUT: %.loc16_27.2: type = value_of_initializer %float.make_type.loc16_27 [template = f64] // CHECK:STDOUT: %.loc16_27.3: type = converted %float.make_type.loc16_27, %.loc16_27.2 [template = f64] @@ -188,7 +188,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { // CHECK:STDOUT: .Self = constants.%False // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/mul.carbon b/toolchain/check/testdata/builtins/float/mul.carbon index 063e2bf9ca86..d1dd7735229d 100644 --- a/toolchain/check/testdata/builtins/float/mul.carbon +++ b/toolchain/check/testdata/builtins/float/mul.carbon @@ -53,7 +53,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- mul_sub.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -78,7 +78,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -97,15 +97,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_11.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] @@ -124,15 +124,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_35.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] @@ -143,7 +143,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_8.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type, %.loc8_8.2 [template = f64] @@ -151,7 +151,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %x: ref f64 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Mul(%a.param_patt: f64, %b.param_patt: f64) -> f64 = "float.mul"; // CHECK:STDOUT: @@ -179,7 +179,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -214,7 +214,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -236,11 +236,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] @@ -259,19 +259,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_15.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_23.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_31.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_39.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] @@ -292,11 +292,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_21.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_29.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] @@ -318,15 +318,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_17.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_33.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] @@ -343,11 +343,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_33.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] @@ -366,19 +366,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_26.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_34.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_42.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_50.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] @@ -399,11 +399,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_32.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_40.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] @@ -419,7 +419,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TooFew(%a.param_patt: f64) -> f64; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/negate.carbon b/toolchain/check/testdata/builtins/float/negate.carbon index 8524cbdc92ea..82fb60758240 100644 --- a/toolchain/check/testdata/builtins/float/negate.carbon +++ b/toolchain/check/testdata/builtins/float/negate.carbon @@ -74,7 +74,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_negate.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -98,7 +98,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -115,11 +115,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_14: init type = call constants.%Float(%.loc2_14.1) [template = f64] // CHECK:STDOUT: %.loc2_14.2: type = value_of_initializer %float.make_type.loc2_14 [template = f64] // CHECK:STDOUT: %.loc2_14.3: type = converted %float.make_type.loc2_14, %.loc2_14.2 [template = f64] -// CHECK:STDOUT: %.loc2_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_22: init type = call constants.%Float(%.loc2_22.1) [template = f64] // CHECK:STDOUT: %.loc2_22.2: type = value_of_initializer %float.make_type.loc2_22 [template = f64] // CHECK:STDOUT: %.loc2_22.3: type = converted %float.make_type.loc2_22, %.loc2_22.2 [template = f64] @@ -136,15 +136,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_35.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] @@ -155,13 +155,13 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_8.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type, %.loc8_8.2 [template = f64] // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Negate(%a.param_patt: f64) -> f64 = "float.negate"; // CHECK:STDOUT: @@ -189,7 +189,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -224,7 +224,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -244,7 +244,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // 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: %.loc8_16.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_16.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_16.1) [template = f64] // CHECK:STDOUT: %.loc8_16.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc8_16.3: type = converted %float.make_type, %.loc8_16.2 [template = f64] @@ -259,15 +259,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_15.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_23.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_31.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] @@ -284,7 +284,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_21.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_21.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc18_21.1) [template = f64] // CHECK:STDOUT: %.loc18_21.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc18_21.3: type = converted %float.make_type, %.loc18_21.2 [template = f64] @@ -302,11 +302,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc19_17.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc19_17.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc19_17: init type = call constants.%Float(%.loc19_17.1) [template = f64] // CHECK:STDOUT: %.loc19_17.2: type = value_of_initializer %float.make_type.loc19_17 [template = f64] // CHECK:STDOUT: %.loc19_17.3: type = converted %float.make_type.loc19_17, %.loc19_17.2 [template = f64] -// CHECK:STDOUT: %.loc19_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc19_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc19_25: init type = call constants.%Float(%.loc19_25.1) [template = f64] // CHECK:STDOUT: %.loc19_25.2: type = value_of_initializer %float.make_type.loc19_25 [template = f64] // CHECK:STDOUT: %.loc19_25.3: type = converted %float.make_type.loc19_25, %.loc19_25.2 [template = f64] @@ -321,11 +321,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc21_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc21_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc21_25: init type = call constants.%Float(%.loc21_25.1) [template = f64] // CHECK:STDOUT: %.loc21_25.2: type = value_of_initializer %float.make_type.loc21_25 [template = f64] // CHECK:STDOUT: %.loc21_25.3: type = converted %float.make_type.loc21_25, %.loc21_25.2 [template = f64] -// CHECK:STDOUT: %.loc21_33.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc21_33.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc21_33: init type = call constants.%Float(%.loc21_33.1) [template = f64] // CHECK:STDOUT: %.loc21_33.2: type = value_of_initializer %float.make_type.loc21_33 [template = f64] // CHECK:STDOUT: %.loc21_33.3: type = converted %float.make_type.loc21_33, %.loc21_33.2 [template = f64] @@ -344,19 +344,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc32_26.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc32_26.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc32_26: init type = call constants.%Float(%.loc32_26.1) [template = f64] // CHECK:STDOUT: %.loc32_26.2: type = value_of_initializer %float.make_type.loc32_26 [template = f64] // CHECK:STDOUT: %.loc32_26.3: type = converted %float.make_type.loc32_26, %.loc32_26.2 [template = f64] -// CHECK:STDOUT: %.loc32_34.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc32_34.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc32_34: init type = call constants.%Float(%.loc32_34.1) [template = f64] // CHECK:STDOUT: %.loc32_34.2: type = value_of_initializer %float.make_type.loc32_34 [template = f64] // CHECK:STDOUT: %.loc32_34.3: type = converted %float.make_type.loc32_34, %.loc32_34.2 [template = f64] -// CHECK:STDOUT: %.loc32_42.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc32_42.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc32_42: init type = call constants.%Float(%.loc32_42.1) [template = f64] // CHECK:STDOUT: %.loc32_42.2: type = value_of_initializer %float.make_type.loc32_42 [template = f64] // CHECK:STDOUT: %.loc32_42.3: type = converted %float.make_type.loc32_42, %.loc32_42.2 [template = f64] -// CHECK:STDOUT: %.loc32_50.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc32_50.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc32_50: init type = call constants.%Float(%.loc32_50.1) [template = f64] // CHECK:STDOUT: %.loc32_50.2: type = value_of_initializer %float.make_type.loc32_50 [template = f64] // CHECK:STDOUT: %.loc32_50.3: type = converted %float.make_type.loc32_50, %.loc32_50.2 [template = f64] @@ -377,11 +377,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc43_32.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc43_32.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc43_32: init type = call constants.%Float(%.loc43_32.1) [template = f64] // CHECK:STDOUT: %.loc43_32.2: type = value_of_initializer %float.make_type.loc43_32 [template = f64] // CHECK:STDOUT: %.loc43_32.3: type = converted %float.make_type.loc43_32, %.loc43_32.2 [template = f64] -// CHECK:STDOUT: %.loc43_40.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc43_40.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc43_40: init type = call constants.%Float(%.loc43_40.1) [template = f64] // CHECK:STDOUT: %.loc43_40.2: type = value_of_initializer %float.make_type.loc43_40 [template = f64] // CHECK:STDOUT: %.loc43_40.3: type = converted %float.make_type.loc43_40, %.loc43_40.2 [template = f64] @@ -397,7 +397,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TooFew() -> f64; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/neq.carbon b/toolchain/check/testdata/builtins/float/neq.carbon index 74937981f13e..000eda85b1cb 100644 --- a/toolchain/check/testdata/builtins/float/neq.carbon +++ b/toolchain/check/testdata/builtins/float/neq.carbon @@ -36,7 +36,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: --- float_neq.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -72,7 +72,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -94,11 +94,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_11.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] @@ -135,11 +135,11 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc12_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc12_19: init type = call constants.%Float(%.loc12_19.1) [template = f64] // CHECK:STDOUT: %.loc12_19.2: type = value_of_initializer %float.make_type.loc12_19 [template = f64] // CHECK:STDOUT: %.loc12_19.3: type = converted %float.make_type.loc12_19, %.loc12_19.2 [template = f64] -// CHECK:STDOUT: %.loc12_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc12_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc12_27: init type = call constants.%Float(%.loc12_27.1) [template = f64] // CHECK:STDOUT: %.loc12_27.2: type = value_of_initializer %float.make_type.loc12_27 [template = f64] // CHECK:STDOUT: %.loc12_27.3: type = converted %float.make_type.loc12_27, %.loc12_27.2 [template = f64] @@ -169,7 +169,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: .Self = constants.%False // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Bool() -> type = "bool.make_type"; // CHECK:STDOUT: @@ -232,7 +232,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -252,7 +252,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -269,15 +269,15 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc7_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_19: init type = call constants.%Float(%.loc7_19.1) [template = f64] // CHECK:STDOUT: %.loc7_19.2: type = value_of_initializer %float.make_type.loc7_19 [template = f64] // CHECK:STDOUT: %.loc7_19.3: type = converted %float.make_type.loc7_19, %.loc7_19.2 [template = f64] -// CHECK:STDOUT: %.loc7_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_27: init type = call constants.%Float(%.loc7_27.1) [template = f64] // CHECK:STDOUT: %.loc7_27.2: type = value_of_initializer %float.make_type.loc7_27 [template = f64] // CHECK:STDOUT: %.loc7_27.3: type = converted %float.make_type.loc7_27, %.loc7_27.2 [template = f64] -// CHECK:STDOUT: %.loc7_35.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc7_35.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc7_35: init type = call constants.%Float(%.loc7_35.1) [template = f64] // CHECK:STDOUT: %.loc7_35.2: type = value_of_initializer %float.make_type.loc7_35 [template = f64] // CHECK:STDOUT: %.loc7_35.3: type = converted %float.make_type.loc7_35, %.loc7_35.2 [template = f64] @@ -290,7 +290,7 @@ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @WrongResult(%a.param_patt: f64, %b.param_patt: f64) -> f64; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/builtins/float/sub.carbon b/toolchain/check/testdata/builtins/float/sub.carbon index 3ed38410eb0b..f03074aedc52 100644 --- a/toolchain/check/testdata/builtins/float/sub.carbon +++ b/toolchain/check/testdata/builtins/float/sub.carbon @@ -53,7 +53,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- float_sub.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -78,7 +78,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -97,15 +97,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc2_11.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_11.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_11: init type = call constants.%Float(%.loc2_11.1) [template = f64] // CHECK:STDOUT: %.loc2_11.2: type = value_of_initializer %float.make_type.loc2_11 [template = f64] // CHECK:STDOUT: %.loc2_11.3: type = converted %float.make_type.loc2_11, %.loc2_11.2 [template = f64] -// CHECK:STDOUT: %.loc2_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_19: init type = call constants.%Float(%.loc2_19.1) [template = f64] // CHECK:STDOUT: %.loc2_19.2: type = value_of_initializer %float.make_type.loc2_19 [template = f64] // CHECK:STDOUT: %.loc2_19.3: type = converted %float.make_type.loc2_19, %.loc2_19.2 [template = f64] -// CHECK:STDOUT: %.loc2_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc2_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc2_27: init type = call constants.%Float(%.loc2_27.1) [template = f64] // CHECK:STDOUT: %.loc2_27.2: type = value_of_initializer %float.make_type.loc2_27 [template = f64] // CHECK:STDOUT: %.loc2_27.3: type = converted %float.make_type.loc2_27, %.loc2_27.2 [template = f64] @@ -124,15 +124,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc4_19.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_19.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_19: init type = call constants.%Float(%.loc4_19.1) [template = f64] // CHECK:STDOUT: %.loc4_19.2: type = value_of_initializer %float.make_type.loc4_19 [template = f64] // CHECK:STDOUT: %.loc4_19.3: type = converted %float.make_type.loc4_19, %.loc4_19.2 [template = f64] -// CHECK:STDOUT: %.loc4_27.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_27.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_27: init type = call constants.%Float(%.loc4_27.1) [template = f64] // CHECK:STDOUT: %.loc4_27.2: type = value_of_initializer %float.make_type.loc4_27 [template = f64] // CHECK:STDOUT: %.loc4_27.3: type = converted %float.make_type.loc4_27, %.loc4_27.2 [template = f64] -// CHECK:STDOUT: %.loc4_35.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc4_35.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc4_35: init type = call constants.%Float(%.loc4_35.1) [template = f64] // CHECK:STDOUT: %.loc4_35.2: type = value_of_initializer %float.make_type.loc4_35 [template = f64] // CHECK:STDOUT: %.loc4_35.3: type = converted %float.make_type.loc4_35, %.loc4_35.2 [template = f64] @@ -143,7 +143,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.param: ref f64 = out_param runtime_param2 // CHECK:STDOUT: %return: ref f64 = return_slot %return.param // CHECK:STDOUT: } -// CHECK:STDOUT: %.loc8_8.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_8.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc8_8.1) [template = f64] // CHECK:STDOUT: %.loc8_8.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc8_8.3: type = converted %float.make_type, %.loc8_8.2 [template = f64] @@ -151,7 +151,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %x: ref f64 = bind_name x, %x.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Sub(%a.param_patt: f64, %b.param_patt: f64) -> f64 = "float.sub"; // CHECK:STDOUT: @@ -179,7 +179,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: --- fail_bad_decl.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -214,7 +214,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -236,11 +236,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_14.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_14.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_14: init type = call constants.%Float(%.loc8_14.1) [template = f64] // CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %float.make_type.loc8_14 [template = f64] // CHECK:STDOUT: %.loc8_14.3: type = converted %float.make_type.loc8_14, %.loc8_14.2 [template = f64] -// CHECK:STDOUT: %.loc8_22.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc8_22.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc8_22: init type = call constants.%Float(%.loc8_22.1) [template = f64] // CHECK:STDOUT: %.loc8_22.2: type = value_of_initializer %float.make_type.loc8_22 [template = f64] // CHECK:STDOUT: %.loc8_22.3: type = converted %float.make_type.loc8_22, %.loc8_22.2 [template = f64] @@ -259,19 +259,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc13_15.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_15.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_15: init type = call constants.%Float(%.loc13_15.1) [template = f64] // CHECK:STDOUT: %.loc13_15.2: type = value_of_initializer %float.make_type.loc13_15 [template = f64] // CHECK:STDOUT: %.loc13_15.3: type = converted %float.make_type.loc13_15, %.loc13_15.2 [template = f64] -// CHECK:STDOUT: %.loc13_23.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_23.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_23: init type = call constants.%Float(%.loc13_23.1) [template = f64] // CHECK:STDOUT: %.loc13_23.2: type = value_of_initializer %float.make_type.loc13_23 [template = f64] // CHECK:STDOUT: %.loc13_23.3: type = converted %float.make_type.loc13_23, %.loc13_23.2 [template = f64] -// CHECK:STDOUT: %.loc13_31.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_31.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_31: init type = call constants.%Float(%.loc13_31.1) [template = f64] // CHECK:STDOUT: %.loc13_31.2: type = value_of_initializer %float.make_type.loc13_31 [template = f64] // CHECK:STDOUT: %.loc13_31.3: type = converted %float.make_type.loc13_31, %.loc13_31.2 [template = f64] -// CHECK:STDOUT: %.loc13_39.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc13_39.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc13_39: init type = call constants.%Float(%.loc13_39.1) [template = f64] // CHECK:STDOUT: %.loc13_39.2: type = value_of_initializer %float.make_type.loc13_39 [template = f64] // CHECK:STDOUT: %.loc13_39.3: type = converted %float.make_type.loc13_39, %.loc13_39.2 [template = f64] @@ -292,11 +292,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc17_21.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_21.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_21: init type = call constants.%Float(%.loc17_21.1) [template = f64] // CHECK:STDOUT: %.loc17_21.2: type = value_of_initializer %float.make_type.loc17_21 [template = f64] // CHECK:STDOUT: %.loc17_21.3: type = converted %float.make_type.loc17_21, %.loc17_21.2 [template = f64] -// CHECK:STDOUT: %.loc17_29.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc17_29.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc17_29: init type = call constants.%Float(%.loc17_29.1) [template = f64] // CHECK:STDOUT: %.loc17_29.2: type = value_of_initializer %float.make_type.loc17_29 [template = f64] // CHECK:STDOUT: %.loc17_29.3: type = converted %float.make_type.loc17_29, %.loc17_29.2 [template = f64] @@ -318,15 +318,15 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc18_17.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_17.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_17: init type = call constants.%Float(%.loc18_17.1) [template = f64] // CHECK:STDOUT: %.loc18_17.2: type = value_of_initializer %float.make_type.loc18_17 [template = f64] // CHECK:STDOUT: %.loc18_17.3: type = converted %float.make_type.loc18_17, %.loc18_17.2 [template = f64] -// CHECK:STDOUT: %.loc18_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_25: init type = call constants.%Float(%.loc18_25.1) [template = f64] // CHECK:STDOUT: %.loc18_25.2: type = value_of_initializer %float.make_type.loc18_25 [template = f64] // CHECK:STDOUT: %.loc18_25.3: type = converted %float.make_type.loc18_25, %.loc18_25.2 [template = f64] -// CHECK:STDOUT: %.loc18_33.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc18_33.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc18_33: init type = call constants.%Float(%.loc18_33.1) [template = f64] // CHECK:STDOUT: %.loc18_33.2: type = value_of_initializer %float.make_type.loc18_33 [template = f64] // CHECK:STDOUT: %.loc18_33.3: type = converted %float.make_type.loc18_33, %.loc18_33.2 [template = f64] @@ -343,11 +343,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc20_25.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_25.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_25: init type = call constants.%Float(%.loc20_25.1) [template = f64] // CHECK:STDOUT: %.loc20_25.2: type = value_of_initializer %float.make_type.loc20_25 [template = f64] // CHECK:STDOUT: %.loc20_25.3: type = converted %float.make_type.loc20_25, %.loc20_25.2 [template = f64] -// CHECK:STDOUT: %.loc20_33.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc20_33.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc20_33: init type = call constants.%Float(%.loc20_33.1) [template = f64] // CHECK:STDOUT: %.loc20_33.2: type = value_of_initializer %float.make_type.loc20_33 [template = f64] // CHECK:STDOUT: %.loc20_33.3: type = converted %float.make_type.loc20_33, %.loc20_33.2 [template = f64] @@ -366,19 +366,19 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: f64 = return_slot_pattern // CHECK:STDOUT: %return.param_patt: f64 = out_param_pattern %return.patt, runtime_param3 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc24_26.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_26.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_26: init type = call constants.%Float(%.loc24_26.1) [template = f64] // CHECK:STDOUT: %.loc24_26.2: type = value_of_initializer %float.make_type.loc24_26 [template = f64] // CHECK:STDOUT: %.loc24_26.3: type = converted %float.make_type.loc24_26, %.loc24_26.2 [template = f64] -// CHECK:STDOUT: %.loc24_34.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_34.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_34: init type = call constants.%Float(%.loc24_34.1) [template = f64] // CHECK:STDOUT: %.loc24_34.2: type = value_of_initializer %float.make_type.loc24_34 [template = f64] // CHECK:STDOUT: %.loc24_34.3: type = converted %float.make_type.loc24_34, %.loc24_34.2 [template = f64] -// CHECK:STDOUT: %.loc24_42.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_42.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_42: init type = call constants.%Float(%.loc24_42.1) [template = f64] // CHECK:STDOUT: %.loc24_42.2: type = value_of_initializer %float.make_type.loc24_42 [template = f64] // CHECK:STDOUT: %.loc24_42.3: type = converted %float.make_type.loc24_42, %.loc24_42.2 [template = f64] -// CHECK:STDOUT: %.loc24_50.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc24_50.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc24_50: init type = call constants.%Float(%.loc24_50.1) [template = f64] // CHECK:STDOUT: %.loc24_50.2: type = value_of_initializer %float.make_type.loc24_50 [template = f64] // CHECK:STDOUT: %.loc24_50.3: type = converted %float.make_type.loc24_50, %.loc24_50.2 [template = f64] @@ -399,11 +399,11 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: %return.patt: bool = return_slot_pattern // CHECK:STDOUT: %return.param_patt: bool = out_param_pattern %return.patt, runtime_param2 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc28_32.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_32.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_32: init type = call constants.%Float(%.loc28_32.1) [template = f64] // CHECK:STDOUT: %.loc28_32.2: type = value_of_initializer %float.make_type.loc28_32 [template = f64] // CHECK:STDOUT: %.loc28_32.3: type = converted %float.make_type.loc28_32, %.loc28_32.2 [template = f64] -// CHECK:STDOUT: %.loc28_40.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc28_40.1: Core.BigInt = int_literal 64 [template = constants.%.1] // CHECK:STDOUT: %float.make_type.loc28_40: init type = call constants.%Float(%.loc28_40.1) [template = f64] // CHECK:STDOUT: %.loc28_40.2: type = value_of_initializer %float.make_type.loc28_40 [template = f64] // CHECK:STDOUT: %.loc28_40.3: type = converted %float.make_type.loc28_40, %.loc28_40.2 [template = f64] @@ -419,7 +419,7 @@ fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @TooFew(%a.param_patt: f64) -> f64; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index d32aec0204a4..5217f8c97719 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -12,11 +12,11 @@ library "[[@TEST_NAME]]"; -fn F[N:! i32](n: Core.Int(N)) -> i32 { +fn F[N:! Core.BigInt()](n: Core.Int(N)) -> Core.BigInt() { return N; } -fn G(a: i64) -> i32 { +fn G(a: i64) -> Core.BigInt() { return F(a); } @@ -25,31 +25,31 @@ fn G(a: i64) -> i32 { library "[[@TEST_NAME]]"; // TODO: This should pass once we accept symbolic widths for Core.Float. -// CHECK:STDERR: fail_todo_float.carbon:[[@LINE+3]]:18: error: cannot evaluate type expression [TypeExprEvaluationFailure] -// CHECK:STDERR: fn F[N:! i32](n: Core.Float(N)) -> i32 { -// CHECK:STDERR: ^~~~~~~~~~~~~ -fn F[N:! i32](n: Core.Float(N)) -> i32 { +// CHECK:STDERR: fail_todo_float.carbon:[[@LINE+3]]:28: error: cannot evaluate type expression [TypeExprEvaluationFailure] +// CHECK:STDERR: fn F[N:! Core.BigInt()](n: Core.Float(N)) -> Core.BigInt() { +// CHECK:STDERR: ^~~~~~~~~~~~~ +fn F[N:! Core.BigInt()](n: Core.Float(N)) -> Core.BigInt() { return N; } -fn G(a: f64) -> i32 { +fn G(a: f64) -> Core.BigInt() { return F(a); } // CHECK:STDOUT: --- int.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %BigInt.type: type = fn_type @BigInt [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %BigInt: %BigInt.type = struct_value () [template] +// CHECK:STDOUT: %N: Core.BigInt = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] // CHECK:STDOUT: %Int: %Int.type = struct_value () [template] // CHECK:STDOUT: %.2: type = int_type signed, %N [symbolic] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.3: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.3: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %.4: type = int_type signed, %.3 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] @@ -58,7 +58,7 @@ fn G(a: f64) -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int32 = %import_ref.1 +// CHECK:STDOUT: .BigInt = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/operators @@ -69,8 +69,8 @@ fn G(a: f64) -> i32 { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, inst+29, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.1: %BigInt.type = import_ref Core//prelude/types, inst+7, loaded [template = constants.%BigInt] +// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, inst+30, loaded [template = constants.%Int] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -81,91 +81,97 @@ fn G(a: f64) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %N.patt.loc4_6.1: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc4_6.1, runtime_param [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] -// CHECK:STDOUT: %n.patt: @F.%.loc4_26 (%.2) = binding_pattern n -// CHECK:STDOUT: %n.param_patt: @F.%.loc4_26 (%.2) = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %N.patt.loc4_6.1: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.param_patt: Core.BigInt = value_param_pattern %N.patt.loc4_6.1, runtime_param [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] +// CHECK:STDOUT: %n.patt: @F.%.loc4_36 (%.2) = binding_pattern n +// CHECK:STDOUT: %n.param_patt: @F.%.loc4_36 (%.2) = value_param_pattern %n.patt, runtime_param0 +// CHECK:STDOUT: %return.patt: Core.BigInt = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: Core.BigInt = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int.make_type_32.loc4_10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_10.1: type = value_of_initializer %int.make_type_32.loc4_10 [template = i32] -// CHECK:STDOUT: %.loc4_10.2: type = converted %int.make_type_32.loc4_10, %.loc4_10.1 [template = i32] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %Core.ref.loc4_10: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %BigInt.ref.loc4_14: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt] +// CHECK:STDOUT: %big_int.make_type.loc4_21: init type = call %BigInt.ref.loc4_14() [template = Core.BigInt] +// CHECK:STDOUT: %.loc4_22.1: type = value_of_initializer %big_int.make_type.loc4_21 [template = Core.BigInt] +// CHECK:STDOUT: %.loc4_22.2: type = converted %big_int.make_type.loc4_21, %.loc4_22.1 [template = Core.BigInt] +// CHECK:STDOUT: %Core.ref.loc4_28: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %N.ref.loc4: i32 = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref.loc4) [symbolic = %.loc4_26 (constants.%.2)] -// CHECK:STDOUT: %.loc4_28.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc4_26 (constants.%.2)] -// CHECK:STDOUT: %.loc4_28.2: type = converted %int.make_type_signed, %.loc4_28.1 [symbolic = %.loc4_26 (constants.%.2)] -// CHECK:STDOUT: %int.make_type_32.loc4_34: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_34.1: type = value_of_initializer %int.make_type_32.loc4_34 [template = i32] -// CHECK:STDOUT: %.loc4_34.2: type = converted %int.make_type_32.loc4_34, %.loc4_34.1 [template = i32] -// CHECK:STDOUT: %N.param: i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_6.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_6.2 (constants.%N)] -// CHECK:STDOUT: %n.param: @F.%.loc4_26 (%.2) = value_param runtime_param0 -// CHECK:STDOUT: %n: @F.%.loc4_26 (%.2) = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref i32 = return_slot %return.param +// CHECK:STDOUT: %N.ref.loc4: Core.BigInt = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref.loc4) [symbolic = %.loc4_36 (constants.%.2)] +// CHECK:STDOUT: %.loc4_38.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc4_36 (constants.%.2)] +// CHECK:STDOUT: %.loc4_38.2: type = converted %int.make_type_signed, %.loc4_38.1 [symbolic = %.loc4_36 (constants.%.2)] +// CHECK:STDOUT: %Core.ref.loc4_44: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %BigInt.ref.loc4_48: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt] +// CHECK:STDOUT: %big_int.make_type.loc4_55: init type = call %BigInt.ref.loc4_48() [template = Core.BigInt] +// CHECK:STDOUT: %.loc4_56.1: type = value_of_initializer %big_int.make_type.loc4_55 [template = Core.BigInt] +// CHECK:STDOUT: %.loc4_56.2: type = converted %big_int.make_type.loc4_55, %.loc4_56.1 [template = Core.BigInt] +// CHECK:STDOUT: %N.param: Core.BigInt = value_param runtime_param +// CHECK:STDOUT: %N.loc4_6.1: Core.BigInt = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_6.2 (constants.%N)] +// CHECK:STDOUT: %n.param: @F.%.loc4_36 (%.2) = value_param runtime_param0 +// CHECK:STDOUT: %n: @F.%.loc4_36 (%.2) = bind_name n, %n.param +// CHECK:STDOUT: %return.param: ref Core.BigInt = out_param runtime_param1 +// CHECK:STDOUT: %return: ref Core.BigInt = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: %.4 = binding_pattern a // CHECK:STDOUT: %a.param_patt: %.4 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: Core.BigInt = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: Core.BigInt = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc8_9.1: i32 = int_literal 64 [template = constants.%.3] +// CHECK:STDOUT: %.loc8_9.1: Core.BigInt = int_literal 64 [template = constants.%.3] // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_9.1) [template = constants.%.4] // CHECK:STDOUT: %.loc8_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%.4] // CHECK:STDOUT: %.loc8_9.3: type = converted %int.make_type_signed, %.loc8_9.2 [template = constants.%.4] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc8_17.1: type = value_of_initializer %int.make_type_32 [template = i32] -// CHECK:STDOUT: %.loc8_17.2: type = converted %int.make_type_32, %.loc8_17.1 [template = i32] +// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %BigInt.ref: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt] +// CHECK:STDOUT: %big_int.make_type: init type = call %BigInt.ref() [template = Core.BigInt] +// CHECK:STDOUT: %.loc8_29.1: type = value_of_initializer %big_int.make_type [template = Core.BigInt] +// CHECK:STDOUT: %.loc8_29.2: type = converted %big_int.make_type, %.loc8_29.1 [template = Core.BigInt] // CHECK:STDOUT: %a.param: %.4 = value_param runtime_param0 // CHECK:STDOUT: %a: %.4 = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref i32 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref Core.BigInt = out_param runtime_param1 +// CHECK:STDOUT: %return: ref Core.BigInt = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; +// CHECK:STDOUT: fn @BigInt() -> type = "big_int.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Int(%size.param_patt: i32) -> type = "int.make_type_signed"; +// CHECK:STDOUT: fn @Int(%size.param_patt: Core.BigInt) -> type = "int.make_type_signed"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%N.loc4_6.1: i32) { -// CHECK:STDOUT: %N.loc4_6.2: i32 = bind_symbolic_name N, 0 [symbolic = %N.loc4_6.2 (constants.%N)] -// CHECK:STDOUT: %N.patt.loc4_6.2: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] -// CHECK:STDOUT: %.loc4_26: type = int_type signed, %N.loc4_6.2 [symbolic = %.loc4_26 (constants.%.2)] +// CHECK:STDOUT: generic fn @F(%N.loc4_6.1: Core.BigInt) { +// CHECK:STDOUT: %N.loc4_6.2: Core.BigInt = bind_symbolic_name N, 0 [symbolic = %N.loc4_6.2 (constants.%N)] +// CHECK:STDOUT: %N.patt.loc4_6.2: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)] +// CHECK:STDOUT: %.loc4_36: type = int_type signed, %N.loc4_6.2 [symbolic = %.loc4_36 (constants.%.2)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%N.param_patt: i32](%n.param_patt: @F.%.loc4_26 (%.2)) -> i32 { +// CHECK:STDOUT: fn[%N.param_patt: Core.BigInt](%n.param_patt: @F.%.loc4_36 (%.2)) -> Core.BigInt { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc5: i32 = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] +// CHECK:STDOUT: %N.ref.loc5: Core.BigInt = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)] // CHECK:STDOUT: return %N.ref.loc5 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%a.param_patt: %.4) -> i32 { +// CHECK:STDOUT: fn @G(%a.param_patt: %.4) -> Core.BigInt { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %a.ref: %.4 = name_ref a, %a // CHECK:STDOUT: %.loc9_10: = specific_function %F.ref, @F(constants.%.3) [template = constants.%.5] -// CHECK:STDOUT: %F.call: init i32 = call %.loc9_10(%a.ref) -// CHECK:STDOUT: %.loc9_14.1: i32 = value_of_initializer %F.call -// CHECK:STDOUT: %.loc9_14.2: i32 = converted %F.call, %.loc9_14.1 +// CHECK:STDOUT: %F.call: init Core.BigInt = call %.loc9_10(%a.ref) +// CHECK:STDOUT: %.loc9_14.1: Core.BigInt = value_of_initializer %F.call +// CHECK:STDOUT: %.loc9_14.2: Core.BigInt = converted %F.call, %.loc9_14.1 // CHECK:STDOUT: return %.loc9_14.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%N) { // CHECK:STDOUT: %N.loc4_6.2 => constants.%N // CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%N -// CHECK:STDOUT: %.loc4_26 => constants.%.2 +// CHECK:STDOUT: %.loc4_36 => constants.%.2 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @F(constants.%.3) { // CHECK:STDOUT: %N.loc4_6.2 => constants.%.3 // CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%.3 -// CHECK:STDOUT: %.loc4_26 => constants.%.4 +// CHECK:STDOUT: %.loc4_36 => constants.%.4 // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: } @@ -173,23 +179,23 @@ fn G(a: f64) -> i32 { // CHECK:STDOUT: --- fail_todo_float.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %BigInt.type: type = fn_type @BigInt [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %BigInt: %BigInt.type = struct_value () [template] +// CHECK:STDOUT: %N: Core.BigInt = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %F.type: type = fn_type @F [template] // CHECK:STDOUT: %F: %F.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.2: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %G.type: type = fn_type @G [template] // CHECK:STDOUT: %G: %G.type = struct_value () [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int32 = %import_ref.1 +// CHECK:STDOUT: .BigInt = %import_ref.1 // CHECK:STDOUT: .Float = %import_ref.2 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/operators @@ -200,8 +206,8 @@ fn G(a: f64) -> i32 { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %BigInt.type = import_ref Core//prelude/types, inst+7, loaded [template = constants.%BigInt] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -212,70 +218,76 @@ fn G(a: f64) -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] { -// CHECK:STDOUT: %N.patt.loc8_6.1: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc8_6.1, runtime_param [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.patt.loc8_6.1: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.param_patt: Core.BigInt = value_param_pattern %N.patt.loc8_6.1, runtime_param [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)] // CHECK:STDOUT: %n.patt: = binding_pattern n // CHECK:STDOUT: %n.param_patt: = value_param_pattern %n.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: Core.BigInt = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: Core.BigInt = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int.make_type_32.loc8_10: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc8_10.1: type = value_of_initializer %int.make_type_32.loc8_10 [template = i32] -// CHECK:STDOUT: %.loc8_10.2: type = converted %int.make_type_32.loc8_10, %.loc8_10.1 [template = i32] -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %Core.ref.loc8_10: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %BigInt.ref.loc8_14: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt] +// CHECK:STDOUT: %big_int.make_type.loc8_21: init type = call %BigInt.ref.loc8_14() [template = Core.BigInt] +// CHECK:STDOUT: %.loc8_22.1: type = value_of_initializer %big_int.make_type.loc8_21 [template = Core.BigInt] +// CHECK:STDOUT: %.loc8_22.2: type = converted %big_int.make_type.loc8_21, %.loc8_22.1 [template = Core.BigInt] +// CHECK:STDOUT: %Core.ref.loc8_28: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.2 [template = constants.%Float] -// CHECK:STDOUT: %N.ref.loc8: i32 = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)] +// CHECK:STDOUT: %N.ref.loc8: Core.BigInt = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)] // CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%N.ref.loc8) -// CHECK:STDOUT: %.loc8_30.1: type = value_of_initializer %float.make_type -// CHECK:STDOUT: %.loc8_30.2: type = converted %float.make_type, %.loc8_30.1 -// CHECK:STDOUT: %int.make_type_32.loc8_36: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc8_36.1: type = value_of_initializer %int.make_type_32.loc8_36 [template = i32] -// CHECK:STDOUT: %.loc8_36.2: type = converted %int.make_type_32.loc8_36, %.loc8_36.1 [template = i32] -// CHECK:STDOUT: %N.param: i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc8_6.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc8_6.2 (constants.%N)] +// CHECK:STDOUT: %.loc8_40.1: type = value_of_initializer %float.make_type +// CHECK:STDOUT: %.loc8_40.2: type = converted %float.make_type, %.loc8_40.1 +// CHECK:STDOUT: %Core.ref.loc8_46: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %BigInt.ref.loc8_50: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt] +// CHECK:STDOUT: %big_int.make_type.loc8_57: init type = call %BigInt.ref.loc8_50() [template = Core.BigInt] +// CHECK:STDOUT: %.loc8_58.1: type = value_of_initializer %big_int.make_type.loc8_57 [template = Core.BigInt] +// CHECK:STDOUT: %.loc8_58.2: type = converted %big_int.make_type.loc8_57, %.loc8_58.1 [template = Core.BigInt] +// CHECK:STDOUT: %N.param: Core.BigInt = value_param runtime_param +// CHECK:STDOUT: %N.loc8_6.1: Core.BigInt = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc8_6.2 (constants.%N)] // CHECK:STDOUT: %n.param: = value_param runtime_param0 // CHECK:STDOUT: %n: = bind_name n, %n.param -// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref i32 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref Core.BigInt = out_param runtime_param1 +// CHECK:STDOUT: %return: ref Core.BigInt = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] { // CHECK:STDOUT: %a.patt: f64 = binding_pattern a // CHECK:STDOUT: %a.param_patt: f64 = value_param_pattern %a.patt, runtime_param0 -// CHECK:STDOUT: %return.patt: i32 = return_slot_pattern -// CHECK:STDOUT: %return.param_patt: i32 = out_param_pattern %return.patt, runtime_param1 +// CHECK:STDOUT: %return.patt: Core.BigInt = return_slot_pattern +// CHECK:STDOUT: %return.param_patt: Core.BigInt = out_param_pattern %return.patt, runtime_param1 // CHECK:STDOUT: } { -// CHECK:STDOUT: %.loc12_9.1: i32 = int_literal 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_9.1: Core.BigInt = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64] // CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc12_9.3: type = converted %float.make_type, %.loc12_9.2 [template = f64] -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc12_17.1: type = value_of_initializer %int.make_type_32 [template = i32] -// CHECK:STDOUT: %.loc12_17.2: type = converted %int.make_type_32, %.loc12_17.1 [template = i32] +// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %BigInt.ref: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt] +// CHECK:STDOUT: %big_int.make_type: init type = call %BigInt.ref() [template = Core.BigInt] +// CHECK:STDOUT: %.loc12_29.1: type = value_of_initializer %big_int.make_type [template = Core.BigInt] +// CHECK:STDOUT: %.loc12_29.2: type = converted %big_int.make_type, %.loc12_29.1 [template = Core.BigInt] // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0 // CHECK:STDOUT: %a: f64 = bind_name a, %a.param -// CHECK:STDOUT: %return.param: ref i32 = out_param runtime_param1 -// CHECK:STDOUT: %return: ref i32 = return_slot %return.param +// CHECK:STDOUT: %return.param: ref Core.BigInt = out_param runtime_param1 +// CHECK:STDOUT: %return: ref Core.BigInt = return_slot %return.param // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; +// CHECK:STDOUT: fn @BigInt() -> type = "big_int.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @F(%N.loc8_6.1: i32) { -// CHECK:STDOUT: %N.loc8_6.2: i32 = bind_symbolic_name N, 0 [symbolic = %N.loc8_6.2 (constants.%N)] -// CHECK:STDOUT: %N.patt.loc8_6.2: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)] +// CHECK:STDOUT: generic fn @F(%N.loc8_6.1: Core.BigInt) { +// CHECK:STDOUT: %N.loc8_6.2: Core.BigInt = bind_symbolic_name N, 0 [symbolic = %N.loc8_6.2 (constants.%N)] +// CHECK:STDOUT: %N.patt.loc8_6.2: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: // CHECK:STDOUT: -// CHECK:STDOUT: fn[%N.param_patt: i32](%n.param_patt: ) -> i32 { +// CHECK:STDOUT: fn[%N.param_patt: Core.BigInt](%n.param_patt: ) -> Core.BigInt { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %N.ref.loc9: i32 = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)] +// CHECK:STDOUT: %N.ref.loc9: Core.BigInt = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)] // CHECK:STDOUT: return %N.ref.loc9 // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @G(%a.param_patt: f64) -> i32 { +// CHECK:STDOUT: fn @G(%a.param_patt: f64) -> Core.BigInt { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F] // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index ab416cc4d050..87e6ab101ac8 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -23,7 +23,7 @@ fn Run() { // CHECK:STDOUT: --- fail_return_type_mismatch.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -67,7 +67,7 @@ fn Run() { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: %import_ref.3: %ImplicitAs.type.1 = import_ref Core//prelude/operators/as, inst+49, loaded [template = constants.%ImplicitAs] // CHECK:STDOUT: %import_ref.4 = import_ref Core//prelude/operators/as, inst+55, unloaded @@ -88,7 +88,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: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_13.1: Core.BigInt = int_literal 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] @@ -118,7 +118,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Foo() -> f64 { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index 6f7b3fdf7494..836e796646e8 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -8,18 +8,21 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/generic/resolve_used.carbon -// --- fail_call_monomorphization_error.carbon +// --- fail_todo_call_monomorphization_error.carbon library "[[@TEST_NAME]]"; -fn ErrorIfNIsZero(N:! i32) { +// TODO: This declaration should be accepted, and the `var v` below should be +// rejected during monomorphization, once integer literals have the type +// `Core.IntLiteral(N)` as described in the design. +// CHECK:STDERR: fail_todo_call_monomorphization_error.carbon:[[@LINE+3]]:41: error: name `IntLiteral` not found [NameNotFound] +// CHECK:STDERR: fn ErrorIfNIsZero[N:! Core.BigInt()](n: Core.IntLiteral(N)) { +// CHECK:STDERR: ^~~~~~~~~~~~~~~ +fn ErrorIfNIsZero[N:! Core.BigInt()](n: Core.IntLiteral(N)) { // Check that we resolve the definition of a used specific function by // ensuring we produce an error when doing so. Notionally this error is // produced as a result of instantiating the `Core.Int` template, although // that's not how we currently model `Core.Int`. - // CHECK:STDERR: fail_call_monomorphization_error.carbon:[[@LINE+3]]:10: error: integer type width of 0 is not positive [IntWidthNotPositive] - // CHECK:STDERR: var v: Core.Int(N); - // CHECK:STDERR: ^~~~~~~~~ var v: Core.Int(N); } @@ -27,14 +30,14 @@ fn CallNegative() { ErrorIfNIsZero(0); } -// CHECK:STDOUT: --- fail_call_monomorphization_error.carbon +// CHECK:STDOUT: --- fail_todo_call_monomorphization_error.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] +// CHECK:STDOUT: %BigInt.type: type = fn_type @BigInt [template] // CHECK:STDOUT: %.1: type = tuple_type () [template] -// CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %N: i32 = bind_symbolic_name N, 0 [symbolic] -// CHECK:STDOUT: %N.patt: i32 = symbolic_binding_pattern N, 0 [symbolic] +// CHECK:STDOUT: %BigInt: %BigInt.type = struct_value () [template] +// CHECK:STDOUT: %N: Core.BigInt = bind_symbolic_name N, 0 [symbolic] +// CHECK:STDOUT: %N.patt: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic] // CHECK:STDOUT: %ErrorIfNIsZero.type: type = fn_type @ErrorIfNIsZero [template] // CHECK:STDOUT: %ErrorIfNIsZero: %ErrorIfNIsZero.type = struct_value () [template] // CHECK:STDOUT: %Int.type: type = fn_type @Int [template] @@ -43,12 +46,11 @@ fn CallNegative() { // 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: %.4: = specific_function %ErrorIfNIsZero, @ErrorIfNIsZero(%.3) [template] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: imports { // CHECK:STDOUT: %Core: = namespace file.%Core.import, [template] { -// CHECK:STDOUT: .Int32 = %import_ref.1 +// CHECK:STDOUT: .BigInt = %import_ref.1 // CHECK:STDOUT: .Int = %import_ref.2 // CHECK:STDOUT: import Core//prelude // CHECK:STDOUT: import Core//prelude/operators @@ -59,8 +61,8 @@ fn CallNegative() { // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, inst+29, loaded [template = constants.%Int] +// CHECK:STDOUT: %import_ref.1: %BigInt.type = import_ref Core//prelude/types, inst+7, loaded [template = constants.%BigInt] +// CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, inst+30, loaded [template = constants.%Int] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -71,62 +73,61 @@ fn CallNegative() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %ErrorIfNIsZero.decl: %ErrorIfNIsZero.type = fn_decl @ErrorIfNIsZero [template = constants.%ErrorIfNIsZero] { -// CHECK:STDOUT: %N.patt.loc4_19.1: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)] -// CHECK:STDOUT: %N.param_patt: i32 = value_param_pattern %N.patt.loc4_19.1, runtime_param [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.patt.loc10_19.1: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_19.2 (constants.%N.patt)] +// CHECK:STDOUT: %N.param_patt: Core.BigInt = value_param_pattern %N.patt.loc10_19.1, runtime_param [symbolic = %N.patt.loc10_19.2 (constants.%N.patt)] +// CHECK:STDOUT: %n.patt: = binding_pattern n +// CHECK:STDOUT: %n.param_patt: = value_param_pattern %n.patt, runtime_param0 // CHECK:STDOUT: } { -// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32] -// CHECK:STDOUT: %.loc4_23.1: type = value_of_initializer %int.make_type_32 [template = i32] -// CHECK:STDOUT: %.loc4_23.2: type = converted %int.make_type_32, %.loc4_23.1 [template = i32] -// CHECK:STDOUT: %N.param: i32 = value_param runtime_param -// CHECK:STDOUT: %N.loc4_19.1: i32 = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_19.2 (constants.%N)] +// CHECK:STDOUT: %Core.ref.loc10_23: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %BigInt.ref: %BigInt.type = name_ref BigInt, imports.%import_ref.1 [template = constants.%BigInt] +// CHECK:STDOUT: %big_int.make_type: init type = call %BigInt.ref() [template = Core.BigInt] +// CHECK:STDOUT: %.loc10_35.1: type = value_of_initializer %big_int.make_type [template = Core.BigInt] +// CHECK:STDOUT: %.loc10_35.2: type = converted %big_int.make_type, %.loc10_35.1 [template = Core.BigInt] +// CHECK:STDOUT: %Core.ref.loc10_41: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %IntLiteral.ref: = name_ref IntLiteral, [template = ] +// CHECK:STDOUT: %N.ref.loc10: Core.BigInt = name_ref N, %N.loc10_19.1 [symbolic = %N.loc10_19.2 (constants.%N)] +// CHECK:STDOUT: %N.param: Core.BigInt = value_param runtime_param +// CHECK:STDOUT: %N.loc10_19.1: Core.BigInt = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc10_19.2 (constants.%N)] +// CHECK:STDOUT: %n.param: = value_param runtime_param0 +// CHECK:STDOUT: %n: = bind_name n, %n.param // CHECK:STDOUT: } // CHECK:STDOUT: %CallNegative.decl: %CallNegative.type = fn_decl @CallNegative [template = constants.%CallNegative] {} {} // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; +// CHECK:STDOUT: fn @BigInt() -> type = "big_int.make_type"; // CHECK:STDOUT: -// CHECK:STDOUT: generic fn @ErrorIfNIsZero(%N.loc4_19.1: i32) { -// CHECK:STDOUT: %N.loc4_19.2: i32 = bind_symbolic_name N, 0 [symbolic = %N.loc4_19.2 (constants.%N)] -// CHECK:STDOUT: %N.patt.loc4_19.2: i32 = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_19.2 (constants.%N.patt)] +// CHECK:STDOUT: generic fn @ErrorIfNIsZero(%N.loc10_19.1: Core.BigInt) { +// CHECK:STDOUT: %N.loc10_19.2: Core.BigInt = bind_symbolic_name N, 0 [symbolic = %N.loc10_19.2 (constants.%N)] +// CHECK:STDOUT: %N.patt.loc10_19.2: Core.BigInt = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc10_19.2 (constants.%N.patt)] // CHECK:STDOUT: // CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_18: type = int_type signed, %N.loc4_19.2 [symbolic = %.loc12_18 (constants.%.2)] +// CHECK:STDOUT: %.loc15_18: type = int_type signed, %N.loc10_19.2 [symbolic = %.loc15_18 (constants.%.2)] // CHECK:STDOUT: -// CHECK:STDOUT: fn(%N.param_patt: i32) { +// CHECK:STDOUT: fn[%N.param_patt: Core.BigInt](%n.param_patt: ) { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %Core.ref: = name_ref Core, imports.%Core [template = imports.%Core] +// CHECK:STDOUT: %Core.ref.loc15: = name_ref Core, imports.%Core [template = imports.%Core] // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int] -// CHECK:STDOUT: %N.ref: i32 = name_ref N, %N.loc4_19.1 [symbolic = %N.loc4_19.2 (constants.%N)] -// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref) [symbolic = %.loc12_18 (constants.%.2)] -// CHECK:STDOUT: %.loc12_20.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc12_18 (constants.%.2)] -// CHECK:STDOUT: %.loc12_20.2: type = converted %int.make_type_signed, %.loc12_20.1 [symbolic = %.loc12_18 (constants.%.2)] -// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%.loc12_18 (%.2) = var v -// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%.loc12_18 (%.2) = bind_name v, %v.var +// CHECK:STDOUT: %N.ref.loc15: Core.BigInt = name_ref N, %N.loc10_19.1 [symbolic = %N.loc10_19.2 (constants.%N)] +// CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref.loc15) [symbolic = %.loc15_18 (constants.%.2)] +// CHECK:STDOUT: %.loc15_20.1: type = value_of_initializer %int.make_type_signed [symbolic = %.loc15_18 (constants.%.2)] +// CHECK:STDOUT: %.loc15_20.2: type = converted %int.make_type_signed, %.loc15_20.1 [symbolic = %.loc15_18 (constants.%.2)] +// CHECK:STDOUT: %v.var: ref @ErrorIfNIsZero.%.loc15_18 (%.2) = var v +// CHECK:STDOUT: %v: ref @ErrorIfNIsZero.%.loc15_18 (%.2) = bind_name v, %v.var // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Int(%size.param_patt: i32) -> type = "int.make_type_signed"; +// CHECK:STDOUT: fn @Int(%size.param_patt: Core.BigInt) -> type = "int.make_type_signed"; // CHECK:STDOUT: // CHECK:STDOUT: fn @CallNegative() { // CHECK:STDOUT: !entry: // CHECK:STDOUT: %ErrorIfNIsZero.ref: %ErrorIfNIsZero.type = name_ref ErrorIfNIsZero, file.%ErrorIfNIsZero.decl [template = constants.%ErrorIfNIsZero] -// CHECK:STDOUT: %.loc16_18: i32 = int_literal 0 [template = constants.%.3] -// CHECK:STDOUT: %.loc16_3: = specific_function %ErrorIfNIsZero.ref, @ErrorIfNIsZero(constants.%.3) [template = constants.%.4] -// CHECK:STDOUT: %ErrorIfNIsZero.call: init %.1 = call %.loc16_3() +// CHECK:STDOUT: %.loc19: i32 = int_literal 0 [template = constants.%.3] // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: specific @ErrorIfNIsZero(constants.%N) { -// CHECK:STDOUT: %N.loc4_19.2 => constants.%N -// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%N -// CHECK:STDOUT: } -// CHECK:STDOUT: -// CHECK:STDOUT: specific @ErrorIfNIsZero(constants.%.3) { -// CHECK:STDOUT: %N.loc4_19.2 => constants.%.3 -// CHECK:STDOUT: %N.patt.loc4_19.2 => constants.%.3 -// CHECK:STDOUT: -// CHECK:STDOUT: !definition: -// CHECK:STDOUT: %.loc12_18 => +// CHECK:STDOUT: %N.loc10_19.2 => constants.%N +// CHECK:STDOUT: %N.patt.loc10_19.2 => constants.%N // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index 738d62aaaec2..e4b37dff0db4 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -47,7 +47,7 @@ class C { // CHECK:STDOUT: %.3: i32 = int_literal 1 [template] // CHECK:STDOUT: %.4: i32 = int_literal 0 [template] // CHECK:STDOUT: %C: type = class_type @C [template] -// CHECK:STDOUT: %.5: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.5: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.6: type = unbound_element_type %C, i32 [template] @@ -69,7 +69,7 @@ class C { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -96,7 +96,7 @@ class C { // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @__global_init() { // CHECK:STDOUT: !entry: diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index 151f8aed4079..ab9d14de4faa 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -51,7 +51,7 @@ var or_: F(true or true); // CHECK:STDOUT: %F: %F.type = struct_value () [template] // CHECK:STDOUT: %Int32.type: type = fn_type @Int32 [template] // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.2: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.3: bool = bool_literal true [template] @@ -74,7 +74,7 @@ var or_: F(true or true); // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Bool.type = import_ref Core//prelude/types/bool, inst+5, loaded [template = constants.%Bool] // CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.3: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -100,7 +100,7 @@ var or_: F(true or true); // CHECK:STDOUT: br !if.expr.result(%.loc13_20.2) // CHECK:STDOUT: // CHECK:STDOUT: !if.expr.else: -// CHECK:STDOUT: %.loc13_29: i32 = int_literal 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc13_29: Core.BigInt = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc13_29) [template = f64] // CHECK:STDOUT: %.loc13_24.1: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc13_24.2: type = converted %float.make_type, %.loc13_24.1 [template = f64] @@ -113,5 +113,5 @@ var or_: F(true or true); // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index 963e3372b39f..a0e933d50073 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -27,7 +27,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %Mismatch.type: type = fn_type @Mismatch [template] // CHECK:STDOUT: %Mismatch: %Mismatch.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.2: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %.3: f64 = float_literal 0 [template] @@ -47,7 +47,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -72,7 +72,7 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: // CHECK:STDOUT: fn @Mismatch() -> i32 { // CHECK:STDOUT: !entry: -// CHECK:STDOUT: %.loc18_19.1: i32 = int_literal 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc18_19.1: Core.BigInt = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc18_19.1) [template = f64] // CHECK:STDOUT: %.loc18_19.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc18_19.3: type = converted %float.make_type, %.loc18_19.2 [template = f64] @@ -82,5 +82,5 @@ fn Mismatch() -> i32 { // CHECK:STDOUT: return // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/fail_member_access_type.carbon b/toolchain/check/testdata/struct/fail_member_access_type.carbon index 84577fefb2d2..d284dd777b0f 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -17,7 +17,7 @@ var y: i32 = x.b; // CHECK:STDOUT: --- fail_member_access_type.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -41,7 +41,7 @@ var y: i32 = x.b; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -52,7 +52,7 @@ var y: i32 = x.b; // CHECK:STDOUT: .y = %y // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_13.1: Core.BigInt = int_literal 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] @@ -66,7 +66,7 @@ var y: i32 = x.b; // CHECK:STDOUT: %y: ref i32 = bind_name y, %y.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/member_access.carbon b/toolchain/check/testdata/struct/member_access.carbon index f7c8e5f758f1..c864f65d19d5 100644 --- a/toolchain/check/testdata/struct/member_access.carbon +++ b/toolchain/check/testdata/struct/member_access.carbon @@ -15,7 +15,7 @@ var z: i32 = y; // CHECK:STDOUT: --- member_access.carbon // CHECK:STDOUT: // CHECK:STDOUT: constants { -// CHECK:STDOUT: %.1: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.1: Core.BigInt = int_literal 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] @@ -41,7 +41,7 @@ var z: i32 = y; // CHECK:STDOUT: import Core//prelude/operators/comparison // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } -// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.1: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: %import_ref.2: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] // CHECK:STDOUT: } // CHECK:STDOUT: @@ -53,7 +53,7 @@ var z: i32 = y; // CHECK:STDOUT: .z = %z // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core -// CHECK:STDOUT: %.loc11_13.1: i32 = int_literal 64 [template = constants.%.1] +// CHECK:STDOUT: %.loc11_13.1: Core.BigInt = int_literal 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] @@ -75,7 +75,7 @@ var z: i32 = y; // CHECK:STDOUT: %z: ref i32 = bind_name z, %z.var // CHECK:STDOUT: } // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32"; // CHECK:STDOUT: diff --git a/toolchain/check/testdata/struct/reorder_fields.carbon b/toolchain/check/testdata/struct/reorder_fields.carbon index 20400e7dc41c..e8f09dc315d2 100644 --- a/toolchain/check/testdata/struct/reorder_fields.carbon +++ b/toolchain/check/testdata/struct/reorder_fields.carbon @@ -25,7 +25,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %Int32: %Int32.type = struct_value () [template] // CHECK:STDOUT: %MakeI32.type: type = fn_type @MakeI32 [template] // CHECK:STDOUT: %MakeI32: %MakeI32.type = struct_value () [template] -// CHECK:STDOUT: %.2: i32 = int_literal 64 [template] +// CHECK:STDOUT: %.2: Core.BigInt = int_literal 64 [template] // CHECK:STDOUT: %Float.type: type = fn_type @Float [template] // CHECK:STDOUT: %Float: %Float.type = struct_value () [template] // CHECK:STDOUT: %MakeF64.type: type = fn_type @MakeF64 [template] @@ -52,7 +52,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: import Core//prelude/types/bool // CHECK:STDOUT: } // CHECK:STDOUT: %import_ref.1: %Int32.type = import_ref Core//prelude/types, inst+15, loaded [template = constants.%Int32] -// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+57, loaded [template = constants.%Float] +// CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+60, loaded [template = constants.%Float] // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: file { @@ -77,7 +77,7 @@ fn F() -> {.a: i32, .b: f64} { // 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: %.loc12_17.1: i32 = int_literal 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc12_17.1: Core.BigInt = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_17.1) [template = f64] // CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %float.make_type [template = f64] // CHECK:STDOUT: %.loc12_17.3: type = converted %float.make_type, %.loc12_17.2 [template = f64] @@ -91,7 +91,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %int.make_type_32.loc14: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc14_16.1: type = value_of_initializer %int.make_type_32.loc14 [template = i32] // CHECK:STDOUT: %.loc14_16.2: type = converted %int.make_type_32.loc14, %.loc14_16.1 [template = i32] -// CHECK:STDOUT: %.loc14_25.1: i32 = int_literal 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc14_25.1: Core.BigInt = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type.loc14: init type = call constants.%Float(%.loc14_25.1) [template = f64] // CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %float.make_type.loc14 [template = f64] // CHECK:STDOUT: %.loc14_25.3: type = converted %float.make_type.loc14, %.loc14_25.2 [template = f64] @@ -105,7 +105,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeI32() -> i32; // CHECK:STDOUT: -// CHECK:STDOUT: fn @Float(%size.param_patt: i32) -> type = "float.make_type"; +// CHECK:STDOUT: fn @Float(%size.param_patt: Core.BigInt) -> type = "float.make_type"; // CHECK:STDOUT: // CHECK:STDOUT: fn @MakeF64() -> f64; // CHECK:STDOUT: @@ -114,7 +114,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %int.make_type_32.loc15: init type = call constants.%Int32() [template = i32] // CHECK:STDOUT: %.loc15_15.1: type = value_of_initializer %int.make_type_32.loc15 [template = i32] // CHECK:STDOUT: %.loc15_15.2: type = converted %int.make_type_32.loc15, %.loc15_15.1 [template = i32] -// CHECK:STDOUT: %.loc15_24.1: i32 = int_literal 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc15_24.1: Core.BigInt = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type.loc15: init type = call constants.%Float(%.loc15_24.1) [template = f64] // CHECK:STDOUT: %.loc15_24.2: type = value_of_initializer %float.make_type.loc15 [template = f64] // CHECK:STDOUT: %.loc15_24.3: type = converted %float.make_type.loc15, %.loc15_24.2 [template = f64] @@ -131,7 +131,7 @@ fn F() -> {.a: i32, .b: f64} { // CHECK:STDOUT: %struct.loc15: %.3 = struct_value (%.loc15_62.3, %.loc15_62.5) // CHECK:STDOUT: %.loc15_63: %.3 = converted %.loc15_62.1, %struct.loc15 // CHECK:STDOUT: %x: %.3 = bind_name x, %.loc15_63 -// CHECK:STDOUT: %.loc16_15.1: i32 = int_literal 64 [template = constants.%.2] +// CHECK:STDOUT: %.loc16_15.1: Core.BigInt = int_literal 64 [template = constants.%.2] // CHECK:STDOUT: %float.make_type.loc16: init type = call constants.%Float(%.loc16_15.1) [template = f64] // CHECK:STDOUT: %.loc16_15.2: type = value_of_initializer %float.make_type.loc16 [template = f64] // CHECK:STDOUT: %.loc16_15.3: type = converted %float.make_type.loc16, %.loc16_15.2 [template = f64] diff --git a/toolchain/lower/constant.cpp b/toolchain/lower/constant.cpp index 06bb4c335136..0d93f8aab91c 100644 --- a/toolchain/lower/constant.cpp +++ b/toolchain/lower/constant.cpp @@ -206,8 +206,17 @@ static auto EmitAsConstant(ConstantContext& /*context*/, static auto EmitAsConstant(ConstantContext& context, SemIR::IntLiteral inst) -> llvm::Constant* { - return llvm::ConstantInt::get(context.GetType(inst.type_id), - context.sem_ir().ints().Get(inst.int_id)); + auto* type = context.GetType(inst.type_id); + + // BigInt is represented as an empty struct. All other integer types are + // represented as an LLVM integer type. + if (!llvm::isa(type)) { + auto* struct_type = llvm::dyn_cast(type); + CARBON_CHECK(struct_type && struct_type->getNumElements() == 0); + return llvm::ConstantStruct::get(struct_type); + } + + return llvm::ConstantInt::get(type, context.sem_ir().ints().Get(inst.int_id)); } static auto EmitAsConstant(ConstantContext& context, SemIR::Namespace inst) diff --git a/toolchain/sem_ir/builtin_function_kind.cpp b/toolchain/sem_ir/builtin_function_kind.cpp index 40411db01627..89e9f955fceb 100644 --- a/toolchain/sem_ir/builtin_function_kind.cpp +++ b/toolchain/sem_ir/builtin_function_kind.cpp @@ -79,7 +79,9 @@ using Bool = BuiltinType; struct AnyInt { static auto Check(const File& sem_ir, ValidateState& state, TypeId type_id) -> bool { - // TODO: Support Core.BigInt once it exists. + if (BuiltinType::Check(sem_ir, state, type_id)) { + return true; + } if (BuiltinType::Check(sem_ir, state, type_id)) { return true; }