[opengtl-commits] [530] add two new test of llvm features |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 530
Author: cyrille
Date: 2008-12-07 23:19:39 +0100 (Sun, 07 Dec 2008)
Log Message:
-----------
add two new test of llvm features
Added Paths:
-----------
trunk/OpenGTL/sdk/testllvm/testReturnArray.ll
trunk/OpenGTL/sdk/testllvm/testReturnStructStruct.ll
Added: trunk/OpenGTL/sdk/testllvm/testReturnArray.ll
===================================================================
--- trunk/OpenGTL/sdk/testllvm/testReturnArray.ll (rev 0)
+++ trunk/OpenGTL/sdk/testllvm/testReturnArray.ll 2008-12-07 22:19:39 UTC (rev 530)
@@ -0,0 +1,13 @@
+; llvm-as -f testReturnArray.ll ; llvm-ld testReturnArray.bc; ./a.out
+; lli testReturnArray.bc
+
+define { i32, i32, float* } @_returnArray0() {
+ %Variable = malloc { i32, i32, float* } ; <{ i32, i32, float* }*> [#uses=8]
+ %"ArrayVisitor::get" = load { i32, i32, float* }* %Variable ; <{ i32, i32, float* }> [#uses=1]
+ ret { i32, i32, float* } %"ArrayVisitor::get"
+}
+
+define i32 @main(i32 signext %argc, i8** %argv) {
+ %1 = call { i32, i32, float* } @_returnArray0() ; <{ i32, i32, float* }> [#uses=0]
+ ret i32 0
+}
Added: trunk/OpenGTL/sdk/testllvm/testReturnStructStruct.ll
===================================================================
--- trunk/OpenGTL/sdk/testllvm/testReturnStructStruct.ll (rev 0)
+++ trunk/OpenGTL/sdk/testllvm/testReturnStructStruct.ll 2008-12-07 22:19:39 UTC (rev 530)
@@ -0,0 +1,13 @@
+; llvm-as -f testReturnStructStruct.ll ; llvm-ld testReturnStructStruct.bc; ./a.out
+; lli testReturnStructStruct.bc
+
+define { i32, i32, {i32, i32} } @_returnArray0() {
+ %Variable = malloc { i32, i32, {i32, i32} } ; <{ i32, i32, {i32, i32} }*> [#uses=8]
+ %"ArrayVisitor::get" = load { i32, i32, {i32, i32} }* %Variable ; <{ i32, i32, {i32, i32} }> [#uses=1]
+ ret { i32, i32, {i32, i32} } %"ArrayVisitor::get"
+}
+
+define i32 @main(i32 signext %argc, i8** %argv) {
+ %1 = call { i32, i32, {i32, i32} } @_returnArray0() ; <{ i32, i32, {i32, i32} }> [#uses=0]
+ ret i32 0
+}