1 ; RUN: llc < %s -march=x86 -asm-verbose=false | FileCheck %s -check-prefix=FP-ELIM 2 ; RUN: llc < %s -march=x86 -asm-verbose=false -disable-fp-elim | FileCheck %s -check-prefix=NO-ELIM 3 ; RUN: llc < %s -march=x86 -asm-verbose=false -disable-non-leaf-fp-elim | FileCheck %s -check-prefix=NON-LEAF 4 5 ; Implement -momit-leaf-frame-pointer 6 ; rdar://7886181 7 8 define i32 @t1() nounwind readnone { 9 entry: 10 ; FP-ELIM: t1: 11 ; FP-ELIM-NEXT: movl 12 ; FP-ELIM-NEXT: ret 13 14 ; NO-ELIM: t1: 15 ; NO-ELIM-NEXT: pushl %ebp 16 ; NO-ELIM: popl %ebp 17 ; NO-ELIM-NEXT: ret 18 19 ; NON-LEAF: t1: 20 ; NON-LEAF-NEXT: movl 21 ; NON-LEAF-NEXT: ret 22 ret i32 10 23 } 24 25 define void @t2() nounwind { 26 entry: 27 ; FP-ELIM: t2: 28 ; FP-ELIM-NOT: pushl %ebp 29 ; FP-ELIM: ret 30 31 ; NO-ELIM: t2: 32 ; NO-ELIM-NEXT: pushl %ebp 33 ; NO-ELIM: popl %ebp 34 ; NO-ELIM-NEXT: ret 35 36 ; NON-LEAF: t2: 37 ; NON-LEAF-NEXT: pushl %ebp 38 ; NON-LEAF: popl %ebp 39 ; NON-LEAF-NEXT: ret 40 tail call void @foo(i32 0) nounwind 41 ret void 42 } 43 44 declare void @foo(i32) 45