xref: /llvm-project/llvm/test/CodeGen/X86/epilogue-cfi-fp.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc -O0 %s -o - | FileCheck %s
2; RUN: llc -O0 %s -o - | FileCheck %s
3; RUN: llc < %s -stop-after=prologepilog | FileCheck %s --check-prefix=PEI
4
5target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
6target triple = "i686-pc-linux"
7
8; Function Attrs: noinline nounwind
9define i32 @foo(i32 %i, i32 %j, i32 %k, i32 %l, i32 %m) #0 {
10
11; CHECK-LABEL:   foo:
12; CHECK:         popl %ebp
13; CHECK-NEXT:    .cfi_def_cfa %esp, 4
14; CHECK-NEXT:    retl
15
16; PEI-LABEL: name: foo
17; PEI:         $ebp = frame-destroy POP32r implicit-def $esp, implicit $esp
18; PEI-NEXT:    frame-destroy CFI_INSTRUCTION def_cfa $esp, 4
19; PEI-NEXT:    RET 0, killed $eax
20
21entry:
22  %i.addr = alloca i32, align 4
23  %j.addr = alloca i32, align 4
24  %k.addr = alloca i32, align 4
25  %l.addr = alloca i32, align 4
26  %m.addr = alloca i32, align 4
27  store i32 %i, ptr %i.addr, align 4
28  store i32 %j, ptr %j.addr, align 4
29  store i32 %k, ptr %k.addr, align 4
30  store i32 %l, ptr %l.addr, align 4
31  store i32 %m, ptr %m.addr, align 4
32  ret i32 0
33}
34
35attributes #0 = { "frame-pointer"="all" }
36
37