| ; RUN: llc < %s -mtriple=i686-- -asm-verbose=false | FileCheck %s --check-prefix=FP-ELIM |
| ; RUN: llc < %s -mtriple=i686-- -asm-verbose=false -frame-pointer=all | FileCheck %s --check-prefix=NO-ELIM |
| ; Implement -momit-leaf-frame-pointer |
| define i32 @t1() nounwind readnone { |
| ; NO-ELIM-NEXT: pushl %ebp |
| define void @t2() nounwind { |
| ; FP-ELIM-NOT: pushl %ebp |
| ; NO-ELIM-NEXT: pushl %ebp |
| tail call void @foo(i32 0) nounwind |
| ; The local non-leaf attribute takes precendece over the command line flag. |
| define i32 @t3() "frame-pointer"="non-leaf" nounwind readnone { |
| define void @t4() "frame-pointer"="non-leaf" nounwind { |
| ; ANY-ELIM-NEXT: pushl %ebp |
| tail call void @foo(i32 0) nounwind |