From 8073bcbc5e95365ff3a2a1979004d98357b6ce5f Mon Sep 17 00:00:00 2001 From: Geoffrey Romer Date: Thu, 31 Oct 2024 12:24:44 -0700 Subject: [PATCH] Respond to reviewer comments --- toolchain/lower/file_context.cpp | 42 ++++++++--- toolchain/lower/function_context.cpp | 2 +- toolchain/lower/function_context.h | 2 +- toolchain/lower/handle.cpp | 2 +- toolchain/lower/testdata/alias/local.carbon | 4 +- .../testdata/array/array_in_place.carbon | 4 +- .../testdata/array/assign_return_value.carbon | 8 +-- toolchain/lower/testdata/array/base.carbon | 4 +- .../testdata/array/function_param.carbon | 8 +-- .../lower/testdata/basics/false_true.carbon | 8 +-- .../lower/testdata/basics/int_types.carbon | 16 ++--- .../testdata/basics/numeric_literals.carbon | 4 +- .../lower/testdata/basics/type_values.carbon | 12 +--- toolchain/lower/testdata/basics/zero.carbon | 4 +- .../lower/testdata/builtins/big_int.carbon | 4 +- .../lower/testdata/builtins/float.carbon | 44 +++--------- toolchain/lower/testdata/builtins/int.carbon | 72 +++++-------------- .../builtins/method_vs_nonmethod.carbon | 8 +-- .../builtins/overloaded_operator.carbon | 4 +- .../lower/testdata/builtins/print.carbon | 4 +- .../lower/testdata/builtins/types.carbon | 4 +- toolchain/lower/testdata/builtins/uint.carbon | 72 +++++-------------- toolchain/lower/testdata/class/adapt.carbon | 20 ++---- toolchain/lower/testdata/class/base.carbon | 12 +--- toolchain/lower/testdata/class/basic.carbon | 4 +- toolchain/lower/testdata/class/field.carbon | 8 +-- toolchain/lower/testdata/class/method.carbon | 4 +- toolchain/lower/testdata/class/self.carbon | 8 +-- .../lower/testdata/class/value_access.carbon | 4 +- toolchain/lower/testdata/class/virtual.carbon | 8 +-- toolchain/lower/testdata/debug/nodebug.carbon | 4 +- .../function/call/empty_struct.carbon | 8 +-- .../testdata/function/call/empty_tuple.carbon | 8 +-- .../lower/testdata/function/call/i32.carbon | 8 +-- .../call/implicit_empty_tuple_as_arg.carbon | 12 +--- .../testdata/function/call/params_one.carbon | 8 +-- .../function/call/params_one_comma.carbon | 8 +-- .../testdata/function/call/params_two.carbon | 8 +-- .../function/call/params_two_comma.carbon | 8 +-- .../testdata/function/call/params_zero.carbon | 8 +-- .../function/call/return_implicit.carbon | 8 +-- .../function/call/struct_param.carbon | 8 +-- .../testdata/function/call/tuple_param.carbon | 8 +-- .../call/tuple_param_with_return_slot.carbon | 8 +-- .../testdata/function/call/var_param.carbon | 8 +-- .../function/declaration/simple.carbon | 4 +- .../function/definition/empty_struct.carbon | 4 +- .../function/definition/params_one.carbon | 4 +- .../function/definition/params_two.carbon | 4 +- .../function/definition/params_zero.carbon | 4 +- .../function/definition/raw_name.carbon | 4 +- .../testdata/function/generic/call.carbon | 4 +- .../lower/testdata/global/class_obj.carbon | 4 +- .../testdata/global/class_with_fun.carbon | 8 +-- .../lower/testdata/global/simple_init.carbon | 4 +- .../testdata/global/simple_with_fun.carbon | 8 +-- toolchain/lower/testdata/if/else.carbon | 16 ++--- toolchain/lower/testdata/if/no_else.carbon | 12 +--- toolchain/lower/testdata/if_expr/basic.carbon | 16 ++--- .../lower/testdata/if_expr/empty_block.carbon | 12 ++-- .../lower/testdata/impl/assoc_fn_alias.carbon | 8 +-- .../lower/testdata/impl/extend_impl.carbon | 12 +--- toolchain/lower/testdata/impl/impl.carbon | 8 +-- .../testdata/impl/instance_method.carbon | 8 +-- .../index/array_element_access.carbon | 12 +--- .../lower/testdata/interface/assoc.carbon | 4 +- .../lower/testdata/interface/basic.carbon | 8 +-- toolchain/lower/testdata/let/local.carbon | 4 +- toolchain/lower/testdata/let/tuple.carbon | 4 +- .../lower/testdata/namespace/function.carbon | 12 +--- .../lower/testdata/namespace/nested.carbon | 8 +-- toolchain/lower/testdata/operators/and.carbon | 16 ++--- .../testdata/operators/and_empty_block.carbon | 8 +-- .../testdata/operators/assignment.carbon | 4 +- toolchain/lower/testdata/operators/not.carbon | 4 +- toolchain/lower/testdata/operators/or.carbon | 16 ++--- .../testdata/operators/or_empty_block.carbon | 8 +-- .../testdata/operators/overloaded.carbon | 22 +++--- .../packages/cross_package_call.carbon | 8 +-- .../testdata/pointer/address_of_field.carbon | 4 +- .../testdata/pointer/address_of_unused.carbon | 4 +- toolchain/lower/testdata/pointer/basic.carbon | 8 +-- .../pointer/pointer_to_pointer.carbon | 4 +- .../testdata/return/code_after_return.carbon | 8 +-- .../lower/testdata/return/no_value.carbon | 4 +- .../lower/testdata/return/return_var.carbon | 4 +- .../testdata/return/return_var_byval.carbon | 4 +- toolchain/lower/testdata/return/value.carbon | 4 +- toolchain/lower/testdata/return/var.carbon | 4 +- toolchain/lower/testdata/struct/empty.carbon | 4 +- .../testdata/struct/member_access.carbon | 4 +- .../testdata/struct/nested_struct.carbon | 4 +- .../struct/nested_struct_in_place.carbon | 4 +- .../lower/testdata/struct/one_entry.carbon | 4 +- .../lower/testdata/struct/two_entries.carbon | 4 +- .../tuple/access/element_access.carbon | 4 +- .../tuple/access/return_value_access.carbon | 8 +-- toolchain/lower/testdata/tuple/empty.carbon | 4 +- .../lower/testdata/tuple/nested_tuple.carbon | 4 +- .../tuple/nested_tuple_in_place.carbon | 4 +- .../lower/testdata/tuple/one_entry.carbon | 4 +- .../lower/testdata/tuple/two_entries.carbon | 4 +- .../testdata/tuple/value_formation.carbon | 4 +- .../testdata/tuple/value_forwarding.carbon | 4 +- toolchain/lower/testdata/var/local.carbon | 4 +- .../testdata/while/break_continue.carbon | 3 +- .../lower/testdata/while/preheader.carbon | 3 +- .../testdata/while/unreachable_end.carbon | 4 +- toolchain/lower/testdata/while/while.carbon | 4 +- 109 files changed, 267 insertions(+), 665 deletions(-) diff --git a/toolchain/lower/file_context.cpp b/toolchain/lower/file_context.cpp index db9a4ecabcfc8..e03f463f8fc0c 100644 --- a/toolchain/lower/file_context.cpp +++ b/toolchain/lower/file_context.cpp @@ -397,25 +397,45 @@ auto FileContext::BuildFunctionDefinition(SemIR::FunctionId function_id) .GetAs(function.latest_decl_id()) .decl_block_id; } - llvm::ArrayRef singleton_decl_block = decl_block_id; - // Lower all blocks. - for (auto block_id : llvm::concat( - singleton_decl_block, body_block_ids)) { + // Lowers the contents of block_id into the corresponding LLVM block, + // creating it if it doesn't already exist. + auto lower_block = [&](SemIR::InstBlockId block_id) { CARBON_VLOG("Lowering {0}\n", block_id); auto* llvm_block = function_lowering.GetBlock(block_id); // Keep the LLVM blocks in lexical order. llvm_block->moveBefore(llvm_function->end()); function_lowering.builder().SetInsertPoint(llvm_block); - function_lowering.LowerBlock(block_id); + function_lowering.LowerBlockContents(block_id); + return llvm_block; + }; + + auto* llvm_decl_block = lower_block(decl_block_id); + + // If the decl block is empty, reuse it as the first body block. We don't do + // this when the decl block is non-empty so that any branches back to the + // first body block don't also re-execute the decl. + if (llvm_decl_block->empty()) { + CARBON_CHECK(function_lowering.TryToReuseBlock(body_block_ids.front(), + llvm_decl_block)); + } else { + function_lowering.builder().SetInsertPoint(llvm_decl_block); + function_lowering.builder().CreateBr( + function_lowering.GetBlock(body_block_ids.front())); } - // Add a terminator to the decl block. - function_lowering.builder().SetInsertPoint( - function_lowering.GetBlock(decl_block_id)); - function_lowering.builder().CreateBr( - function_lowering.GetBlock(body_block_ids.front())); - function_lowering.builder().ClearInsertionPoint(); + // Lower all blocks. + for (auto block_id : body_block_ids) { + lower_block(block_id); + } + + // LLVM requires that the entry block has no predecessors. + auto* entry_block = &llvm_function->getEntryBlock(); + if (entry_block->hasNPredecessorsOrMore(1)) { + auto* new_entry_block = llvm::BasicBlock::Create( + llvm_context(), "entry", llvm_function, entry_block); + llvm::BranchInst::Create(entry_block, new_entry_block); + } } auto FileContext::BuildDISubprogram(const SemIR::Function& function, diff --git a/toolchain/lower/function_context.cpp b/toolchain/lower/function_context.cpp index 3a9df72e65775..d904ade88ab76 100644 --- a/toolchain/lower/function_context.cpp +++ b/toolchain/lower/function_context.cpp @@ -49,7 +49,7 @@ auto FunctionContext::TryToReuseBlock(SemIR::InstBlockId block_id, return true; } -auto FunctionContext::LowerBlock(SemIR::InstBlockId block_id) -> void { +auto FunctionContext::LowerBlockContents(SemIR::InstBlockId block_id) -> void { for (auto inst_id : sem_ir().inst_blocks().Get(block_id)) { LowerInst(inst_id); } diff --git a/toolchain/lower/function_context.h b/toolchain/lower/function_context.h index b5213d8bea1df..76b7f1a3213b4 100644 --- a/toolchain/lower/function_context.h +++ b/toolchain/lower/function_context.h @@ -33,7 +33,7 @@ class FunctionContext { -> bool; // Builds LLVM IR for the sequence of instructions in `block_id`. - auto LowerBlock(SemIR::InstBlockId block_id) -> void; + auto LowerBlockContents(SemIR::InstBlockId block_id) -> void; // Builds LLVM IR for the specified instruction. auto LowerInst(SemIR::InstId inst_id) -> void; diff --git a/toolchain/lower/handle.cpp b/toolchain/lower/handle.cpp index 0b91f9e1c1536..8c25398284017 100644 --- a/toolchain/lower/handle.cpp +++ b/toolchain/lower/handle.cpp @@ -224,7 +224,7 @@ auto HandleInst(FunctionContext& context, SemIR::InstId /*inst_id*/, auto HandleInst(FunctionContext& context, SemIR::InstId inst_id, SemIR::SpliceBlock inst) -> void { - context.LowerBlock(inst.block_id); + context.LowerBlockContents(inst.block_id); context.SetLocal(inst_id, context.GetValue(inst.result_id)); } diff --git a/toolchain/lower/testdata/alias/local.carbon b/toolchain/lower/testdata/alias/local.carbon index 97e3493424da3..357d7d157db0b 100644 --- a/toolchain/lower/testdata/alias/local.carbon +++ b/toolchain/lower/testdata/alias/local.carbon @@ -18,9 +18,7 @@ fn F() -> i32 { // CHECK:STDOUT: source_filename = "local.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !7 // CHECK:STDOUT: store i32 0, ptr %a.var, align 4, !dbg !8 // CHECK:STDOUT: %.loc14 = load i32, ptr %a.var, align 4, !dbg !9 diff --git a/toolchain/lower/testdata/array/array_in_place.carbon b/toolchain/lower/testdata/array/array_in_place.carbon index 5424d2efefb9d..f446adac90699 100644 --- a/toolchain/lower/testdata/array/array_in_place.carbon +++ b/toolchain/lower/testdata/array/array_in_place.carbon @@ -20,9 +20,7 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(ptr sret({ i32, i32, i32 })) // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca [2 x { i32, i32, i32 }], align 8, !dbg !7 // CHECK:STDOUT: %.loc14_42.2.array.index = getelementptr inbounds [2 x { i32, i32, i32 }], ptr %v.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_42.2.array.index), !dbg !9 diff --git a/toolchain/lower/testdata/array/assign_return_value.carbon b/toolchain/lower/testdata/array/assign_return_value.carbon index 88e988d19cfee..c744d8b8c3301 100644 --- a/toolchain/lower/testdata/array/assign_return_value.carbon +++ b/toolchain/lower/testdata/array/assign_return_value.carbon @@ -20,9 +20,7 @@ fn Run() { // CHECK:STDOUT: @tuple.loc11_39 = internal constant { i32, i32 } { i32 12, i32 24 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc11_38.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc11_38.4.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.loc11_39, i64 8, i1 false), !dbg !8 @@ -30,9 +28,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %t.var = alloca [2 x i32], align 4, !dbg !10 // CHECK:STDOUT: %.loc14_22.1.temp = alloca { i32, i32 }, align 8, !dbg !11 // CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_22.1.temp), !dbg !11 diff --git a/toolchain/lower/testdata/array/base.carbon b/toolchain/lower/testdata/array/base.carbon index de328f8cc26b6..ddf6379c297fd 100644 --- a/toolchain/lower/testdata/array/base.carbon +++ b/toolchain/lower/testdata/array/base.carbon @@ -25,9 +25,7 @@ fn Run() { // CHECK:STDOUT: @tuple.2.loc15_37 = internal constant { i32, i32, i32 } { i32 1, i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca [1 x i32], align 4, !dbg !7 // CHECK:STDOUT: %.loc12_24.3.array.index = getelementptr inbounds [1 x i32], ptr %a.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @array.1.loc12_25, i64 4, i1 false), !dbg !9 diff --git a/toolchain/lower/testdata/array/function_param.carbon b/toolchain/lower/testdata/array/function_param.carbon index 7ede0ef9f55f6..3bca4f6c7dcdc 100644 --- a/toolchain/lower/testdata/array/function_param.carbon +++ b/toolchain/lower/testdata/array/function_param.carbon @@ -22,18 +22,14 @@ fn G() -> i32 { // CHECK:STDOUT: @array.loc16_20.13 = internal constant [3 x i32] [i32 1, i32 2, i32 3] // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main(ptr %arr, i32 %i) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc12_15.2.array.index = getelementptr inbounds [3 x i32], ptr %arr, i32 0, i32 %i, !dbg !7 // CHECK:STDOUT: %.loc12_15.3 = load i32, ptr %.loc12_15.2.array.index, align 4, !dbg !7 // CHECK:STDOUT: ret i32 %.loc12_15.3, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CG.Main() !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc16_20.2.temp = alloca [3 x i32], align 4, !dbg !10 // CHECK:STDOUT: %.loc16_20.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.2.temp, i32 0, i32 0, !dbg !10 // CHECK:STDOUT: %.loc16_20.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc16_20.2.temp, i32 0, i32 1, !dbg !10 diff --git a/toolchain/lower/testdata/basics/false_true.carbon b/toolchain/lower/testdata/basics/false_true.carbon index 1f9841be4eb52..e87edff19b181 100644 --- a/toolchain/lower/testdata/basics/false_true.carbon +++ b/toolchain/lower/testdata/basics/false_true.carbon @@ -20,16 +20,12 @@ fn T() -> bool { // CHECK:STDOUT: source_filename = "false_true.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i1 false, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CT.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i1 true, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/basics/int_types.carbon b/toolchain/lower/testdata/basics/int_types.carbon index 280da92256285..fe588c84723f3 100644 --- a/toolchain/lower/testdata/basics/int_types.carbon +++ b/toolchain/lower/testdata/basics/int_types.carbon @@ -17,30 +17,22 @@ fn F_u65536(a: u65536) -> u65536 { return a; } // CHECK:STDOUT: source_filename = "int_types.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i8 @_CF_i8.Main(i8 %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i8 %a, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i16 @_CF_u16.Main(i16 %a) !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i16 %a, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CF_i64.Main(i64 %a) !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i64 %a, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i65536 @_CF_u65536.Main(i65536 %a) !dbg !12 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i65536 %a, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/basics/numeric_literals.carbon b/toolchain/lower/testdata/basics/numeric_literals.carbon index a8835056a3055..ac9faab62d5e6 100644 --- a/toolchain/lower/testdata/basics/numeric_literals.carbon +++ b/toolchain/lower/testdata/basics/numeric_literals.carbon @@ -34,9 +34,7 @@ fn F() { // CHECK:STDOUT: @array.2.loc27_4 = internal constant [6 x double] [double 9.000000e-01, double 8.000000e+00, double 8.000000e+01, double 1.000000e+07, double 1.000000e+08, double 1.000000e-08] // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %ints.var = alloca [4 x i32], align 4, !dbg !7 // CHECK:STDOUT: %.loc19_3.3.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc19_3.6.array.index = getelementptr inbounds [4 x i32], ptr %ints.var, i32 0, i32 1, !dbg !8 diff --git a/toolchain/lower/testdata/basics/type_values.carbon b/toolchain/lower/testdata/basics/type_values.carbon index f30fe6c2d4399..46d753ddb4889 100644 --- a/toolchain/lower/testdata/basics/type_values.carbon +++ b/toolchain/lower/testdata/basics/type_values.carbon @@ -29,23 +29,17 @@ fn F64() -> type { // CHECK:STDOUT: %type = type {} // CHECK:STDOUT: // CHECK:STDOUT: define %type @_CI32.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret %type zeroinitializer, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define %type @_CI48.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret %type zeroinitializer, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define %type @_CF64.Main() !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret %type zeroinitializer, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/basics/zero.carbon b/toolchain/lower/testdata/basics/zero.carbon index 4bb1e0c4c7e27..b3bf6e2519afa 100644 --- a/toolchain/lower/testdata/basics/zero.carbon +++ b/toolchain/lower/testdata/basics/zero.carbon @@ -16,9 +16,7 @@ fn Main() -> i32 { // CHECK:STDOUT: source_filename = "zero.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CMain.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 0, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/big_int.carbon b/toolchain/lower/testdata/builtins/big_int.carbon index 3384ead0e3520..244f90137cace 100644 --- a/toolchain/lower/testdata/builtins/big_int.carbon +++ b/toolchain/lower/testdata/builtins/big_int.carbon @@ -18,9 +18,7 @@ fn Copy(x: Make()) -> Make() { // CHECK:STDOUT: source_filename = "big_int.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define {} @_CCopy.Main({} %x) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret {} %x, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/builtins/float.carbon b/toolchain/lower/testdata/builtins/float.carbon index c07f07f1a75f0..ff3bff56ba69b 100644 --- a/toolchain/lower/testdata/builtins/float.carbon +++ b/toolchain/lower/testdata/builtins/float.carbon @@ -45,89 +45,67 @@ fn TestGreaterEq(a: f64, b: f64) -> bool { return GreaterEq(a, b); } // CHECK:STDOUT: source_filename = "float.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define double @_CTestNegate.Main(double %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.negate = fneg double %a, !dbg !7 // CHECK:STDOUT: ret double %float.negate, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define double @_CTestAdd.Main(double %a, double %b) !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.add = fadd double %a, %b, !dbg !10 // CHECK:STDOUT: ret double %float.add, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define double @_CTestSub.Main(double %a, double %b) !dbg !12 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.sub = fsub double %a, %b, !dbg !13 // CHECK:STDOUT: ret double %float.sub, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define double @_CTestMul.Main(double %a, double %b) !dbg !15 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.mul = fmul double %a, %b, !dbg !16 // CHECK:STDOUT: ret double %float.mul, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define double @_CTestDiv.Main(double %a, double %b) !dbg !18 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.div = fdiv double %a, %b, !dbg !19 // CHECK:STDOUT: ret double %float.div, !dbg !20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestEq.Main(double %a, double %b) !dbg !21 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.eq = fcmp oeq double %a, %b, !dbg !22 // CHECK:STDOUT: ret i1 %float.eq, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestNeq.Main(double %a, double %b) !dbg !24 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.neq = fcmp one double %a, %b, !dbg !25 // CHECK:STDOUT: ret i1 %float.neq, !dbg !26 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestLess.Main(double %a, double %b) !dbg !27 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.less = fcmp olt double %a, %b, !dbg !28 // CHECK:STDOUT: ret i1 %float.less, !dbg !29 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestLessEq.Main(double %a, double %b) !dbg !30 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.less_eq = fcmp ole double %a, %b, !dbg !31 // CHECK:STDOUT: ret i1 %float.less_eq, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestGreater.Main(double %a, double %b) !dbg !33 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.greater = fcmp ogt double %a, %b, !dbg !34 // CHECK:STDOUT: ret i1 %float.greater, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(double %a, double %b) !dbg !36 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %float.greater_eq = fcmp oge double %a, %b, !dbg !37 // CHECK:STDOUT: ret i1 %float.greater_eq, !dbg !38 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/builtins/int.carbon b/toolchain/lower/testdata/builtins/int.carbon index fe918d138a8b4..51ee33fd7c20f 100644 --- a/toolchain/lower/testdata/builtins/int.carbon +++ b/toolchain/lower/testdata/builtins/int.carbon @@ -66,145 +66,109 @@ fn TestGreaterEq(a: i32, b: i32) -> bool { return GreaterEq(a, b); } // CHECK:STDOUT: source_filename = "int.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestNegate.Main(i32 %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.snegate = sub i32 0, %a, !dbg !7 // CHECK:STDOUT: ret i32 %int.snegate, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestAdd.Main(i32 %a, i32 %b) !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.sadd = add i32 %a, %b, !dbg !10 // CHECK:STDOUT: ret i32 %int.sadd, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestSub.Main(i32 %a, i32 %b) !dbg !12 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.ssub = sub i32 %a, %b, !dbg !13 // CHECK:STDOUT: ret i32 %int.ssub, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestMul.Main(i32 %a, i32 %b) !dbg !15 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.smul = mul i32 %a, %b, !dbg !16 // CHECK:STDOUT: ret i32 %int.smul, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestDiv.Main(i32 %a, i32 %b) !dbg !18 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.sdiv = sdiv i32 %a, %b, !dbg !19 // CHECK:STDOUT: ret i32 %int.sdiv, !dbg !20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestMod.Main(i32 %a, i32 %b) !dbg !21 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.smod = srem i32 %a, %b, !dbg !22 // CHECK:STDOUT: ret i32 %int.smod, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestComplement.Main(i32 %a) !dbg !24 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.complement = xor i32 -1, %a, !dbg !25 // CHECK:STDOUT: ret i32 %int.complement, !dbg !26 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestAnd.Main(i32 %a, i32 %b) !dbg !27 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.and = and i32 %a, %b, !dbg !28 // CHECK:STDOUT: ret i32 %int.and, !dbg !29 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestOr.Main(i32 %a, i32 %b) !dbg !30 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.or = or i32 %a, %b, !dbg !31 // CHECK:STDOUT: ret i32 %int.or, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestXor.Main(i32 %a, i32 %b) !dbg !33 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.xor = xor i32 %a, %b, !dbg !34 // CHECK:STDOUT: ret i32 %int.xor, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestLeftShift.Main(i32 %a, i32 %b) !dbg !36 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.left_shift = shl i32 %a, %b, !dbg !37 // CHECK:STDOUT: ret i32 %int.left_shift, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestRightShift.Main(i32 %a, i32 %b) !dbg !39 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.right_shift = ashr i32 %a, %b, !dbg !40 // CHECK:STDOUT: ret i32 %int.right_shift, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestEq.Main(i32 %a, i32 %b) !dbg !42 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.eq = icmp eq i32 %a, %b, !dbg !43 // CHECK:STDOUT: ret i1 %int.eq, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestNeq.Main(i32 %a, i32 %b) !dbg !45 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.neq = icmp ne i32 %a, %b, !dbg !46 // CHECK:STDOUT: ret i1 %int.neq, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestLess.Main(i32 %a, i32 %b) !dbg !48 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.less = icmp slt i32 %a, %b, !dbg !49 // CHECK:STDOUT: ret i1 %int.less, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestLessEq.Main(i32 %a, i32 %b) !dbg !51 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.less_eq = icmp sle i32 %a, %b, !dbg !52 // CHECK:STDOUT: ret i1 %int.less_eq, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestGreater.Main(i32 %a, i32 %b) !dbg !54 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.greater = icmp sgt i32 %a, %b, !dbg !55 // CHECK:STDOUT: ret i1 %int.greater, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(i32 %a, i32 %b) !dbg !57 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.greater_eq = icmp sge i32 %a, %b, !dbg !58 // CHECK:STDOUT: ret i1 %int.greater_eq, !dbg !59 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/builtins/method_vs_nonmethod.carbon b/toolchain/lower/testdata/builtins/method_vs_nonmethod.carbon index f0183b0a8217a..c759e6557a380 100644 --- a/toolchain/lower/testdata/builtins/method_vs_nonmethod.carbon +++ b/toolchain/lower/testdata/builtins/method_vs_nonmethod.carbon @@ -18,17 +18,13 @@ fn TestAddMethod(a: i32, b: i32) -> i32 { return a.(AddMethod)(b); } // CHECK:STDOUT: source_filename = "method_vs_nonmethod.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestAddNonmethod.Main(i32 %a, i32 %b) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.sadd = add i32 %a, %b, !dbg !7 // CHECK:STDOUT: ret i32 %int.sadd, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTestAddMethod.Main(i32 %a, i32 %b) !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.sadd = add i32 %a, %b, !dbg !10 // CHECK:STDOUT: ret i32 %int.sadd, !dbg !11 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/builtins/overloaded_operator.carbon b/toolchain/lower/testdata/builtins/overloaded_operator.carbon index 76528eb1b8925..3b9064f1ea49f 100644 --- a/toolchain/lower/testdata/builtins/overloaded_operator.carbon +++ b/toolchain/lower/testdata/builtins/overloaded_operator.carbon @@ -22,9 +22,7 @@ fn AddThreeIntegers(a: i32, b: i32, c: i32) -> i32 { // CHECK:STDOUT: source_filename = "overloaded_operator.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CAddThreeIntegers.Main(i32 %a, i32 %b, i32 %c) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.sadd.loc18_12 = add i32 %a, %b, !dbg !7 // CHECK:STDOUT: %.loc18_12.3.temp = alloca i32, align 4, !dbg !7 // CHECK:STDOUT: store i32 %int.sadd.loc18_12, ptr %.loc18_12.3.temp, align 4, !dbg !7 diff --git a/toolchain/lower/testdata/builtins/print.carbon b/toolchain/lower/testdata/builtins/print.carbon index 3684d890656b9..b3666bc72949a 100644 --- a/toolchain/lower/testdata/builtins/print.carbon +++ b/toolchain/lower/testdata/builtins/print.carbon @@ -18,9 +18,7 @@ fn Main() { // CHECK:STDOUT: @printf.int.format = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %print.int.printf = call i32 (ptr, ...) @printf(ptr @printf.int.format, i32 1), !dbg !7 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/builtins/types.carbon b/toolchain/lower/testdata/builtins/types.carbon index bc774c7e014b2..25b716c6c55ae 100644 --- a/toolchain/lower/testdata/builtins/types.carbon +++ b/toolchain/lower/testdata/builtins/types.carbon @@ -22,9 +22,7 @@ fn F() { // CHECK:STDOUT: source_filename = "types.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %i.var = alloca i32, align 4, !dbg !7 // CHECK:STDOUT: store i32 0, ptr %i.var, align 4, !dbg !8 // CHECK:STDOUT: %f.var = alloca double, align 8, !dbg !9 diff --git a/toolchain/lower/testdata/builtins/uint.carbon b/toolchain/lower/testdata/builtins/uint.carbon index 5870328eb47f0..25c13a04d1624 100644 --- a/toolchain/lower/testdata/builtins/uint.carbon +++ b/toolchain/lower/testdata/builtins/uint.carbon @@ -66,145 +66,109 @@ fn TestGreaterEq(a: u64, b: u64) -> bool { return GreaterEq(a, b); } // CHECK:STDOUT: source_filename = "uint.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestNegate.Main(i64 %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.unegate = sub i64 0, %a, !dbg !7 // CHECK:STDOUT: ret i64 %int.unegate, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestAdd.Main(i64 %a, i64 %b) !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.uadd = add i64 %a, %b, !dbg !10 // CHECK:STDOUT: ret i64 %int.uadd, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestSub.Main(i64 %a, i64 %b) !dbg !12 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.usub = sub i64 %a, %b, !dbg !13 // CHECK:STDOUT: ret i64 %int.usub, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestMul.Main(i64 %a, i64 %b) !dbg !15 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.umul = mul i64 %a, %b, !dbg !16 // CHECK:STDOUT: ret i64 %int.umul, !dbg !17 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestDiv.Main(i64 %a, i64 %b) !dbg !18 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.udiv = udiv i64 %a, %b, !dbg !19 // CHECK:STDOUT: ret i64 %int.udiv, !dbg !20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestMod.Main(i64 %a, i64 %b) !dbg !21 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.umod = urem i64 %a, %b, !dbg !22 // CHECK:STDOUT: ret i64 %int.umod, !dbg !23 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestComplement.Main(i64 %a) !dbg !24 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.complement = xor i64 -1, %a, !dbg !25 // CHECK:STDOUT: ret i64 %int.complement, !dbg !26 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestAnd.Main(i64 %a, i64 %b) !dbg !27 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.and = and i64 %a, %b, !dbg !28 // CHECK:STDOUT: ret i64 %int.and, !dbg !29 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestOr.Main(i64 %a, i64 %b) !dbg !30 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.or = or i64 %a, %b, !dbg !31 // CHECK:STDOUT: ret i64 %int.or, !dbg !32 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestXor.Main(i64 %a, i64 %b) !dbg !33 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.xor = xor i64 %a, %b, !dbg !34 // CHECK:STDOUT: ret i64 %int.xor, !dbg !35 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestLeftShift.Main(i64 %a, i64 %b) !dbg !36 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.left_shift = shl i64 %a, %b, !dbg !37 // CHECK:STDOUT: ret i64 %int.left_shift, !dbg !38 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i64 @_CTestRightShift.Main(i64 %a, i64 %b) !dbg !39 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.right_shift = lshr i64 %a, %b, !dbg !40 // CHECK:STDOUT: ret i64 %int.right_shift, !dbg !41 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestEq.Main(i64 %a, i64 %b) !dbg !42 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.eq = icmp eq i64 %a, %b, !dbg !43 // CHECK:STDOUT: ret i1 %int.eq, !dbg !44 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestNeq.Main(i64 %a, i64 %b) !dbg !45 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.neq = icmp ne i64 %a, %b, !dbg !46 // CHECK:STDOUT: ret i1 %int.neq, !dbg !47 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestLess.Main(i64 %a, i64 %b) !dbg !48 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.less = icmp ult i64 %a, %b, !dbg !49 // CHECK:STDOUT: ret i1 %int.less, !dbg !50 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestLessEq.Main(i64 %a, i64 %b) !dbg !51 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.less_eq = icmp ule i64 %a, %b, !dbg !52 // CHECK:STDOUT: ret i1 %int.less_eq, !dbg !53 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestGreater.Main(i64 %a, i64 %b) !dbg !54 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.greater = icmp ugt i64 %a, %b, !dbg !55 // CHECK:STDOUT: ret i1 %int.greater, !dbg !56 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(i64 %a, i64 %b) !dbg !57 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %int.greater_eq = icmp uge i64 %a, %b, !dbg !58 // CHECK:STDOUT: ret i1 %int.greater_eq, !dbg !59 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/class/adapt.carbon b/toolchain/lower/testdata/class/adapt.carbon index e73770108685c..4e6f176cd77a8 100644 --- a/toolchain/lower/testdata/class/adapt.carbon +++ b/toolchain/lower/testdata/class/adapt.carbon @@ -57,9 +57,7 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: @struct.loc9_28 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMake.PairOfInts.Main(ptr sret({ i32, i32 }) %return) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc9_27.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc9_27.4.b = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @struct.loc9_28, i64 8, i1 false), !dbg !8 @@ -67,26 +65,20 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMake.PairAdapter.Main(ptr sret({ i32, i32 }) %return) !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CMake.PairOfInts.Main(ptr %return), !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CGetB.PairAdapter.Main(ptr %self) !dbg !12 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc22_14.1.b = getelementptr inbounds nuw { i32, i32 }, ptr %self, i32 0, i32 1, !dbg !13 // CHECK:STDOUT: %.loc22_14.2 = load i32, ptr %.loc22_14.1.b, align 4, !dbg !13 // CHECK:STDOUT: ret i32 %.loc22_14.2, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CUse.Main() !dbg !15 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %pa.var = alloca { i32, i32 }, align 8, !dbg !16 // CHECK:STDOUT: call void @_CMake.PairAdapter.Main(ptr %pa.var), !dbg !17 // CHECK:STDOUT: %GetB.call = call i32 @_CGetB.PairAdapter.Main(ptr %pa.var), !dbg !18 @@ -125,9 +117,7 @@ fn DoStuff(a: Int) -> Int { // CHECK:STDOUT: source_filename = "adapt_int.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CDoStuff.Main(i32 %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 %a, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/class/base.carbon b/toolchain/lower/testdata/class/base.carbon index 9cbcd71845287..b992df0201388 100644 --- a/toolchain/lower/testdata/class/base.carbon +++ b/toolchain/lower/testdata/class/base.carbon @@ -36,9 +36,7 @@ fn Convert(p: Derived*) -> Base* { // CHECK:STDOUT: @struct.2.loc22_36 = internal constant { { i32 }, i32 } { { i32 } { i32 4 }, i32 7 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMake.Main(ptr sret({ { i32 }, i32 }) %return) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc22_35.2.base = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc22_26.2.b = getelementptr inbounds nuw { i32 }, ptr %.loc22_35.2.base, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc22_35.4.d = getelementptr inbounds nuw { { i32 }, i32 }, ptr %return, i32 0, i32 1, !dbg !7 @@ -47,9 +45,7 @@ fn Convert(p: Derived*) -> Base* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CAccess.Main(ptr sret({ i32, i32 }) %return, ptr %d) !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc26_12.1.d = getelementptr inbounds nuw { { i32 }, i32 }, ptr %d, i32 0, i32 1, !dbg !11 // CHECK:STDOUT: %.loc26_12.2 = load i32, ptr %.loc26_12.1.d, align 4, !dbg !11 // CHECK:STDOUT: %.loc26_17.1.base = getelementptr inbounds nuw { { i32 }, i32 }, ptr %d, i32 0, i32 0, !dbg !12 @@ -63,9 +59,7 @@ fn Convert(p: Derived*) -> Base* { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define ptr @_CConvert.Main(ptr %p) !dbg !15 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc30_11.2.base = getelementptr inbounds nuw { { i32 }, i32 }, ptr %p, i32 0, i32 0, !dbg !16 // CHECK:STDOUT: ret ptr %.loc30_11.2.base, !dbg !16 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/class/basic.carbon b/toolchain/lower/testdata/class/basic.carbon index f26de8771cbc1..97a1858eecb76 100644 --- a/toolchain/lower/testdata/class/basic.carbon +++ b/toolchain/lower/testdata/class/basic.carbon @@ -26,9 +26,7 @@ fn Run() { // CHECK:STDOUT: declare void @_CF.Main(ptr sret({ i32, ptr }), ptr) // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %c.var = alloca { i32, ptr }, align 8, !dbg !7 // CHECK:STDOUT: %d.var = alloca { i32, ptr }, align 8, !dbg !8 // CHECK:STDOUT: call void @_CF.Main(ptr %d.var, ptr %c.var), !dbg !9 diff --git a/toolchain/lower/testdata/class/field.carbon b/toolchain/lower/testdata/class/field.carbon index a61c67dd0abbd..720f401147fa2 100644 --- a/toolchain/lower/testdata/class/field.carbon +++ b/toolchain/lower/testdata/class/field.carbon @@ -28,9 +28,7 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "field.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main(ptr %c) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc17_13.1.b = getelementptr inbounds nuw { i32, ptr }, ptr %c, i32 0, i32 1, !dbg !7 // CHECK:STDOUT: %.loc17_13.2 = load ptr, ptr %.loc17_13.1.b, align 8, !dbg !7 // CHECK:STDOUT: %.loc17_16.1.a = getelementptr inbounds nuw { i32, ptr }, ptr %.loc17_13.2, i32 0, i32 0, !dbg !8 @@ -39,9 +37,7 @@ fn Run() -> i32 { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %c.var = alloca { i32, ptr }, align 8, !dbg !11 // CHECK:STDOUT: %.loc22_4.a = getelementptr inbounds nuw { i32, ptr }, ptr %c.var, i32 0, i32 0, !dbg !12 // CHECK:STDOUT: store i32 1, ptr %.loc22_4.a, align 4, !dbg !12 diff --git a/toolchain/lower/testdata/class/method.carbon b/toolchain/lower/testdata/class/method.carbon index ebe6a973c0747..c70b6c06938b9 100644 --- a/toolchain/lower/testdata/class/method.carbon +++ b/toolchain/lower/testdata/class/method.carbon @@ -28,9 +28,7 @@ fn F(p: C*) { // CHECK:STDOUT: declare void @_CSet.C.Main(ptr, i32) // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main(ptr %p) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %Get.call = call i32 @_CGet.C.Main(ptr %p), !dbg !7 // CHECK:STDOUT: call void @_CSet.C.Main(ptr %p, i32 %Get.call), !dbg !8 // CHECK:STDOUT: ret void, !dbg !9 diff --git a/toolchain/lower/testdata/class/self.carbon b/toolchain/lower/testdata/class/self.carbon index 1a2222e83721d..40f2dc115df1b 100644 --- a/toolchain/lower/testdata/class/self.carbon +++ b/toolchain/lower/testdata/class/self.carbon @@ -27,18 +27,14 @@ fn C.Set[addr self: C*]() { // CHECK:STDOUT: source_filename = "self.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CGet.C.Main(ptr %self) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc19_14.1.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc19_14.2 = load i32, ptr %.loc19_14.1.a, align 4, !dbg !7 // CHECK:STDOUT: ret i32 %.loc19_14.2, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CSet.C.Main(ptr %self) !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc23_10.a = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !10 // CHECK:STDOUT: store i32 1, ptr %.loc23_10.a, align 4, !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 diff --git a/toolchain/lower/testdata/class/value_access.carbon b/toolchain/lower/testdata/class/value_access.carbon index 54d292603eb7d..693c865d10f7f 100644 --- a/toolchain/lower/testdata/class/value_access.carbon +++ b/toolchain/lower/testdata/class/value_access.carbon @@ -23,9 +23,7 @@ fn F(c: C) -> i32 { // CHECK:STDOUT: source_filename = "value_access.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main(ptr %c) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc19_11.1.a = getelementptr inbounds nuw { { i32, i32, i32 } }, ptr %c, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc19_11.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %.loc19_11.1.a, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc19_11.3 = load i32, ptr %.loc19_11.2.tuple.elem, align 4, !dbg !7 diff --git a/toolchain/lower/testdata/class/virtual.carbon b/toolchain/lower/testdata/class/virtual.carbon index 489b0010ad77f..78a1d15f5540a 100644 --- a/toolchain/lower/testdata/class/virtual.carbon +++ b/toolchain/lower/testdata/class/virtual.carbon @@ -37,9 +37,7 @@ fn Use(v: Intermediate*) { // CHECK:STDOUT: declare void @_CFn.Derived.Main() // CHECK:STDOUT: // CHECK:STDOUT: define void @_CCreate.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %b.var = alloca {}, align 8, !dbg !7 // CHECK:STDOUT: %i.var = alloca { ptr, {} }, align 8, !dbg !8 // CHECK:STDOUT: %d.var = alloca { { ptr, {} } }, align 8, !dbg !9 @@ -47,9 +45,7 @@ fn Use(v: Intermediate*) { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CUse.Main(ptr %v) !dbg !11 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CFn.Intermediate.Main(), !dbg !12 // CHECK:STDOUT: ret void, !dbg !13 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/debug/nodebug.carbon b/toolchain/lower/testdata/debug/nodebug.carbon index 911683c063830..5450be65aecd7 100644 --- a/toolchain/lower/testdata/debug/nodebug.carbon +++ b/toolchain/lower/testdata/debug/nodebug.carbon @@ -17,8 +17,6 @@ fn F() { // CHECK:STDOUT: source_filename = "nodebug.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/call/empty_struct.carbon b/toolchain/lower/testdata/function/call/empty_struct.carbon index 5bd86e7eb2225..c320614ff2da4 100644 --- a/toolchain/lower/testdata/function/call/empty_struct.carbon +++ b/toolchain/lower/testdata/function/call/empty_struct.carbon @@ -20,16 +20,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "empty_struct.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CEcho.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %b.var = alloca {}, align 8, !dbg !9 // CHECK:STDOUT: call void @_CEcho.Main(), !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 diff --git a/toolchain/lower/testdata/function/call/empty_tuple.carbon b/toolchain/lower/testdata/function/call/empty_tuple.carbon index 53afe20df1bed..c05c94f1d634c 100644 --- a/toolchain/lower/testdata/function/call/empty_tuple.carbon +++ b/toolchain/lower/testdata/function/call/empty_tuple.carbon @@ -20,16 +20,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "empty_tuple.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CEcho.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %b.var = alloca {}, align 8, !dbg !9 // CHECK:STDOUT: call void @_CEcho.Main(), !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 diff --git a/toolchain/lower/testdata/function/call/i32.carbon b/toolchain/lower/testdata/function/call/i32.carbon index 8710b92345bf0..3e4a9e4914a2c 100644 --- a/toolchain/lower/testdata/function/call/i32.carbon +++ b/toolchain/lower/testdata/function/call/i32.carbon @@ -20,16 +20,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "i32.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CEcho.Main(i32 %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 %a, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %b.var = alloca i32, align 4, !dbg !9 // CHECK:STDOUT: %Echo.call = call i32 @_CEcho.Main(i32 1), !dbg !10 // CHECK:STDOUT: store i32 %Echo.call, ptr %b.var, align 4, !dbg !11 diff --git a/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon b/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon index ded6976e1c844..c68cea9e89630 100644 --- a/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon +++ b/toolchain/lower/testdata/function/call/implicit_empty_tuple_as_arg.carbon @@ -21,23 +21,17 @@ fn Main() { // CHECK:STDOUT: source_filename = "implicit_empty_tuple_as_arg.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CFoo.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CBar.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca {}, align 8, !dbg !11 // CHECK:STDOUT: call void @_CFoo.Main(), !dbg !12 // CHECK:STDOUT: %.loc17_22.1.temp = alloca {}, align 8, !dbg !12 diff --git a/toolchain/lower/testdata/function/call/params_one.carbon b/toolchain/lower/testdata/function/call/params_one.carbon index 8df7ce79c7bd6..da5f946c7319c 100644 --- a/toolchain/lower/testdata/function/call/params_one.carbon +++ b/toolchain/lower/testdata/function/call/params_one.carbon @@ -18,16 +18,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "params_one.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CFoo.Main(i32 %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CFoo.Main(i32 1), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/call/params_one_comma.carbon b/toolchain/lower/testdata/function/call/params_one_comma.carbon index c7aea0d5ecac4..267c93bf89c0f 100644 --- a/toolchain/lower/testdata/function/call/params_one_comma.carbon +++ b/toolchain/lower/testdata/function/call/params_one_comma.carbon @@ -19,16 +19,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "params_one_comma.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CFoo.Main(i32 %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CFoo.Main(i32 1), !dbg !9 // CHECK:STDOUT: call void @_CFoo.Main(i32 1), !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 diff --git a/toolchain/lower/testdata/function/call/params_two.carbon b/toolchain/lower/testdata/function/call/params_two.carbon index 9f4777a89b7ba..06ffd7467bef5 100644 --- a/toolchain/lower/testdata/function/call/params_two.carbon +++ b/toolchain/lower/testdata/function/call/params_two.carbon @@ -18,16 +18,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "params_two.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CFoo.Main(i32 %a, i32 %b) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CFoo.Main(i32 1, i32 2), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/call/params_two_comma.carbon b/toolchain/lower/testdata/function/call/params_two_comma.carbon index 50cd086e49ebe..b3137f22b3239 100644 --- a/toolchain/lower/testdata/function/call/params_two_comma.carbon +++ b/toolchain/lower/testdata/function/call/params_two_comma.carbon @@ -19,16 +19,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "params_two_comma.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CFoo.Main(i32 %a, i32 %b) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CFoo.Main(i32 1, i32 2), !dbg !9 // CHECK:STDOUT: call void @_CFoo.Main(i32 1, i32 2), !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 diff --git a/toolchain/lower/testdata/function/call/params_zero.carbon b/toolchain/lower/testdata/function/call/params_zero.carbon index 69cb24c234e26..26a6884ef6d4a 100644 --- a/toolchain/lower/testdata/function/call/params_zero.carbon +++ b/toolchain/lower/testdata/function/call/params_zero.carbon @@ -18,16 +18,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "params_zero.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CFoo.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CFoo.Main(), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/call/return_implicit.carbon b/toolchain/lower/testdata/function/call/return_implicit.carbon index 189a9e0142f4b..a1e3c1a511260 100644 --- a/toolchain/lower/testdata/function/call/return_implicit.carbon +++ b/toolchain/lower/testdata/function/call/return_implicit.carbon @@ -20,16 +20,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "return_implicit.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMakeImplicitEmptyTuple.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %b.var = alloca {}, align 8, !dbg !9 // CHECK:STDOUT: call void @_CMakeImplicitEmptyTuple.Main(), !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 diff --git a/toolchain/lower/testdata/function/call/struct_param.carbon b/toolchain/lower/testdata/function/call/struct_param.carbon index a42b28c14b007..c1d708b2f05cf 100644 --- a/toolchain/lower/testdata/function/call/struct_param.carbon +++ b/toolchain/lower/testdata/function/call/struct_param.carbon @@ -20,16 +20,12 @@ fn Main() { // CHECK:STDOUT: @struct.3.loc14_34.2 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main({ i32 } %b, ptr %c) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @struct.3.loc14_34.2), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/call/tuple_param.carbon b/toolchain/lower/testdata/function/call/tuple_param.carbon index 92cbd18acc036..fea4246e72916 100644 --- a/toolchain/lower/testdata/function/call/tuple_param.carbon +++ b/toolchain/lower/testdata/function/call/tuple_param.carbon @@ -20,16 +20,12 @@ fn Main() { // CHECK:STDOUT: @tuple.3.loc14_20.2 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main({ i32 } %b, ptr %c) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CF.Main({ i32 } { i32 1 }, ptr @tuple.3.loc14_20.2), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon index 01884afd6eb33..89715764c0634 100644 --- a/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon +++ b/toolchain/lower/testdata/function/call/tuple_param_with_return_slot.carbon @@ -22,9 +22,7 @@ fn Main() { // CHECK:STDOUT: @tuple.3.loc16_20.2 = internal constant { i32, i32 } { i32 2, i32 3 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32, i32 }) %return, { i32 } %b, ptr %c) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc12_12.tuple.elem = extractvalue { i32 } %b, 0, !dbg !7 // CHECK:STDOUT: %.loc12_17.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %c, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc12_17.tuple.elem.load = load i32, ptr %.loc12_17.tuple.elem, align 4, !dbg !8 @@ -40,9 +38,7 @@ fn Main() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !12 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc16_4.1.temp = alloca { i32, i32, i32 }, align 8, !dbg !13 // CHECK:STDOUT: call void @_CF.Main(ptr %.loc16_4.1.temp, { i32 } { i32 1 }, ptr @tuple.3.loc16_20.2), !dbg !13 // CHECK:STDOUT: ret void, !dbg !14 diff --git a/toolchain/lower/testdata/function/call/var_param.carbon b/toolchain/lower/testdata/function/call/var_param.carbon index 850f32473e11e..0ebccd348889d 100644 --- a/toolchain/lower/testdata/function/call/var_param.carbon +++ b/toolchain/lower/testdata/function/call/var_param.carbon @@ -19,16 +19,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "var_param.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CDoNothing.Main(i32 %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !9 // CHECK:STDOUT: store i32 0, ptr %a.var, align 4, !dbg !10 // CHECK:STDOUT: %.loc15 = load i32, ptr %a.var, align 4, !dbg !11 diff --git a/toolchain/lower/testdata/function/declaration/simple.carbon b/toolchain/lower/testdata/function/declaration/simple.carbon index ce64f29b83a75..6b5f82ba6edd4 100644 --- a/toolchain/lower/testdata/function/declaration/simple.carbon +++ b/toolchain/lower/testdata/function/declaration/simple.carbon @@ -18,9 +18,7 @@ fn G(n: i32) { F(n); } // CHECK:STDOUT: declare void @_CF.Main(i32) // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main(i32 %n) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CF.Main(i32 %n), !dbg !7 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/function/definition/empty_struct.carbon b/toolchain/lower/testdata/function/definition/empty_struct.carbon index 31c6acee06b84..62b6f3e5e3e89 100644 --- a/toolchain/lower/testdata/function/definition/empty_struct.carbon +++ b/toolchain/lower/testdata/function/definition/empty_struct.carbon @@ -15,9 +15,7 @@ fn Echo(a: {}) { // CHECK:STDOUT: source_filename = "empty_struct.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CEcho.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/params_one.carbon b/toolchain/lower/testdata/function/definition/params_one.carbon index 94e5b0f4086d1..81b4389676181 100644 --- a/toolchain/lower/testdata/function/definition/params_one.carbon +++ b/toolchain/lower/testdata/function/definition/params_one.carbon @@ -14,9 +14,7 @@ fn Foo(a: i32) {} // CHECK:STDOUT: source_filename = "params_one.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CFoo.Main(i32 %a) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/params_two.carbon b/toolchain/lower/testdata/function/definition/params_two.carbon index f6007e639cda2..2ade1989c27bb 100644 --- a/toolchain/lower/testdata/function/definition/params_two.carbon +++ b/toolchain/lower/testdata/function/definition/params_two.carbon @@ -14,9 +14,7 @@ fn Foo(a: i32, b: i32) {} // CHECK:STDOUT: source_filename = "params_two.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CFoo.Main(i32 %a, i32 %b) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/params_zero.carbon b/toolchain/lower/testdata/function/definition/params_zero.carbon index 2b298d24bb04b..3faed3f0c4f62 100644 --- a/toolchain/lower/testdata/function/definition/params_zero.carbon +++ b/toolchain/lower/testdata/function/definition/params_zero.carbon @@ -14,9 +14,7 @@ fn Foo() {} // CHECK:STDOUT: source_filename = "params_zero.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CFoo.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/definition/raw_name.carbon b/toolchain/lower/testdata/function/definition/raw_name.carbon index feea0aa1bcd33..b25e5b7bd1be6 100644 --- a/toolchain/lower/testdata/function/definition/raw_name.carbon +++ b/toolchain/lower/testdata/function/definition/raw_name.carbon @@ -15,9 +15,7 @@ fn r#self() {} // CHECK:STDOUT: source_filename = "raw_name.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_Cself.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/function/generic/call.carbon b/toolchain/lower/testdata/function/generic/call.carbon index 1e8c5aa743a9b..2c843e594b169 100644 --- a/toolchain/lower/testdata/function/generic/call.carbon +++ b/toolchain/lower/testdata/function/generic/call.carbon @@ -34,9 +34,7 @@ fn G() { // CHECK:STDOUT: @struct.2.loc19_16 = internal constant {} zeroinitializer // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %c.var = alloca {}, align 8, !dbg !7 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %c.var, ptr align 1 @struct.1.loc18_16, i64 0, i1 false), !dbg !8 // CHECK:STDOUT: %d.var = alloca {}, align 8, !dbg !9 diff --git a/toolchain/lower/testdata/global/class_obj.carbon b/toolchain/lower/testdata/global/class_obj.carbon index 42ced8e8cdfcb..00d3ed5d6284f 100644 --- a/toolchain/lower/testdata/global/class_obj.carbon +++ b/toolchain/lower/testdata/global/class_obj.carbon @@ -19,9 +19,7 @@ var a: A = {}; // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: define void @_C__global_init.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 @a, ptr align 1 @struct.loc12_14, i64 0, i1 false), !dbg !7 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/global/class_with_fun.carbon b/toolchain/lower/testdata/global/class_with_fun.carbon index 0ea65f374890e..c0570446d2f31 100644 --- a/toolchain/lower/testdata/global/class_with_fun.carbon +++ b/toolchain/lower/testdata/global/class_with_fun.carbon @@ -24,17 +24,13 @@ var a: A = {}; // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: define void @_Cret_a.Main(ptr sret({}) %return) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %return, ptr align 1 @struct.loc13_12, i64 0, i1 false), !dbg !7 // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_C__global_init.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 @a, ptr align 1 @struct.loc16_14, i64 0, i1 false), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/global/simple_init.carbon b/toolchain/lower/testdata/global/simple_init.carbon index 1a4c2ffa195af..6591ab48b3df3 100644 --- a/toolchain/lower/testdata/global/simple_init.carbon +++ b/toolchain/lower/testdata/global/simple_init.carbon @@ -16,9 +16,7 @@ var a: i32 = 0; // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: define void @_C__global_init.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: store i32 0, ptr @a, align 4, !dbg !7 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/global/simple_with_fun.carbon b/toolchain/lower/testdata/global/simple_with_fun.carbon index 74826c3908834..761b9abb0261f 100644 --- a/toolchain/lower/testdata/global/simple_with_fun.carbon +++ b/toolchain/lower/testdata/global/simple_with_fun.carbon @@ -21,16 +21,12 @@ var a: i32 = test_a(); // CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }] // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_Ctest_a.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 0, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_C__global_init.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %test_a.call = call i32 @_Ctest_a.Main(), !dbg !9 // CHECK:STDOUT: store i32 %test_a.call, ptr @a, align 4, !dbg !10 // CHECK:STDOUT: ret void, !dbg !11 diff --git a/toolchain/lower/testdata/if/else.carbon b/toolchain/lower/testdata/if/else.carbon index ac1fa061e8888..0bf402bef0adc 100644 --- a/toolchain/lower/testdata/if/else.carbon +++ b/toolchain/lower/testdata/if/else.carbon @@ -25,30 +25,22 @@ fn If(b: bool) { // CHECK:STDOUT: source_filename = "else.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CH.Main() !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !11 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CIf.Main(i1 %b) !dbg !12 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: br i1 %b, label %if.then, label %if.else, !dbg !13 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry diff --git a/toolchain/lower/testdata/if/no_else.carbon b/toolchain/lower/testdata/if/no_else.carbon index 08c070ae9c38f..21b9cbc7b6b13 100644 --- a/toolchain/lower/testdata/if/no_else.carbon +++ b/toolchain/lower/testdata/if/no_else.carbon @@ -22,23 +22,17 @@ fn If(b: bool) { // CHECK:STDOUT: source_filename = "no_else.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CIf.Main(i1 %b) !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: br i1 %b, label %if.then, label %if.else, !dbg !11 // CHECK:STDOUT: // CHECK:STDOUT: if.then: ; preds = %entry diff --git a/toolchain/lower/testdata/if_expr/basic.carbon b/toolchain/lower/testdata/if_expr/basic.carbon index 8711b32474636..919be2d4f742e 100644 --- a/toolchain/lower/testdata/if_expr/basic.carbon +++ b/toolchain/lower/testdata/if_expr/basic.carbon @@ -19,23 +19,17 @@ fn Select(b: bool) -> i32 { // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 1, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CG.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 2, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CSelect.Main(i1 %b) !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: br i1 %b, label %if.expr.then, label %if.expr.else, !dbg !11 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.then: ; preds = %entry @@ -47,8 +41,8 @@ fn Select(b: bool) -> i32 { // CHECK:STDOUT: br label %if.expr.result, !dbg !11 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.result: ; preds = %if.expr.else, %if.expr.then -// CHECK:STDOUT: %1 = phi i32 [ %F.call, %if.expr.then ], [ %G.call, %if.expr.else ] -// CHECK:STDOUT: ret i32 %1, !dbg !14 +// CHECK:STDOUT: %0 = phi i32 [ %F.call, %if.expr.then ], [ %G.call, %if.expr.else ] +// CHECK:STDOUT: ret i32 %0, !dbg !14 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.module.flags = !{!0, !1} diff --git a/toolchain/lower/testdata/if_expr/empty_block.carbon b/toolchain/lower/testdata/if_expr/empty_block.carbon index b00bf998aeeca..fb3e33cfb4150 100644 --- a/toolchain/lower/testdata/if_expr/empty_block.carbon +++ b/toolchain/lower/testdata/if_expr/empty_block.carbon @@ -16,9 +16,7 @@ fn Select(b: bool, c: bool, d: bool) -> i32 { // CHECK:STDOUT: source_filename = "empty_block.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CSelect.Main(i1 %b, i1 %c, i1 %d) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: br i1 %b, label %if.expr.then.loc12_10, label %if.expr.else.loc12_10, !dbg !7 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.then.loc12_10: ; preds = %entry @@ -31,7 +29,7 @@ fn Select(b: bool, c: bool, d: bool) -> i32 { // CHECK:STDOUT: br label %if.expr.result.loc12_20, !dbg !8 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.result.loc12_20: ; preds = %if.expr.else.loc12_20, %if.expr.then.loc12_20 -// CHECK:STDOUT: %1 = phi i32 [ 1, %if.expr.then.loc12_20 ], [ 2, %if.expr.else.loc12_20 ] +// CHECK:STDOUT: %0 = phi i32 [ 1, %if.expr.then.loc12_20 ], [ 2, %if.expr.else.loc12_20 ] // CHECK:STDOUT: br label %if.expr.result.loc12_10, !dbg !7 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.else.loc12_10: ; preds = %entry @@ -44,12 +42,12 @@ fn Select(b: bool, c: bool, d: bool) -> i32 { // CHECK:STDOUT: br label %if.expr.result.loc12_44, !dbg !9 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.result.loc12_44: ; preds = %if.expr.else.loc12_44, %if.expr.then.loc12_44 -// CHECK:STDOUT: %2 = phi i32 [ 3, %if.expr.then.loc12_44 ], [ 4, %if.expr.else.loc12_44 ] +// CHECK:STDOUT: %1 = phi i32 [ 3, %if.expr.then.loc12_44 ], [ 4, %if.expr.else.loc12_44 ] // CHECK:STDOUT: br label %if.expr.result.loc12_10, !dbg !7 // CHECK:STDOUT: // CHECK:STDOUT: if.expr.result.loc12_10: ; preds = %if.expr.result.loc12_44, %if.expr.result.loc12_20 -// CHECK:STDOUT: %3 = phi i32 [ %1, %if.expr.result.loc12_20 ], [ %2, %if.expr.result.loc12_44 ] -// CHECK:STDOUT: ret i32 %3, !dbg !10 +// CHECK:STDOUT: %2 = phi i32 [ %0, %if.expr.result.loc12_20 ], [ %1, %if.expr.result.loc12_44 ] +// CHECK:STDOUT: ret i32 %2, !dbg !10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.module.flags = !{!0, !1} diff --git a/toolchain/lower/testdata/impl/assoc_fn_alias.carbon b/toolchain/lower/testdata/impl/assoc_fn_alias.carbon index 072e39b1f49b0..0da3a2fe68deb 100644 --- a/toolchain/lower/testdata/impl/assoc_fn_alias.carbon +++ b/toolchain/lower/testdata/impl/assoc_fn_alias.carbon @@ -31,18 +31,14 @@ fn Call(a: A) -> i32 { // CHECK:STDOUT: source_filename = "assoc_fn_alias.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @"_CF.A.Main:I.Main"(ptr %self) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc22_16.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc22_16.2 = load i32, ptr %.loc22_16.1.n, align 4, !dbg !7 // CHECK:STDOUT: ret i32 %.loc22_16.2, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CCall.Main(ptr %a) !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %F.call = call i32 @"_CF.A.Main:I.Main"(ptr %a), !dbg !10 // CHECK:STDOUT: ret i32 %F.call, !dbg !11 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/impl/extend_impl.carbon b/toolchain/lower/testdata/impl/extend_impl.carbon index 1cf3b36567c4c..9583cac774df9 100644 --- a/toolchain/lower/testdata/impl/extend_impl.carbon +++ b/toolchain/lower/testdata/impl/extend_impl.carbon @@ -32,24 +32,18 @@ fn InstanceAccess(a: A) -> i32 { // CHECK:STDOUT: source_filename = "extend_impl.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @"_CF.A.Main:I.Main"() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 0, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CTypeAccess.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %F.call = call i32 @"_CF.A.Main:I.Main"(), !dbg !9 // CHECK:STDOUT: ret i32 %F.call, !dbg !10 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CInstanceAccess.Main(ptr %a) !dbg !11 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %F.call = call i32 @"_CF.A.Main:I.Main"(), !dbg !12 // CHECK:STDOUT: ret i32 %F.call, !dbg !13 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/impl/impl.carbon b/toolchain/lower/testdata/impl/impl.carbon index 5872a50a3314f..ff653b26b8113 100644 --- a/toolchain/lower/testdata/impl/impl.carbon +++ b/toolchain/lower/testdata/impl/impl.carbon @@ -30,18 +30,14 @@ fn Call(a: A) -> i32 { // CHECK:STDOUT: source_filename = "impl.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @"_CF.A.Main:I.Main"(ptr %self) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc21_16.1.n = getelementptr inbounds nuw { i32 }, ptr %self, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc21_16.2 = load i32, ptr %.loc21_16.1.n, align 4, !dbg !7 // CHECK:STDOUT: ret i32 %.loc21_16.2, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CCall.Main(ptr %a) !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %F.call = call i32 @"_CF.A.Main:I.Main"(ptr %a), !dbg !10 // CHECK:STDOUT: ret i32 %F.call, !dbg !11 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/impl/instance_method.carbon b/toolchain/lower/testdata/impl/instance_method.carbon index a29e27635b880..62947f7d0115a 100644 --- a/toolchain/lower/testdata/impl/instance_method.carbon +++ b/toolchain/lower/testdata/impl/instance_method.carbon @@ -30,16 +30,12 @@ fn Call(a: A*) -> A* { // CHECK:STDOUT: source_filename = "instance_method.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define ptr @"_CGet.A.Main:GetSelf.Main"(ptr %self) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret ptr %self, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define ptr @_CCall.Main(ptr %a) !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %Get.call = call ptr @"_CGet.A.Main:GetSelf.Main"(ptr %a), !dbg !9 // CHECK:STDOUT: ret ptr %Get.call, !dbg !10 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/index/array_element_access.carbon b/toolchain/lower/testdata/index/array_element_access.carbon index 292cddb78c699..ca4ed8469e09d 100644 --- a/toolchain/lower/testdata/index/array_element_access.carbon +++ b/toolchain/lower/testdata/index/array_element_access.carbon @@ -25,9 +25,7 @@ fn Run() { // CHECK:STDOUT: @array.loc12_35 = internal constant [2 x i32] [i32 1, i32 2] // CHECK:STDOUT: // CHECK:STDOUT: define void @_CA.Main(ptr sret({ i32, i32 }) %return) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc10_36.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc10_36.4.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.loc10_37, i64 8, i1 false), !dbg !8 @@ -35,9 +33,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CB.Main(ptr sret([2 x i32]) %return) !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc12_34.3.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i32 0, !dbg !10 // CHECK:STDOUT: %.loc12_34.6.array.index = getelementptr inbounds [2 x i32], ptr %return, i32 0, i32 1, !dbg !10 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @array.loc12_35, i64 8, i1 false), !dbg !11 @@ -45,9 +41,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !12 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca [2 x i32], align 4, !dbg !13 // CHECK:STDOUT: %.loc15_22.1.temp = alloca { i32, i32 }, align 8, !dbg !14 // CHECK:STDOUT: call void @_CA.Main(ptr %.loc15_22.1.temp), !dbg !14 diff --git a/toolchain/lower/testdata/interface/assoc.carbon b/toolchain/lower/testdata/interface/assoc.carbon index 81c4a18311f3d..b79d1b9c6d9f9 100644 --- a/toolchain/lower/testdata/interface/assoc.carbon +++ b/toolchain/lower/testdata/interface/assoc.carbon @@ -18,9 +18,7 @@ fn F() { I.Assoc; } // CHECK:STDOUT: source_filename = "assoc.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/interface/basic.carbon b/toolchain/lower/testdata/interface/basic.carbon index c95986e8e0d8e..68dc97cabeb0b 100644 --- a/toolchain/lower/testdata/interface/basic.carbon +++ b/toolchain/lower/testdata/interface/basic.carbon @@ -25,16 +25,12 @@ fn G(T: J) {} // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/let/local.carbon b/toolchain/lower/testdata/let/local.carbon index 533d5df3f6dd5..03ba276789a2e 100644 --- a/toolchain/lower/testdata/let/local.carbon +++ b/toolchain/lower/testdata/let/local.carbon @@ -18,9 +18,7 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "local.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 1, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/let/tuple.carbon b/toolchain/lower/testdata/let/tuple.carbon index 7f20187f0c6c0..c85ccd405e1ea 100644 --- a/toolchain/lower/testdata/let/tuple.carbon +++ b/toolchain/lower/testdata/let/tuple.carbon @@ -22,9 +22,7 @@ fn F() -> i32 { // CHECK:STDOUT: @tuple.2.loc13_29 = internal constant { i32, i32 } { i32 4, i32 5 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %.loc12_36.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc12_36.4.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !8 diff --git a/toolchain/lower/testdata/namespace/function.carbon b/toolchain/lower/testdata/namespace/function.carbon index 644e7c3a3db56..f8bf1a3410a19 100644 --- a/toolchain/lower/testdata/namespace/function.carbon +++ b/toolchain/lower/testdata/namespace/function.carbon @@ -25,23 +25,17 @@ fn Bar() { // CHECK:STDOUT: source_filename = "function.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CBaz.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CBaz.Foo.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CBar.Main() !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CBaz.Foo.Main(), !dbg !11 // CHECK:STDOUT: ret void, !dbg !12 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/namespace/nested.carbon b/toolchain/lower/testdata/namespace/nested.carbon index e6588925ff204..d804bab460879 100644 --- a/toolchain/lower/testdata/namespace/nested.carbon +++ b/toolchain/lower/testdata/namespace/nested.carbon @@ -22,16 +22,12 @@ fn Foo.Bar.Baz() { // CHECK:STDOUT: source_filename = "nested.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CWiz.Bar.Foo.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CBaz.Bar.Foo.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CWiz.Bar.Foo.Main(), !dbg !9 // CHECK:STDOUT: ret void, !dbg !10 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/operators/and.carbon b/toolchain/lower/testdata/operators/and.carbon index 1e5975e2c1ff0..4fdcb44ef7f2e 100644 --- a/toolchain/lower/testdata/operators/and.carbon +++ b/toolchain/lower/testdata/operators/and.carbon @@ -19,23 +19,17 @@ fn And() -> bool { // CHECK:STDOUT: source_filename = "and.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i1 true, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CG.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i1 true, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CAnd.Main() !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %F.call = call i1 @_CF.Main(), !dbg !11 // CHECK:STDOUT: br i1 %F.call, label %and.rhs, label %and.result, !dbg !11 // CHECK:STDOUT: @@ -44,8 +38,8 @@ fn And() -> bool { // CHECK:STDOUT: br label %and.result, !dbg !11 // CHECK:STDOUT: // CHECK:STDOUT: and.result: ; preds = %and.rhs, %entry -// CHECK:STDOUT: %1 = phi i1 [ false, %entry ], [ %G.call, %and.rhs ] -// CHECK:STDOUT: ret i1 %1, !dbg !13 +// CHECK:STDOUT: %0 = phi i1 [ false, %entry ], [ %G.call, %and.rhs ] +// CHECK:STDOUT: ret i1 %0, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.module.flags = !{!0, !1} diff --git a/toolchain/lower/testdata/operators/and_empty_block.carbon b/toolchain/lower/testdata/operators/and_empty_block.carbon index 1e4dbf51ea2c8..71b4219997819 100644 --- a/toolchain/lower/testdata/operators/and_empty_block.carbon +++ b/toolchain/lower/testdata/operators/and_empty_block.carbon @@ -18,17 +18,15 @@ fn And(b: bool, c: bool) -> bool { // CHECK:STDOUT: source_filename = "and_empty_block.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CAnd.Main(i1 %b, i1 %c) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: br i1 %b, label %and.rhs, label %and.result, !dbg !7 // CHECK:STDOUT: // CHECK:STDOUT: and.rhs: ; preds = %entry // CHECK:STDOUT: br label %and.result, !dbg !7 // CHECK:STDOUT: // CHECK:STDOUT: and.result: ; preds = %and.rhs, %entry -// CHECK:STDOUT: %1 = phi i1 [ false, %entry ], [ %c, %and.rhs ] -// CHECK:STDOUT: ret i1 %1, !dbg !8 +// CHECK:STDOUT: %0 = phi i1 [ false, %entry ], [ %c, %and.rhs ] +// CHECK:STDOUT: ret i1 %0, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.module.flags = !{!0, !1} diff --git a/toolchain/lower/testdata/operators/assignment.carbon b/toolchain/lower/testdata/operators/assignment.carbon index 5ca6f9c55e95f..3d1ecf4869776 100644 --- a/toolchain/lower/testdata/operators/assignment.carbon +++ b/toolchain/lower/testdata/operators/assignment.carbon @@ -21,9 +21,7 @@ fn Main() { // CHECK:STDOUT: @tuple.loc15_5 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca i32, align 4, !dbg !7 // CHECK:STDOUT: store i32 12, ptr %a.var, align 4, !dbg !8 // CHECK:STDOUT: store i32 9, ptr %a.var, align 4, !dbg !9 diff --git a/toolchain/lower/testdata/operators/not.carbon b/toolchain/lower/testdata/operators/not.carbon index 6826857936db6..5eee885f91336 100644 --- a/toolchain/lower/testdata/operators/not.carbon +++ b/toolchain/lower/testdata/operators/not.carbon @@ -16,9 +16,7 @@ fn Not(b: bool) -> bool { // CHECK:STDOUT: source_filename = "not.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CNot.Main(i1 %b) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc12 = xor i1 %b, true, !dbg !7 // CHECK:STDOUT: ret i1 %.loc12, !dbg !8 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/operators/or.carbon b/toolchain/lower/testdata/operators/or.carbon index 9a6e965a51fbe..f3ff4786adef4 100644 --- a/toolchain/lower/testdata/operators/or.carbon +++ b/toolchain/lower/testdata/operators/or.carbon @@ -19,23 +19,17 @@ fn Or() -> bool { // CHECK:STDOUT: source_filename = "or.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i1 true, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_CG.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i1 true, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_COr.Main() !dbg !10 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %F.call = call i1 @_CF.Main(), !dbg !11 // CHECK:STDOUT: %.loc15_14.3 = xor i1 %F.call, true, !dbg !11 // CHECK:STDOUT: br i1 %.loc15_14.3, label %or.rhs, label %or.result, !dbg !11 @@ -45,8 +39,8 @@ fn Or() -> bool { // CHECK:STDOUT: br label %or.result, !dbg !11 // CHECK:STDOUT: // CHECK:STDOUT: or.result: ; preds = %or.rhs, %entry -// CHECK:STDOUT: %1 = phi i1 [ true, %entry ], [ %G.call, %or.rhs ] -// CHECK:STDOUT: ret i1 %1, !dbg !13 +// CHECK:STDOUT: %0 = phi i1 [ true, %entry ], [ %G.call, %or.rhs ] +// CHECK:STDOUT: ret i1 %0, !dbg !13 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.module.flags = !{!0, !1} diff --git a/toolchain/lower/testdata/operators/or_empty_block.carbon b/toolchain/lower/testdata/operators/or_empty_block.carbon index 85ccabc699aa1..94988174f445d 100644 --- a/toolchain/lower/testdata/operators/or_empty_block.carbon +++ b/toolchain/lower/testdata/operators/or_empty_block.carbon @@ -18,9 +18,7 @@ fn Or(b: bool, c: bool) -> bool { // CHECK:STDOUT: source_filename = "or_empty_block.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i1 @_COr.Main(i1 %b, i1 %c) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc14_12.1 = xor i1 %b, true, !dbg !7 // CHECK:STDOUT: br i1 %.loc14_12.1, label %or.rhs, label %or.result, !dbg !7 // CHECK:STDOUT: @@ -28,8 +26,8 @@ fn Or(b: bool, c: bool) -> bool { // CHECK:STDOUT: br label %or.result, !dbg !7 // CHECK:STDOUT: // CHECK:STDOUT: or.result: ; preds = %or.rhs, %entry -// CHECK:STDOUT: %1 = phi i1 [ true, %entry ], [ %c, %or.rhs ] -// CHECK:STDOUT: ret i1 %1, !dbg !8 +// CHECK:STDOUT: %0 = phi i1 [ true, %entry ], [ %c, %or.rhs ] +// CHECK:STDOUT: ret i1 %0, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: !llvm.module.flags = !{!0, !1} diff --git a/toolchain/lower/testdata/operators/overloaded.carbon b/toolchain/lower/testdata/operators/overloaded.carbon index e101032f4a638..51a3f7826634b 100644 --- a/toolchain/lower/testdata/operators/overloaded.carbon +++ b/toolchain/lower/testdata/operators/overloaded.carbon @@ -32,9 +32,7 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: source_filename = "overloaded.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @"_COp.Number.Main:Negate.Core"(ptr sret({ i1 }) %return, ptr %self) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc17_36.1.is_positive = getelementptr inbounds nuw { i1 }, ptr %self, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc17_36.2 = load i1, ptr %.loc17_36.1.is_positive, align 1, !dbg !7 // CHECK:STDOUT: %.loc17_28 = xor i1 %.loc17_36.2, true, !dbg !8 @@ -44,9 +42,7 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @"_COp.Number.Main:Mul.Core"(ptr sret({ i1 }) %return, ptr %self, ptr %other) !dbg !11 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc22_33.1.is_positive = getelementptr inbounds nuw { i1 }, ptr %self, i32 0, i32 0, !dbg !12 // CHECK:STDOUT: %.loc22_33.2 = load i1, ptr %.loc22_33.1.is_positive, align 1, !dbg !12 // CHECK:STDOUT: br i1 %.loc22_33.2, label %and.rhs.loc22, label %and.result.loc22, !dbg !12 @@ -57,8 +53,8 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: br label %and.result.loc22, !dbg !12 // CHECK:STDOUT: // CHECK:STDOUT: and.result.loc22: ; preds = %and.rhs.loc22, %entry -// CHECK:STDOUT: %1 = phi i1 [ false, %entry ], [ %.loc22_55.2, %and.rhs.loc22 ] -// CHECK:STDOUT: %.loc22_69.1 = xor i1 %1, true, !dbg !14 +// CHECK:STDOUT: %0 = phi i1 [ false, %entry ], [ %.loc22_55.2, %and.rhs.loc22 ] +// CHECK:STDOUT: %.loc22_69.1 = xor i1 %0, true, !dbg !14 // CHECK:STDOUT: br i1 %.loc22_69.1, label %or.rhs, label %or.result, !dbg !14 // CHECK:STDOUT: // CHECK:STDOUT: or.rhs: ; preds = %and.result.loc22 @@ -74,20 +70,18 @@ fn Calculate(a: Number, b: Number) -> Number { // CHECK:STDOUT: br label %and.result.loc23, !dbg !16 // CHECK:STDOUT: // CHECK:STDOUT: and.result.loc23: ; preds = %and.rhs.loc23, %or.rhs -// CHECK:STDOUT: %2 = phi i1 [ false, %or.rhs ], [ %.loc23_55, %and.rhs.loc23 ] +// CHECK:STDOUT: %1 = phi i1 [ false, %or.rhs ], [ %.loc23_55, %and.rhs.loc23 ] // CHECK:STDOUT: br label %or.result, !dbg !14 // CHECK:STDOUT: // CHECK:STDOUT: or.result: ; preds = %and.result.loc23, %and.result.loc22 -// CHECK:STDOUT: %3 = phi i1 [ true, %and.result.loc22 ], [ %2, %and.result.loc23 ] +// CHECK:STDOUT: %2 = phi i1 [ true, %and.result.loc22 ], [ %1, %and.result.loc23 ] // CHECK:STDOUT: %.loc23_77.2.is_positive = getelementptr inbounds nuw { i1 }, ptr %return, i32 0, i32 0, !dbg !19 -// CHECK:STDOUT: store i1 %3, ptr %.loc23_77.2.is_positive, align 1, !dbg !19 +// CHECK:STDOUT: store i1 %2, ptr %.loc23_77.2.is_positive, align 1, !dbg !19 // CHECK:STDOUT: ret void, !dbg !20 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CCalculate.Main(ptr sret({ i1 }) %return, ptr %a, ptr %b) !dbg !21 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc28_10.3.temp = alloca { i1 }, align 8, !dbg !22 // CHECK:STDOUT: call void @"_COp.Number.Main:Negate.Core"(ptr %.loc28_10.3.temp, ptr %a), !dbg !22 // CHECK:STDOUT: call void @"_COp.Number.Main:Mul.Core"(ptr %return, ptr %.loc28_10.3.temp, ptr %b), !dbg !22 diff --git a/toolchain/lower/testdata/packages/cross_package_call.carbon b/toolchain/lower/testdata/packages/cross_package_call.carbon index 8efb24d073f49..2e0039264ba4d 100644 --- a/toolchain/lower/testdata/packages/cross_package_call.carbon +++ b/toolchain/lower/testdata/packages/cross_package_call.carbon @@ -24,9 +24,7 @@ fn G() { A.NS.F(); } // CHECK:STDOUT: source_filename = "a.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.NS.A() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: @@ -45,9 +43,7 @@ fn G() { A.NS.F(); } // CHECK:STDOUT: source_filename = "b.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CF.NS.A(), !dbg !7 // CHECK:STDOUT: ret void, !dbg !8 // CHECK:STDOUT: } diff --git a/toolchain/lower/testdata/pointer/address_of_field.carbon b/toolchain/lower/testdata/pointer/address_of_field.carbon index 406568feb7cc6..56b7fa5e0161b 100644 --- a/toolchain/lower/testdata/pointer/address_of_field.carbon +++ b/toolchain/lower/testdata/pointer/address_of_field.carbon @@ -23,9 +23,7 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %s.var = alloca { i32, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %.loc14_46.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc14_46.4.b = getelementptr inbounds nuw { i32, i32 }, ptr %s.var, i32 0, i32 1, !dbg !8 diff --git a/toolchain/lower/testdata/pointer/address_of_unused.carbon b/toolchain/lower/testdata/pointer/address_of_unused.carbon index 6b5a1595a1c8d..0b0f94d4fee0b 100644 --- a/toolchain/lower/testdata/pointer/address_of_unused.carbon +++ b/toolchain/lower/testdata/pointer/address_of_unused.carbon @@ -17,9 +17,7 @@ fn F() { // CHECK:STDOUT: source_filename = "address_of_unused.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !7 // CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !8 // CHECK:STDOUT: ret void, !dbg !9 diff --git a/toolchain/lower/testdata/pointer/basic.carbon b/toolchain/lower/testdata/pointer/basic.carbon index 450fe6e336b2e..3b3aade1fd607 100644 --- a/toolchain/lower/testdata/pointer/basic.carbon +++ b/toolchain/lower/testdata/pointer/basic.carbon @@ -21,17 +21,13 @@ fn F() -> i32 { // CHECK:STDOUT: source_filename = "basic.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CG.Main(ptr %p) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc12_10.2 = load i32, ptr %p, align 4, !dbg !7 // CHECK:STDOUT: ret i32 %.loc12_10.2, !dbg !8 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main() !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %n.var = alloca i32, align 4, !dbg !10 // CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !11 // CHECK:STDOUT: %G.call = call i32 @_CG.Main(ptr %n.var), !dbg !12 diff --git a/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon b/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon index 4ed39355933ce..e68f2c18f7c7e 100644 --- a/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon +++ b/toolchain/lower/testdata/pointer/pointer_to_pointer.carbon @@ -19,9 +19,7 @@ fn F(p: i32**) -> i32 { // CHECK:STDOUT: source_filename = "pointer_to_pointer.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CF.Main(ptr %p) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca ptr, align 8, !dbg !7 // CHECK:STDOUT: store ptr %p, ptr %a.var, align 8, !dbg !8 // CHECK:STDOUT: %b.var = alloca ptr, align 8, !dbg !9 diff --git a/toolchain/lower/testdata/return/code_after_return.carbon b/toolchain/lower/testdata/return/code_after_return.carbon index 4615d54aab9d1..1df8d4b8d464c 100644 --- a/toolchain/lower/testdata/return/code_after_return.carbon +++ b/toolchain/lower/testdata/return/code_after_return.carbon @@ -19,16 +19,12 @@ fn Main() { // CHECK:STDOUT: source_filename = "code_after_return.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !8 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !9 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/return/no_value.carbon b/toolchain/lower/testdata/return/no_value.carbon index 4cc7f65a60bdb..7c9572b421cb8 100644 --- a/toolchain/lower/testdata/return/no_value.carbon +++ b/toolchain/lower/testdata/return/no_value.carbon @@ -16,9 +16,7 @@ fn Main() { // CHECK:STDOUT: source_filename = "no_value.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMain.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret void, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/return/return_var.carbon b/toolchain/lower/testdata/return/return_var.carbon index 06ea555306bd6..3063aa012c0f6 100644 --- a/toolchain/lower/testdata/return/return_var.carbon +++ b/toolchain/lower/testdata/return/return_var.carbon @@ -23,9 +23,7 @@ fn Make() -> C { // CHECK:STDOUT: source_filename = "return_var.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define void @_CMake.Main(ptr sret({ i32, ptr }) %return) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc18_30.2.data = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc18_30.4.next = getelementptr inbounds nuw { i32, ptr }, ptr %return, i32 0, i32 1, !dbg !7 // CHECK:STDOUT: store ptr %return, ptr %.loc18_30.4.next, align 8, !dbg !7 diff --git a/toolchain/lower/testdata/return/return_var_byval.carbon b/toolchain/lower/testdata/return/return_var_byval.carbon index ead44b970a934..55c420829238c 100644 --- a/toolchain/lower/testdata/return/return_var_byval.carbon +++ b/toolchain/lower/testdata/return/return_var_byval.carbon @@ -17,9 +17,7 @@ fn Main() -> i32 { // CHECK:STDOUT: source_filename = "return_var_byval.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CMain.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !7 // CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !8 // CHECK:STDOUT: %.loc12_16 = load i32, ptr %x.var, align 4, !dbg !7 diff --git a/toolchain/lower/testdata/return/value.carbon b/toolchain/lower/testdata/return/value.carbon index c5dd08e10144d..0a772d6970f5f 100644 --- a/toolchain/lower/testdata/return/value.carbon +++ b/toolchain/lower/testdata/return/value.carbon @@ -16,9 +16,7 @@ fn Main() -> i32 { // CHECK:STDOUT: source_filename = "value.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CMain.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 0, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/return/var.carbon b/toolchain/lower/testdata/return/var.carbon index 32c626c76d526..271544d634efc 100644 --- a/toolchain/lower/testdata/return/var.carbon +++ b/toolchain/lower/testdata/return/var.carbon @@ -17,9 +17,7 @@ fn Main() -> i32 { // CHECK:STDOUT: source_filename = "var.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @_CMain.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !7 // CHECK:STDOUT: store i32 0, ptr %x.var, align 4, !dbg !8 // CHECK:STDOUT: %.loc13 = load i32, ptr %x.var, align 4, !dbg !9 diff --git a/toolchain/lower/testdata/struct/empty.carbon b/toolchain/lower/testdata/struct/empty.carbon index e48a4a18bd01b..3cc6457fc6c03 100644 --- a/toolchain/lower/testdata/struct/empty.carbon +++ b/toolchain/lower/testdata/struct/empty.carbon @@ -18,9 +18,7 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "empty.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca {}, align 8, !dbg !7 // CHECK:STDOUT: %y.var = alloca {}, align 8, !dbg !8 // CHECK:STDOUT: ret i32 0, !dbg !9 diff --git a/toolchain/lower/testdata/struct/member_access.carbon b/toolchain/lower/testdata/struct/member_access.carbon index bb5590b6cb277..c617c889b1758 100644 --- a/toolchain/lower/testdata/struct/member_access.carbon +++ b/toolchain/lower/testdata/struct/member_access.carbon @@ -21,9 +21,7 @@ fn Run() -> i32 { // CHECK:STDOUT: @struct.loc12_49 = internal constant { double, i32 } { double 0.000000e+00, i32 1 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { double, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %.loc12_48.2.a = getelementptr inbounds nuw { double, i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc12_48.4.b = getelementptr inbounds nuw { double, i32 }, ptr %x.var, i32 0, i32 1, !dbg !8 diff --git a/toolchain/lower/testdata/struct/nested_struct.carbon b/toolchain/lower/testdata/struct/nested_struct.carbon index 8cb99a0c24323..aa2a251c0b351 100644 --- a/toolchain/lower/testdata/struct/nested_struct.carbon +++ b/toolchain/lower/testdata/struct/nested_struct.carbon @@ -17,9 +17,7 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "nested_struct.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 0, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/struct/nested_struct_in_place.carbon b/toolchain/lower/testdata/struct/nested_struct_in_place.carbon index b091b32189772..b110ded86f14b 100644 --- a/toolchain/lower/testdata/struct/nested_struct_in_place.carbon +++ b/toolchain/lower/testdata/struct/nested_struct_in_place.carbon @@ -20,9 +20,7 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(ptr sret({ i32, i32, i32 })) // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca { { i32, i32, i32 }, { i32, i32, i32 } }, align 8, !dbg !7 // CHECK:STDOUT: %.loc14_74.1.a = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %v.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_74.1.a), !dbg !9 diff --git a/toolchain/lower/testdata/struct/one_entry.carbon b/toolchain/lower/testdata/struct/one_entry.carbon index a57345c5999ef..b55ed350498c4 100644 --- a/toolchain/lower/testdata/struct/one_entry.carbon +++ b/toolchain/lower/testdata/struct/one_entry.carbon @@ -18,9 +18,7 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "one_entry.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { i32 }, align 8, !dbg !7 // CHECK:STDOUT: store { i32 } { i32 4 }, ptr %x.var, align 4, !dbg !8 // CHECK:STDOUT: %y.var = alloca { i32 }, align 8, !dbg !9 diff --git a/toolchain/lower/testdata/struct/two_entries.carbon b/toolchain/lower/testdata/struct/two_entries.carbon index 37e438348cfc2..47a71cb151a36 100644 --- a/toolchain/lower/testdata/struct/two_entries.carbon +++ b/toolchain/lower/testdata/struct/two_entries.carbon @@ -20,9 +20,7 @@ fn Run() -> i32 { // CHECK:STDOUT: @struct.loc12_47 = internal constant { i32, i32 } { i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { i32, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %.loc12_46.2.a = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc12_46.4.b = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !8 diff --git a/toolchain/lower/testdata/tuple/access/element_access.carbon b/toolchain/lower/testdata/tuple/access/element_access.carbon index c0053b89764ff..f4878f6728ea4 100644 --- a/toolchain/lower/testdata/tuple/access/element_access.carbon +++ b/toolchain/lower/testdata/tuple/access/element_access.carbon @@ -21,9 +21,7 @@ fn Run() -> i32 { // CHECK:STDOUT: @tuple.loc12_37 = internal constant { i32, i32, i32 } { i32 0, i32 1, i32 2 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %.loc12_36.2.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc12_36.4.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 1, !dbg !8 diff --git a/toolchain/lower/testdata/tuple/access/return_value_access.carbon b/toolchain/lower/testdata/tuple/access/return_value_access.carbon index 4833791904061..fe8042d0dc889 100644 --- a/toolchain/lower/testdata/tuple/access/return_value_access.carbon +++ b/toolchain/lower/testdata/tuple/access/return_value_access.carbon @@ -20,9 +20,7 @@ fn Run() { // CHECK:STDOUT: @tuple.loc11_39 = internal constant { i32, i32 } { i32 12, i32 24 } // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main(ptr sret({ i32, i32 }) %return) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %.loc11_38.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: %.loc11_38.4.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %return, i32 0, i32 1, !dbg !7 // CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %return, ptr align 4 @tuple.loc11_39, i64 8, i1 false), !dbg !8 @@ -30,9 +28,7 @@ fn Run() { // CHECK:STDOUT: } // CHECK:STDOUT: // CHECK:STDOUT: define void @main() !dbg !9 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %t.var = alloca i32, align 4, !dbg !10 // CHECK:STDOUT: %.loc14_17.1.temp = alloca { i32, i32 }, align 8, !dbg !11 // CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_17.1.temp), !dbg !11 diff --git a/toolchain/lower/testdata/tuple/empty.carbon b/toolchain/lower/testdata/tuple/empty.carbon index 854ffefe91ebe..8a2ddfb3a3239 100644 --- a/toolchain/lower/testdata/tuple/empty.carbon +++ b/toolchain/lower/testdata/tuple/empty.carbon @@ -18,9 +18,7 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "empty.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca {}, align 8, !dbg !7 // CHECK:STDOUT: %y.var = alloca {}, align 8, !dbg !8 // CHECK:STDOUT: ret i32 0, !dbg !9 diff --git a/toolchain/lower/testdata/tuple/nested_tuple.carbon b/toolchain/lower/testdata/tuple/nested_tuple.carbon index 262c96df2ca8f..2d7ce3487fab8 100644 --- a/toolchain/lower/testdata/tuple/nested_tuple.carbon +++ b/toolchain/lower/testdata/tuple/nested_tuple.carbon @@ -17,9 +17,7 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "nested_tuple.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: ret i32 0, !dbg !7 // CHECK:STDOUT: } // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon b/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon index d6d37399e78f1..f832080472fc6 100644 --- a/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon +++ b/toolchain/lower/testdata/tuple/nested_tuple_in_place.carbon @@ -20,9 +20,7 @@ fn G() { // CHECK:STDOUT: declare void @_CF.Main(ptr sret({ i32, i32, i32 })) // CHECK:STDOUT: // CHECK:STDOUT: define void @_CG.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %v.var = alloca { { i32, i32, i32 }, { i32, i32, i32 } }, align 8, !dbg !7 // CHECK:STDOUT: %.loc14_56.1.tuple.elem = getelementptr inbounds nuw { { i32, i32, i32 }, { i32, i32, i32 } }, ptr %v.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: call void @_CF.Main(ptr %.loc14_56.1.tuple.elem), !dbg !9 diff --git a/toolchain/lower/testdata/tuple/one_entry.carbon b/toolchain/lower/testdata/tuple/one_entry.carbon index d32866d1a2974..d75dc9da852ef 100644 --- a/toolchain/lower/testdata/tuple/one_entry.carbon +++ b/toolchain/lower/testdata/tuple/one_entry.carbon @@ -18,9 +18,7 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "one_entry.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { i32 }, align 8, !dbg !7 // CHECK:STDOUT: store { i32 } { i32 1 }, ptr %x.var, align 4, !dbg !8 // CHECK:STDOUT: %y.var = alloca { i32 }, align 8, !dbg !9 diff --git a/toolchain/lower/testdata/tuple/two_entries.carbon b/toolchain/lower/testdata/tuple/two_entries.carbon index c1c954db82d81..bbc42fc4e6ea4 100644 --- a/toolchain/lower/testdata/tuple/two_entries.carbon +++ b/toolchain/lower/testdata/tuple/two_entries.carbon @@ -20,9 +20,7 @@ fn Run() -> i32 { // CHECK:STDOUT: @tuple.loc12_30 = internal constant { i32, i32 } { i32 12, i32 7 } // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca { i32, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %.loc12_29.2.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 0, !dbg !8 // CHECK:STDOUT: %.loc12_29.4.tuple.elem = getelementptr inbounds nuw { i32, i32 }, ptr %x.var, i32 0, i32 1, !dbg !8 diff --git a/toolchain/lower/testdata/tuple/value_formation.carbon b/toolchain/lower/testdata/tuple/value_formation.carbon index 5f0e76f0cf2c8..228a6f1082297 100644 --- a/toolchain/lower/testdata/tuple/value_formation.carbon +++ b/toolchain/lower/testdata/tuple/value_formation.carbon @@ -22,9 +22,7 @@ fn F() { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %a.var = alloca { i32, i32, i32 }, align 8, !dbg !7 // CHECK:STDOUT: %b.var = alloca { i32, i32, i32 }, align 8, !dbg !8 // CHECK:STDOUT: %.loc16_6.1.tuple.elem = getelementptr inbounds nuw { i32, i32, i32 }, ptr %a.var, i32 0, i32 0, !dbg !9 diff --git a/toolchain/lower/testdata/tuple/value_forwarding.carbon b/toolchain/lower/testdata/tuple/value_forwarding.carbon index f3450df87395c..3eec759e1aa5b 100644 --- a/toolchain/lower/testdata/tuple/value_forwarding.carbon +++ b/toolchain/lower/testdata/tuple/value_forwarding.carbon @@ -20,9 +20,7 @@ fn F(a: (i32, i32, i32), b: (i32, i32, i32)) { // CHECK:STDOUT: declare void @_CG.Main(ptr) // CHECK:STDOUT: // CHECK:STDOUT: define void @_CF.Main(ptr %a, ptr %b) !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %tuple = alloca { ptr, ptr }, align 8, !dbg !7 // CHECK:STDOUT: %tuple1 = getelementptr inbounds nuw { ptr, ptr }, ptr %tuple, i32 0, i32 0, !dbg !7 // CHECK:STDOUT: store ptr %a, ptr %tuple1, align 8, !dbg !7 diff --git a/toolchain/lower/testdata/var/local.carbon b/toolchain/lower/testdata/var/local.carbon index c49ec9f52ad95..6ceb441c60fce 100644 --- a/toolchain/lower/testdata/var/local.carbon +++ b/toolchain/lower/testdata/var/local.carbon @@ -17,9 +17,7 @@ fn Run() -> i32 { // CHECK:STDOUT: source_filename = "local.carbon" // CHECK:STDOUT: // CHECK:STDOUT: define i32 @main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: %x.var = alloca i32, align 4, !dbg !7 // CHECK:STDOUT: store i32 1, ptr %x.var, align 4, !dbg !8 // CHECK:STDOUT: %.loc13 = load i32, ptr %x.var, align 4, !dbg !9 diff --git a/toolchain/lower/testdata/while/break_continue.carbon b/toolchain/lower/testdata/while/break_continue.carbon index 1feac9c371d91..99f76bb986442 100644 --- a/toolchain/lower/testdata/while/break_continue.carbon +++ b/toolchain/lower/testdata/while/break_continue.carbon @@ -29,9 +29,10 @@ fn While() { // CHECK:STDOUT: declare i1 @_CC.Main() // CHECK:STDOUT: // CHECK:STDOUT: define void @_CWhile.Main() !dbg !4 { +// CHECK:STDOUT: entry: // CHECK:STDOUT: br label %while.cond // CHECK:STDOUT: -// CHECK:STDOUT: while.cond: ; preds = %0, %if.else.loc18, %if.then.loc17 +// CHECK:STDOUT: while.cond: ; preds = %entry, %if.else.loc18, %if.then.loc17 // CHECK:STDOUT: %A.call = call i1 @_CA.Main(), !dbg !7 // CHECK:STDOUT: br i1 %A.call, label %while.body, label %while.done, !dbg !8 // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/while/preheader.carbon b/toolchain/lower/testdata/while/preheader.carbon index b35e0fcd2076d..b0ebec653b4a2 100644 --- a/toolchain/lower/testdata/while/preheader.carbon +++ b/toolchain/lower/testdata/while/preheader.carbon @@ -38,9 +38,10 @@ fn While() { // CHECK:STDOUT: declare void @_CG.Main() // CHECK:STDOUT: // CHECK:STDOUT: define void @_CWhile.Main() !dbg !4 { +// CHECK:STDOUT: entry: // CHECK:STDOUT: br label %while.cond.loc20 // CHECK:STDOUT: -// CHECK:STDOUT: while.cond.loc20: ; preds = %0, %while.body.loc20 +// CHECK:STDOUT: while.cond.loc20: ; preds = %entry, %while.body.loc20 // CHECK:STDOUT: %Cond.call.loc20 = call i1 @_CCond.Main(), !dbg !7 // CHECK:STDOUT: br i1 %Cond.call.loc20, label %while.body.loc20, label %while.done.loc20, !dbg !8 // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/while/unreachable_end.carbon b/toolchain/lower/testdata/while/unreachable_end.carbon index f6cc1525861b9..abd175daba7e2 100644 --- a/toolchain/lower/testdata/while/unreachable_end.carbon +++ b/toolchain/lower/testdata/while/unreachable_end.carbon @@ -35,9 +35,7 @@ fn While() { // CHECK:STDOUT: declare void @_CH.Main() // CHECK:STDOUT: // CHECK:STDOUT: define void @_CWhile.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CF.Main(), !dbg !7 // CHECK:STDOUT: br label %while.cond, !dbg !8 // CHECK:STDOUT: diff --git a/toolchain/lower/testdata/while/while.carbon b/toolchain/lower/testdata/while/while.carbon index 504c9774bf742..c00fe82f5d266 100644 --- a/toolchain/lower/testdata/while/while.carbon +++ b/toolchain/lower/testdata/while/while.carbon @@ -34,9 +34,7 @@ fn While() { // CHECK:STDOUT: declare void @_CH.Main() // CHECK:STDOUT: // CHECK:STDOUT: define void @_CWhile.Main() !dbg !4 { -// CHECK:STDOUT: br label %entry -// CHECK:STDOUT: -// CHECK:STDOUT: entry: ; preds = %0 +// CHECK:STDOUT: entry: // CHECK:STDOUT: call void @_CF.Main(), !dbg !7 // CHECK:STDOUT: br label %while.cond, !dbg !8 // CHECK:STDOUT: