summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/Frames-leaf.ll
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-11-17 16:54:21 +0000
committerJim Laskey <jlaskey@mac.com>2006-11-17 16:54:21 +0000
commit64c32dd2eaad73f92f60768212687d85f8114ca7 (patch)
tree7fb1dbc292166799512a0d5fff827b5452b1d287 /test/CodeGen/PowerPC/Frames-leaf.ll
parent2ff5cdb16cea04f562402c2a33732840857a66e2 (diff)
downloadllvm-64c32dd2eaad73f92f60768212687d85f8114ca7.tar.gz
llvm-64c32dd2eaad73f92f60768212687d85f8114ca7.tar.bz2
llvm-64c32dd2eaad73f92f60768212687d85f8114ca7.tar.xz
Tests to verify PowerPC ABI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/Frames-leaf.ll')
-rw-r--r--test/CodeGen/PowerPC/Frames-leaf.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/Frames-leaf.ll b/test/CodeGen/PowerPC/Frames-leaf.ll
new file mode 100644
index 0000000000..5bbf0286ee
--- /dev/null
+++ b/test/CodeGen/PowerPC/Frames-leaf.ll
@@ -0,0 +1,24 @@
+; RUN: llvm-as < %s | llc -march=ppc32 | NOT grep 'stw r31, 20(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc32 | NOT grep 'stwu r1, -.*(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc32 | NOT grep 'addi r1, r1, ' &&
+; RUN: llvm-as < %s | llc -march=ppc32 | NOT grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | NOT grep 'stw r31, 20(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | NOT grep 'stwu r1, -.*(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | NOT grep 'addi r1, r1, ' &&
+; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | NOT grep 'lwz r31, 20(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc64 | NOT grep 'std r31, 40(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc64 | NOT grep 'stdu r1, -.*(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc64 | NOT grep 'addi r1, r1, ' &&
+; RUN: llvm-as < %s | llc -march=ppc64 | NOT grep 'ld r31, 40(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | NOT grep 'stw r31, 40(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | NOT grep 'stdu r1, -.*(r1)' &&
+; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | NOT grep 'addi r1, r1, ' &&
+; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | NOT grep 'ld r31, 40(r1)'
+
+
+implementation
+
+int* %f1() {
+ %tmp = alloca int, uint 2
+ ret int* %tmp
+}