Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / CodeGen / X86 / basic-block-sections-labels-empty-block.ll
blob8e0f4fa7bc928eceebd06bc1be7537afb17aad30
1 ;; This test verifies that with -gc-empty-basic-blocks SHT_LLVM_BB_ADDR_MAP will not include entries for empty blocks.
2 ; RUN: llc < %s -mtriple=x86_64 -O0 -basic-block-sections=labels -gc-empty-basic-blocks | FileCheck --check-prefix=CHECK %s
4 define void @foo(i1 zeroext %0) nounwind {
5   br i1 %0, label %2, label %empty_block
7 2:                                               ; preds = %1
8   %3 = call i32 @bar()
9   br label %4
11 empty_block:                                     ; preds = %1
12   unreachable
14 4:                                               ; preds = %2, %empty_block
15   ret void
18 declare i32 @bar()
20 ; CHECK: .section       .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text
21 ; CHECK: .byte  3                               # number of basic blocks