Skip to content

Commit

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

I'm not renaming FloatLiteral because recent discussion suggests we may
want distinct FloatLiteral versus FloatValue representations in SemIR.
  • Loading branch information
zygoloid committed Nov 2, 2024
1 parent 261fe38 commit bb33422
Show file tree
Hide file tree
Showing 250 changed files with 1,933 additions and 1,935 deletions.
2 changes: 1 addition & 1 deletion toolchain/check/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static auto MakeElementAccessInst(Context& context, SemIR::LocId loc_id,
// TODO: Add a new instruction kind for indexing an array at a constant
// index so that we don't need an integer literal instruction here, and
// remove this special case.
auto index_id = block.template AddInst<SemIR::IntLiteral>(
auto index_id = block.template AddInst<SemIR::IntValue>(
loc_id,
{.type_id = context.GetBuiltinType(SemIR::BuiltinInstKind::IntType),
.int_id = context.ints().Add(llvm::APInt(32, i))});
Expand Down
32 changes: 16 additions & 16 deletions toolchain/check/eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static auto MakeIntResult(Context& context, SemIR::TypeId type_id,
llvm::APInt value) -> SemIR::ConstantId {
auto result = context.ints().Add(std::move(value));
return MakeConstantResult(
context, SemIR::IntLiteral{.type_id = type_id, .int_id = result},
context, SemIR::IntValue{.type_id = type_id, .int_id = result},
Phase::Template);
}

Expand Down Expand Up @@ -489,7 +489,7 @@ static auto PerformArrayIndex(EvalContext& eval_context, SemIR::ArrayIndex inst)
if (!index_id.is_valid()) {
return MakeNonConstantResult(phase);
}
auto index = eval_context.insts().TryGetAs<SemIR::IntLiteral>(index_id);
auto index = eval_context.insts().TryGetAs<SemIR::IntValue>(index_id);
if (!index) {
CARBON_CHECK(phase != Phase::Template,
"Template constant integer should be a literal");
Expand All @@ -503,7 +503,7 @@ static auto PerformArrayIndex(EvalContext& eval_context, SemIR::ArrayIndex inst)
eval_context.insts().Get(inst.array_id).type_id());
if (auto array_type =
eval_context.types().TryGetAs<SemIR::ArrayType>(aggregate_type_id)) {
if (auto bound = eval_context.insts().TryGetAs<SemIR::IntLiteral>(
if (auto bound = eval_context.insts().TryGetAs<SemIR::IntValue>(
array_type->bound_id)) {
// This awkward call to `getZExtValue` is a workaround for APInt not
// supporting comparisons between integers of different bit widths.
Expand Down Expand Up @@ -542,7 +542,7 @@ static auto PerformArrayIndex(EvalContext& eval_context, SemIR::ArrayIndex inst)
static auto ValidateIntType(Context& context, SemIRLoc loc,
SemIR::IntType result) -> bool {
auto bit_width =
context.insts().TryGetAs<SemIR::IntLiteral>(result.bit_width_id);
context.insts().TryGetAs<SemIR::IntValue>(result.bit_width_id);
if (!bit_width) {
// Symbolic bit width.
return true;
Expand Down Expand Up @@ -592,7 +592,7 @@ static auto MakeIntTypeResult(Context& context, SemIRLoc loc,
// Enforces that the bit width is 64 for a float.
static auto ValidateFloatBitWidth(Context& context, SemIRLoc loc,
SemIR::InstId inst_id) -> bool {
auto inst = context.insts().GetAs<SemIR::IntLiteral>(inst_id);
auto inst = context.insts().GetAs<SemIR::IntValue>(inst_id);
if (context.ints().Get(inst.int_id) == 64) {
return true;
}
Expand All @@ -606,7 +606,7 @@ static auto ValidateFloatBitWidth(Context& context, SemIRLoc loc,
static auto ValidateFloatType(Context& context, SemIRLoc loc,
SemIR::FloatType result) -> bool {
auto bit_width =
context.insts().TryGetAs<SemIR::IntLiteral>(result.bit_width_id);
context.insts().TryGetAs<SemIR::IntValue>(result.bit_width_id);
if (!bit_width) {
// Symbolic bit width.
return true;
Expand All @@ -625,7 +625,7 @@ static auto PerformBuiltinUnaryIntOp(Context& context, SemIRLoc loc,
SemIR::BuiltinFunctionKind builtin_kind,
SemIR::InstId arg_id)
-> SemIR::ConstantId {
auto op = context.insts().GetAs<SemIR::IntLiteral>(arg_id);
auto op = context.insts().GetAs<SemIR::IntValue>(arg_id);
auto op_val = context.ints().Get(op.int_id);

switch (builtin_kind) {
Expand Down Expand Up @@ -658,8 +658,8 @@ static auto PerformBuiltinBinaryIntOp(Context& context, SemIRLoc loc,
SemIR::InstId lhs_id,
SemIR::InstId rhs_id)
-> SemIR::ConstantId {
auto lhs = context.insts().GetAs<SemIR::IntLiteral>(lhs_id);
auto rhs = context.insts().GetAs<SemIR::IntLiteral>(rhs_id);
auto lhs = context.insts().GetAs<SemIR::IntValue>(lhs_id);
auto rhs = context.insts().GetAs<SemIR::IntValue>(rhs_id);
const auto& lhs_val = context.ints().Get(lhs.int_id);
const auto& rhs_val = context.ints().Get(rhs.int_id);

Expand Down Expand Up @@ -791,10 +791,10 @@ static auto PerformBuiltinIntComparison(Context& context,
SemIR::InstId rhs_id,
SemIR::TypeId bool_type_id)
-> SemIR::ConstantId {
auto lhs = context.insts().GetAs<SemIR::IntLiteral>(lhs_id);
auto lhs = context.insts().GetAs<SemIR::IntValue>(lhs_id);
const auto& lhs_val = context.ints().Get(lhs.int_id);
const auto& rhs_val = context.ints().Get(
context.insts().GetAs<SemIR::IntLiteral>(rhs_id).int_id);
const auto& rhs_val =
context.ints().Get(context.insts().GetAs<SemIR::IntValue>(rhs_id).int_id);
bool is_signed = context.types().IsSignedInt(lhs.type_id);

bool result;
Expand Down Expand Up @@ -1122,8 +1122,8 @@ static auto TryEvalInstInContext(EvalContext& eval_context,
eval_context, inst,
[&](SemIR::ArrayType result) {
auto bound_id = array_type.bound_id;
auto int_bound = eval_context.insts().TryGetAs<SemIR::IntLiteral>(
result.bound_id);
auto int_bound =
eval_context.insts().TryGetAs<SemIR::IntValue>(result.bound_id);
if (!int_bound) {
// TODO: Permit symbolic array bounds. This will require fixing
// callers of `GetArrayBoundValue`.
Expand Down Expand Up @@ -1330,13 +1330,13 @@ static auto TryEvalInstInContext(EvalContext& eval_context,

case SemIR::BoolLiteral::Kind:
case SemIR::FloatLiteral::Kind:
case SemIR::IntLiteral::Kind:
case SemIR::IntValue::Kind:
case SemIR::StringLiteral::Kind:
// Promote literals to the constant block.
// TODO: Convert literals into a canonical form. Currently we can form two
// different `i32` constants with the same value if they are represented
// by `APInt`s with different bit widths.
// TODO: Can the type of an IntLiteral or FloatLiteral be symbolic? If so,
// TODO: Can the type of an IntValue or FloatLiteral be symbolic? If so,
// we may need to rebuild.
return MakeConstantResult(eval_context.context(), inst, Phase::Template);

Expand Down
8 changes: 4 additions & 4 deletions toolchain/check/handle_literal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ auto HandleParseNode(Context& context, Parse::BoolLiteralTrueId node_id)
return true;
}

// Forms an IntLiteral instruction with type `i32` for a given literal integer
// Forms an IntValue instruction with type `i32` for a given literal integer
// value, which is assumed to be unsigned.
static auto MakeI32Literal(Context& context, Parse::NodeId node_id,
IntId int_id) -> SemIR::InstId {
Expand All @@ -43,20 +43,20 @@ static auto MakeI32Literal(Context& context, Parse::NodeId node_id,
}
// Literals are always represented as unsigned, so zero-extend if needed.
auto i32_val = val.zextOrTrunc(32);
return context.AddInst<SemIR::IntLiteral>(
return context.AddInst<SemIR::IntValue>(
node_id,
{.type_id = context.GetBuiltinType(SemIR::BuiltinInstKind::IntType),
.int_id = context.ints().Add(i32_val)});
}

// Forms an IntLiteral instruction with type `BigInt` for a given literal
// Forms an IntValue 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<SemIR::IntLiteral>(
return context.AddInst<SemIR::IntValue>(
node_id,
{.type_id = context.GetBuiltinType(SemIR::BuiltinInstKind::BigIntType),
.int_id = int_id});
Expand Down
6 changes: 3 additions & 3 deletions toolchain/check/import_ref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ class ImportRefResolver {
case CARBON_KIND(SemIR::InterfaceType inst): {
return TryResolveTypedInst(inst);
}
case CARBON_KIND(SemIR::IntLiteral inst): {
case CARBON_KIND(SemIR::IntValue inst): {
return TryResolveTypedInst(inst);
}
case CARBON_KIND(SemIR::IntType inst): {
Expand Down Expand Up @@ -2093,13 +2093,13 @@ class ImportRefResolver {
.elements_id = elements_id});
}

auto TryResolveTypedInst(SemIR::IntLiteral inst) -> ResolveResult {
auto TryResolveTypedInst(SemIR::IntValue inst) -> ResolveResult {
auto type_id = GetLocalConstantId(inst.type_id);
if (HasNewWork()) {
return Retry();
}

return ResolveAs<SemIR::IntLiteral>(
return ResolveAs<SemIR::IntValue>(
{.type_id = context_.GetTypeIdForTypeConstant(type_id),
.int_id = context_.ints().Add(import_ir_.ints().Get(inst.int_id))});
}
Expand Down
6 changes: 3 additions & 3 deletions toolchain/check/member_access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,11 @@ static auto PerformInstanceBinding(Context& context, SemIR::LocId loc_id,
}
}

// Validates that the index (required to be an IntLiteral) is valid within the
// Validates that the index (required to be an IntValue) is valid within the
// tuple size. Returns the index on success, or nullptr on failure.
static auto ValidateTupleIndex(Context& context, SemIR::LocId loc_id,
SemIR::InstId operand_inst_id,
SemIR::IntLiteral index_inst, int size)
SemIR::IntValue index_inst, int size)
-> const llvm::APInt* {
const auto& index_val = context.ints().Get(index_inst.int_id);
if (index_val.uge(size)) {
Expand Down Expand Up @@ -517,7 +517,7 @@ auto PerformTupleAccess(Context& context, SemIR::LocId loc_id,
return SemIR::InstId::BuiltinError;
}

auto index_literal = context.insts().GetAs<SemIR::IntLiteral>(
auto index_literal = context.insts().GetAs<SemIR::IntValue>(
context.constant_values().GetInstId(index_const_id));
auto type_block = context.type_blocks().Get(tuple_type->elements_id);
const auto* index_val = ValidateTupleIndex(context, loc_id, tuple_inst_id,
Expand Down
12 changes: 6 additions & 6 deletions toolchain/check/testdata/array/array_in_place.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ fn G() {
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %G.type: type = fn_type @G [template]
// CHECK:STDOUT: %G: %G.type = struct_value () [template]
// CHECK:STDOUT: %.4: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.4: i32 = int_value 2 [template]
// CHECK:STDOUT: %.5: type = array_type %.4, %.3 [template]
// CHECK:STDOUT: %.6: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.7: type = ptr_type %.5 [template]
// CHECK:STDOUT: %.8: type = tuple_type (%.3, %.3) [template]
// CHECK:STDOUT: %.9: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.10: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.9: i32 = int_value 0 [template]
// CHECK:STDOUT: %.10: i32 = int_value 1 [template]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
Expand Down Expand Up @@ -82,7 +82,7 @@ fn G() {
// CHECK:STDOUT: %int.make_type_32.loc14_17: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %int.make_type_32.loc14_22: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_25.1: %.2 = tuple_literal (%int.make_type_32.loc14_12, %int.make_type_32.loc14_17, %int.make_type_32.loc14_22)
// CHECK:STDOUT: %.loc14_28: i32 = int_literal 2 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_28: i32 = int_value 2 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_25.2: type = value_of_initializer %int.make_type_32.loc14_12 [template = i32]
// CHECK:STDOUT: %.loc14_25.3: type = converted %int.make_type_32.loc14_12, %.loc14_25.2 [template = i32]
// CHECK:STDOUT: %.loc14_25.4: type = value_of_initializer %int.make_type_32.loc14_17 [template = i32]
Expand All @@ -95,13 +95,13 @@ fn G() {
// CHECK:STDOUT: %v: ref %.5 = bind_name v, %v.var
// CHECK:STDOUT: %F.ref.loc14_34: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %.loc14_42.3: ref %.3 = splice_block %.loc14_42.2 {
// CHECK:STDOUT: %.loc14_42.1: i32 = int_literal 0 [template = constants.%.9]
// CHECK:STDOUT: %.loc14_42.1: i32 = int_value 0 [template = constants.%.9]
// CHECK:STDOUT: %.loc14_42.2: ref %.3 = array_index %v.var, %.loc14_42.1
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.call.loc14_35: init %.3 = call %F.ref.loc14_34() to %.loc14_42.3
// CHECK:STDOUT: %F.ref.loc14_39: %F.type = name_ref F, file.%F.decl [template = constants.%F]
// CHECK:STDOUT: %.loc14_42.6: ref %.3 = splice_block %.loc14_42.5 {
// CHECK:STDOUT: %.loc14_42.4: i32 = int_literal 1 [template = constants.%.10]
// CHECK:STDOUT: %.loc14_42.4: i32 = int_value 1 [template = constants.%.10]
// CHECK:STDOUT: %.loc14_42.5: ref %.3 = array_index %v.var, %.loc14_42.4
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.call.loc14_40: init %.3 = call %F.ref.loc14_39() to %.loc14_42.6
Expand Down
28 changes: 14 additions & 14 deletions toolchain/check/testdata/array/array_vs_tuple.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ fn G() {
// CHECK:STDOUT: %G: %G.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 3 [template]
// CHECK:STDOUT: %.2: i32 = int_value 3 [template]
// CHECK:STDOUT: %.3: type = array_type %.2, i32 [template]
// CHECK:STDOUT: %.4: type = ptr_type %.3 [template]
// CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.6: i32 = int_literal 2 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: i32 = int_value 2 [template]
// CHECK:STDOUT: %.7: type = tuple_type (i32, i32, i32) [template]
// CHECK:STDOUT: %.8: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.8: i32 = int_value 0 [template]
// CHECK:STDOUT: %array: %.3 = tuple_value (%.5, %.6, %.2) [template]
// CHECK:STDOUT: %.9: type = tuple_type (type, type, type) [template]
// CHECK:STDOUT: %.10: type = ptr_type %.7 [template]
Expand Down Expand Up @@ -56,23 +56,23 @@ fn G() {
// CHECK:STDOUT: fn @G() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int.make_type_32.loc13: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc13_16: i32 = int_literal 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_16: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_11.1: type = value_of_initializer %int.make_type_32.loc13 [template = i32]
// CHECK:STDOUT: %.loc13_11.2: type = converted %int.make_type_32.loc13, %.loc13_11.1 [template = i32]
// CHECK:STDOUT: %.loc13_17: type = array_type %.loc13_16, i32 [template = constants.%.3]
// CHECK:STDOUT: %a.var: ref %.3 = var a
// CHECK:STDOUT: %a: ref %.3 = bind_name a, %a.var
// CHECK:STDOUT: %.loc13_22: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_25: i32 = int_literal 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_28: i32 = int_literal 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_22: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_25: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_28: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_29.1: %.7 = tuple_literal (%.loc13_22, %.loc13_25, %.loc13_28)
// CHECK:STDOUT: %.loc13_29.2: i32 = int_literal 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc13_29.2: i32 = int_value 0 [template = constants.%.8]
// CHECK:STDOUT: %.loc13_29.3: ref i32 = array_index %a.var, %.loc13_29.2
// CHECK:STDOUT: %.loc13_29.4: init i32 = initialize_from %.loc13_22 to %.loc13_29.3 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_29.5: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_29.5: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc13_29.6: ref i32 = array_index %a.var, %.loc13_29.5
// CHECK:STDOUT: %.loc13_29.7: init i32 = initialize_from %.loc13_25 to %.loc13_29.6 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_29.8: i32 = int_literal 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_29.8: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc13_29.9: ref i32 = array_index %a.var, %.loc13_29.8
// CHECK:STDOUT: %.loc13_29.10: init i32 = initialize_from %.loc13_28 to %.loc13_29.9 [template = constants.%.2]
// CHECK:STDOUT: %.loc13_29.11: init %.3 = array_init (%.loc13_29.4, %.loc13_29.7, %.loc13_29.10) to %a.var [template = constants.%array]
Expand All @@ -91,9 +91,9 @@ fn G() {
// CHECK:STDOUT: %.loc14_24.8: type = converted %.loc14_24.1, constants.%.7 [template = constants.%.7]
// CHECK:STDOUT: %b.var: ref %.7 = var b
// CHECK:STDOUT: %b: ref %.7 = bind_name b, %b.var
// CHECK:STDOUT: %.loc14_29: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_32: i32 = int_literal 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc14_35: i32 = int_literal 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_29: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_32: i32 = int_value 2 [template = constants.%.6]
// CHECK:STDOUT: %.loc14_35: i32 = int_value 3 [template = constants.%.2]
// CHECK:STDOUT: %.loc14_36.1: %.7 = tuple_literal (%.loc14_29, %.loc14_32, %.loc14_35)
// CHECK:STDOUT: %.loc14_36.2: ref i32 = tuple_access %b.var, element0
// CHECK:STDOUT: %.loc14_36.3: init i32 = initialize_from %.loc14_29 to %.loc14_36.2 [template = constants.%.5]
Expand Down
10 changes: 5 additions & 5 deletions toolchain/check/testdata/array/assign_return_value.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ fn Run() {
// CHECK:STDOUT: %.3: type = tuple_type (i32) [template]
// CHECK:STDOUT: %F.type: type = fn_type @F [template]
// CHECK:STDOUT: %F: %F.type = struct_value () [template]
// CHECK:STDOUT: %.4: i32 = int_literal 0 [template]
// CHECK:STDOUT: %.4: i32 = int_value 0 [template]
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.4) [template]
// CHECK:STDOUT: %Run.type: type = fn_type @Run [template]
// CHECK:STDOUT: %Run: %Run.type = struct_value () [template]
// CHECK:STDOUT: %.5: i32 = int_literal 1 [template]
// CHECK:STDOUT: %.5: i32 = int_value 1 [template]
// CHECK:STDOUT: %.6: type = array_type %.5, i32 [template]
// CHECK:STDOUT: %.7: type = ptr_type %.6 [template]
// CHECK:STDOUT: }
Expand Down Expand Up @@ -68,7 +68,7 @@ fn Run() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F() -> %.3 {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %.loc11_28: i32 = int_literal 0 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_28: i32 = int_value 0 [template = constants.%.4]
// CHECK:STDOUT: %.loc11_30: %.3 = tuple_literal (%.loc11_28)
// CHECK:STDOUT: %tuple: %.3 = tuple_value (%.loc11_28) [template = constants.%tuple]
// CHECK:STDOUT: %.loc11_31: %.3 = converted %.loc11_30, %tuple [template = constants.%tuple]
Expand All @@ -78,7 +78,7 @@ fn Run() {
// CHECK:STDOUT: fn @Run() {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %int.make_type_32: init type = call constants.%Int32() [template = i32]
// CHECK:STDOUT: %.loc14_16: i32 = int_literal 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_16: i32 = int_value 1 [template = constants.%.5]
// CHECK:STDOUT: %.loc14_11.1: type = value_of_initializer %int.make_type_32 [template = i32]
// CHECK:STDOUT: %.loc14_11.2: type = converted %int.make_type_32, %.loc14_11.1 [template = i32]
// CHECK:STDOUT: %.loc14_17: type = array_type %.loc14_16, i32 [template = constants.%.6]
Expand All @@ -90,7 +90,7 @@ fn Run() {
// CHECK:STDOUT: %.loc14_22.2: ref %.3 = temporary %.loc14_22.1, %F.call
// CHECK:STDOUT: %.loc14_22.3: ref i32 = tuple_access %.loc14_22.2, element0
// CHECK:STDOUT: %.loc14_22.4: i32 = bind_value %.loc14_22.3
// CHECK:STDOUT: %.loc14_22.5: i32 = int_literal 0 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_22.5: i32 = int_value 0 [template = constants.%.4]
// CHECK:STDOUT: %.loc14_22.6: ref i32 = array_index %t.var, %.loc14_22.5
// CHECK:STDOUT: %.loc14_22.7: init i32 = initialize_from %.loc14_22.4 to %.loc14_22.6
// CHECK:STDOUT: %.loc14_22.8: init %.6 = array_init (%.loc14_22.7) to %t.var
Expand Down
Loading

0 comments on commit bb33422

Please sign in to comment.