diff options
Diffstat (limited to 'test/CodeGen/frame-pointer-elim.c')
-rw-r--r-- | test/CodeGen/frame-pointer-elim.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/frame-pointer-elim.c b/test/CodeGen/frame-pointer-elim.c new file mode 100644 index 000000000000..79c0599467a9 --- /dev/null +++ b/test/CodeGen/frame-pointer-elim.c @@ -0,0 +1,29 @@ +// RUN: %clang -ccc-host-triple i386 -S -o - %s | \ +// RUN: FileCheck --check-prefix=DEFAULT %s +// DEFAULT: f0: +// DEFAULT: pushl %ebp +// DEFAULT: ret +// DEFAULT: f1: +// DEFAULT: pushl %ebp +// DEFAULT: ret + +// RUN: %clang -ccc-host-triple i386 -S -o - -fomit-frame-pointer %s | \ +// RUN: FileCheck --check-prefix=OMIT_ALL %s +// OMIT_ALL: f0: +// OMIT_ALL-NOT: pushl %ebp +// OMIT_ALL: ret +// OMIT_ALL: f1: +// OMIT_ALL-NOT: pushl %ebp +// OMIT_ALL: ret + +// RUN: %clang -ccc-host-triple i386 -S -o - -momit-leaf-frame-pointer %s | \ +// RUN: FileCheck --check-prefix=OMIT_LEAF %s +// OMIT_LEAF: f0: +// OMIT_LEAF-NOT: pushl %ebp +// OMIT_LEAF: ret +// OMIT_LEAF: f1: +// OMIT_LEAF: pushl %ebp +// OMIT_LEAF: ret + +void f0() {} +void f1() { f0(); } |