Fix Bug: Assembler/2003-05-12-MinIntProblem.llx
[oota-llvm.git] / test / ExecutionEngine / test-loadstore.ll
index f8fadab85e4691a0482cbfe6a93c8ae843f9b9ea..35a2c5fcb151ac074d55a5ba5982a8e8a2fd9920 100644 (file)
@@ -1,5 +1,5 @@
 
-void %test(sbyte* %P, short* %P, int* %P) {
+void %test(sbyte* %P, short* %P, int* %P, long* %P) {
        %V = load sbyte* %P
        store sbyte %V, sbyte* %P
 
@@ -8,5 +8,27 @@ void %test(sbyte* %P, short* %P, int* %P) {
 
        %V = load int* %P
        store int %V, int* %P
+
+       %V = load long* %P
+       store long %V, long* %P
+
        ret void
 }
+
+uint %varalloca(uint %Size) {
+       %X = alloca uint, uint %Size        ;; Variable sized alloca
+       store uint %Size, uint* %X
+       %Y = load uint* %X
+       ret uint %Y
+}
+
+int %main() {
+       %A = alloca sbyte
+       %B = alloca short
+       %C = alloca int
+       %D = alloca long
+       call void %test(sbyte* %A, short* %B, int* %C, long* %D)
+       call uint %varalloca(uint 7)
+
+       ret int 0
+}