54 lines · plain
1; RUN: llc < %s -mtriple=i686-- -asm-verbose=false | FileCheck %s --check-prefix=FP-ELIM2; RUN: llc < %s -mtriple=i686-- -asm-verbose=false -frame-pointer=all | FileCheck %s --check-prefix=NO-ELIM3 4; Implement -momit-leaf-frame-pointer5; rdar://78861816 7define i32 @t1() nounwind readnone {8entry:9; FP-ELIM-LABEL: t1:10; FP-ELIM-NEXT: movl11; FP-ELIM-NEXT: ret12 13; NO-ELIM-LABEL: t1:14; NO-ELIM-NEXT: pushl %ebp15; NO-ELIM: popl %ebp16; NO-ELIM-NEXT: ret17 ret i32 1018}19 20define void @t2() nounwind {21entry:22; FP-ELIM-LABEL: t2:23; FP-ELIM-NOT: pushl %ebp24; FP-ELIM: ret25 26; NO-ELIM-LABEL: t2:27; NO-ELIM-NEXT: pushl %ebp28; NO-ELIM: popl %ebp29; NO-ELIM-NEXT: ret30 tail call void @foo(i32 0) nounwind31 ret void32}33 34; The local non-leaf attribute takes precendece over the command line flag.35define i32 @t3() "frame-pointer"="non-leaf" nounwind readnone {36entry:37; ANY-ELIM-LABEL: t3:38; ANY-ELIM-NEXT: movl39; ANY-ELIM-NEXT: ret40 ret i32 1041}42 43define void @t4() "frame-pointer"="non-leaf" nounwind {44entry:45; ANY-ELIM-LABEL: t4:46; ANY-ELIM-NEXT: pushl %ebp47; ANY-ELIM: popl %ebp48; ANY-ELIM-NEXT: ret49 tail call void @foo(i32 0) nounwind50 ret void51}52 53declare void @foo(i32)54