aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-03-04 21:15:15 +0000
committerDevang Patel <dpatel@apple.com>2008-03-04 21:15:15 +0000
commitbd4e13d1d30664d3ad3821dc4c0acf881f7a2fc4 (patch)
treedd9f24d6ef339a9acc0fa7ac3a56cc8c7c675e24 /test/Transforms
parentbd7d32686dac499b9f7c773ec1d415befdc65dea (diff)
downloadexternal_llvm-bd4e13d1d30664d3ad3821dc4c0acf881f7a2fc4.zip
external_llvm-bd4e13d1d30664d3ad3821dc4c0acf881f7a2fc4.tar.gz
external_llvm-bd4e13d1d30664d3ad3821dc4c0acf881f7a2fc4.tar.bz2
Handle multiple return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/Inline/2008-03-04-StructRet.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/Transforms/Inline/2008-03-04-StructRet.ll b/test/Transforms/Inline/2008-03-04-StructRet.ll
new file mode 100644
index 0000000..d919cf4
--- /dev/null
+++ b/test/Transforms/Inline/2008-03-04-StructRet.ll
@@ -0,0 +1,26 @@
+; RUN: llvm-as < %s | opt -inline -sretpromotion -disable-output
+ %struct.Benchmark = type { i32 (...)** }
+ %struct.Complex = type { double, double }
+ %struct.ComplexBenchmark = type { %struct.Benchmark }
+
+define void @_Zml7ComplexS_(%struct.Complex* sret %agg.result, double %a.0, double %a.1, double %b.0, double %b.1) nounwind {
+entry:
+ ret void
+}
+
+define void @_ZNK16ComplexBenchmark9oop_styleEv(%struct.ComplexBenchmark* %this) nounwind {
+entry:
+ %tmp = alloca %struct.Complex ; <%struct.Complex*> [#uses=2]
+ br label %bb31
+
+bb: ; preds = %bb31
+ call void @_Zml7ComplexS_( %struct.Complex* sret %tmp, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00 ) nounwind
+ %tmp21 = getelementptr %struct.Complex* %tmp, i32 0, i32 1 ; <double*> [#uses=0]
+ br label %bb31
+
+bb31: ; preds = %bb, %entry
+ br i1 false, label %bb, label %return
+
+return: ; preds = %bb31
+ ret void
+}