diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-07-16 13:50:21 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-07-16 13:50:21 +0000 |
commit | ba249e41f3ffa9e947b9173e3965385ec6324ffb (patch) | |
tree | 865a42d49a94b5bccb18d306dd60eaf09e9bb924 /test/CodeGen/SystemZ | |
parent | 3c98c616c51a65c9af2ffcd7498be795049fcfad (diff) | |
download | external_llvm-ba249e41f3ffa9e947b9173e3965385ec6324ffb.zip external_llvm-ba249e41f3ffa9e947b9173e3965385ec6324ffb.tar.gz external_llvm-ba249e41f3ffa9e947b9173e3965385ec6324ffb.tar.bz2 |
Some preliminary call lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SystemZ')
-rw-r--r-- | test/CodeGen/SystemZ/06-CallViaStack.ll | 17 | ||||
-rw-r--r-- | test/CodeGen/SystemZ/06-SimpleCall.ll | 12 |
2 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/SystemZ/06-CallViaStack.ll b/test/CodeGen/SystemZ/06-CallViaStack.ll new file mode 100644 index 0000000..7b222d9 --- /dev/null +++ b/test/CodeGen/SystemZ/06-CallViaStack.ll @@ -0,0 +1,17 @@ +; RUN: llvm-as < %s | llc | grep 168 | count 2 +; RUN: llvm-as < %s | llc | grep 160 | count 3 +; RUN: llvm-as < %s | llc | grep 328 | count 1 + +target datalayout = "E-p:64:64:64-i1:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128" +target triple = "s390x-unknown-linux-gnu" + +define i64 @foo(i64 %b, i64 %c, i64 %d, i64 %e, i64 %f, i64 %g) nounwind { +entry: + %a = alloca i64, align 8 ; <i64*> [#uses=3] + store i64 %g, i64* %a + call void @bar(i64* %a) nounwind + %tmp1 = load i64* %a ; <i64> [#uses=1] + ret i64 %tmp1 +} + +declare void @bar(i64*) diff --git a/test/CodeGen/SystemZ/06-SimpleCall.ll b/test/CodeGen/SystemZ/06-SimpleCall.ll new file mode 100644 index 0000000..e39c0bd --- /dev/null +++ b/test/CodeGen/SystemZ/06-SimpleCall.ll @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | llc + +target datalayout = "E-p:64:64:64-i1:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128" +target triple = "s390x-unknown-linux-gnu" + +define void @foo() nounwind { +entry: + tail call void @bar() nounwind + ret void +} + +declare void @bar() |