Files
clang-p2996/llvm/test/CodeGen/X86/basic-block-address-map-empty-function.ll
Rahman Lavaee 1911a50fae Deprecate the -fbasic-block-sections=labels option. (#107494)
This feature is supported via the newer option
`-fbasic-block-address-map`. Using the old option still works by
delegating to the newer option, while a warning is printed to show
deprecation.
2024-09-25 12:03:38 -07:00

26 lines
788 B
LLVM

;; Verify that the BB address map is not emitted for empty functions.
; RUN: llc < %s -mtriple=x86_64 -basic-block-address-map | FileCheck %s --check-prefixes=CHECK,BASIC
; RUN: llc < %s -mtriple=x86_64 -basic-block-address-map -pgo-analysis-map=func-entry-count,bb-freq | FileCheck %s --check-prefixes=CHECK,PGO
define void @empty_func() {
entry:
unreachable
}
; CHECK: {{^ *}}.text{{$}}
; CHECK: empty_func:
; CHECK: .Lfunc_begin0:
; CHECK-NOT: .section .llvm_bb_addr_map
define void @func() {
entry:
ret void
}
; CHECK: func:
; CHECK: .Lfunc_begin1:
; CHECK: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text{{$}}
; CHECK-NEXT: .byte 2 # version
; BASIC-NEXT: .byte 0 # feature
; PGO-NEXT: .byte 3 # feature
; CHECK-NEXT: .quad .Lfunc_begin1 # function address