1 ; RUN: llc -O0 %s --basic-block-sections=all -mtriple=x86_64 -filetype=asm --frame-pointer=all -o - | FileCheck --check-prefix=SECTIONS_CFI %s
2 ; RUN: llc -O0 %s --basic-block-sections=all -mtriple=x86_64 -filetype=asm --frame-pointer=none -o - | FileCheck --check-prefix=SECTIONS_NOFP_CFI %s
3 ; RUN: llc -O0 %s --basic-block-sections=all -mtriple=x86_64 -filetype=obj --frame-pointer=all -o - | llvm-dwarfdump --eh-frame - | FileCheck --check-prefix=EH_FRAME %s
12 ; SECTIONS_CFI: _Z2f3b:
13 ; SECTIONS_CFI: .cfi_startproc
14 ; SECTIONS_CFI: .cfi_def_cfa_offset 16
15 ; SECTIONS_CFI: .cfi_offset %rbp, -16
16 ; SECTIONS_CFI: .cfi_def_cfa_register %rbp
17 ; SECTIONS_CFI: .cfi_endproc
19 ; SECTIONS_CFI: _Z2f3b.__part.1:
20 ; SECTIONS_CFI-NEXT: .cfi_startproc
21 ; SECTIONS_CFI-NEXT: .cfi_def_cfa %rbp, 16
22 ; SECTIONS_CFI-NEXT: .cfi_offset %rbp, -16
23 ; SECTIONS_CFI: .cfi_endproc
25 ; SECTIONS_CFI: _Z2f3b.__part.2:
26 ; SECTIONS_CFI-NEXT: .cfi_startproc
27 ; SECTIONS_CFI-NEXT: .cfi_def_cfa %rbp, 16
28 ; SECTIONS_CFI-NEXT: .cfi_offset %rbp, -16
29 ; SECTIONS_CFI: .cfi_def_cfa
30 ; SECTIONS_CFI: .cfi_endproc
33 ; SECTIONS_NOFP_CFI: _Z2f3b:
34 ; SECTIONS_NOFP_CFI: .cfi_startproc
35 ; SECTIONS_NOFP_CFI: .cfi_def_cfa_offset 16
36 ; SECTIONS_NOFP_CFI: .cfi_endproc
38 ; SECTIONS_NOFP_CFI: _Z2f3b.__part.1:
39 ; SECTIONS_NOFP_CFI-NEXT: .cfi_startproc
40 ; SECTIONS_NOFP_CFI-NEXT: .cfi_def_cfa %rsp, 16
41 ; SECTIONS_NOFP_CFI: .cfi_endproc
43 ; SECTIONS_NOFP_CFI: _Z2f3b.__part.2:
44 ; SECTIONS_NOFP_CFI-NEXT: .cfi_startproc
45 ; SECTIONS_NOFP_CFI-NEXT: .cfi_def_cfa %rsp, 16
46 ; SECTIONS_NOFP_CFI: .cfi_endproc
49 ;; There must be 1 CIE and 3 FDEs.
52 ; EH_FRAME: DW_CFA_def_cfa
53 ; EH_FRAME: DW_CFA_offset
56 ; EH_FRAME: DW_CFA_def_cfa_offset
57 ; EH_FRAME: DW_CFA_offset
58 ; EH_FRAME: DW_CFA_def_cfa_register
61 ; EH_FRAME: DW_CFA_def_cfa
62 ; EH_FRAME: DW_CFA_offset
65 ; EH_FRAME: DW_CFA_def_cfa
66 ; EH_FRAME: DW_CFA_offset
68 ; Function Attrs: noinline optnone uwtable
69 define dso_local void @_Z2f3b(i1 zeroext %b) {
71 %b.addr = alloca i8, align 1
72 %frombool = zext i1 %b to i8
73 store i8 %frombool, ptr %b.addr, align 1
74 %0 = load i8, ptr %b.addr, align 1
75 %tobool = trunc i8 %0 to i1
76 br i1 %tobool, label %if.then, label %if.end
78 if.then: ; preds = %entry
82 if.end: ; preds = %if.then, %entry
86 declare dso_local void @_Z2f1v()