summaryrefslogtreecommitdiff
path: root/test/CodeGen/SPARC
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2011-01-21 14:00:01 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2011-01-21 14:00:01 +0000
commit46713296e0da8f413b94b9c2b82b079e6e3bd6e2 (patch)
treeed2d72c45994f4f941bac81f3960c1827dac39ac /test/CodeGen/SPARC
parente7c85a4c1d0c5692ba06494993ebeca562c1ed80 (diff)
downloadllvm-46713296e0da8f413b94b9c2b82b079e6e3bd6e2.tar.gz
llvm-46713296e0da8f413b94b9c2b82b079e6e3bd6e2.tar.bz2
llvm-46713296e0da8f413b94b9c2b82b079e6e3bd6e2.tar.xz
Implement support for byval arguments in Sparc backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SPARC')
-rw-r--r--test/CodeGen/SPARC/2011-01-21-ByValArgs.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/2011-01-21-ByValArgs.ll b/test/CodeGen/SPARC/2011-01-21-ByValArgs.ll
new file mode 100644
index 0000000000..85c16e4684
--- /dev/null
+++ b/test/CodeGen/SPARC/2011-01-21-ByValArgs.ll
@@ -0,0 +1,18 @@
+;RUN: llc -march=sparc < %s | FileCheck %s
+
+%struct.foo_t = type { i32, i32, i32 }
+
+@s = internal unnamed_addr global %struct.foo_t { i32 10, i32 20, i32 30 }
+
+define i32 @test() nounwind {
+entry:
+;CHECK: test
+;CHECK: st
+;CHECK: st
+;CHECK: st
+;CHECK: bar
+ %0 = tail call i32 @bar(%struct.foo_t* byval @s) nounwind
+ ret i32 %0
+}
+
+declare i32 @bar(%struct.foo_t* byval)